first commit
This commit is contained in:
538
admin/#anz_anm.php
Normal file
538
admin/#anz_anm.php
Normal file
@ -0,0 +1,538 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_anzanm'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Einzelübersicht</title>
|
||||
</head>
|
||||
<body onload=\"if(document.einzel)document.einzel.user1.focus();return false;\">
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Anzahl Anmeldungen Student</font><br>
|
||||
<font class=\"sh\">Anzahl der Anmeldungen für eine Praxisstelle</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubersicht"; echo" method=\"POST\" name=\"einzel\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"115\">
|
||||
<tr>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
</td>
|
||||
<td width=\"25%\" height=\"17\"> </td>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
<p> </p>
|
||||
</td>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
<p></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
Bitte Matrikelnr. eingeben:
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p align=\"left\">
|
||||
<input type='text' size='10' name='user1'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p align=\"center\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
</td>
|
||||
<td width=\"50%\" align=\"left\" height=\"17\">
|
||||
oder
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p align=\"center\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
Benutzer auswählen
|
||||
</td>
|
||||
<td width=\"50%\" align=\"left\" height=\"17\">
|
||||
";
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
$query = "SELECT mtknr, vorname, nachname, durchgefallen
|
||||
FROM stud
|
||||
WHERE jahrgang='$jahrgang'
|
||||
AND uid IN (SELECT uid FROM stan_antrag)
|
||||
ORDER BY nachname";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
echo "<select size=\"5\" name=\"user2\">";
|
||||
while ($row = $result->fetch_array()){
|
||||
echo "<option value=\"".$row[mtknr]."\">$row[nachname], $row[vorname]";
|
||||
if ($row[durchgefallen] == "Y"){
|
||||
echo " *";
|
||||
}
|
||||
echo "
|
||||
</option>\n";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
echo "
|
||||
<br>
|
||||
* = inaktiver Bewerber
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
</td>
|
||||
<td width=\"50%\" align=\"left\" height=\"17\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"100%\" \" colspan='2' align=\"center\">
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"18\">
|
||||
</td>
|
||||
<td width=\"50%\">
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\">
|
||||
</td>
|
||||
<td width=\"50%\" align=\"center\">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\">
|
||||
</td>
|
||||
<td width=\"50%\" align=\"center\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
break;
|
||||
case "ubersicht":
|
||||
|
||||
|
||||
$user = $_POST[user2];
|
||||
|
||||
if($_POST[user1] != ''){ // Wenn Matrikelnummer eingegeben, dann prüfen, ob es diese im System gibt
|
||||
|
||||
$user = $_POST[user1]; // vorrangig die Matrikelnr bei Eingabe behandeln
|
||||
|
||||
$result = $db->query("SELECT 1
|
||||
FROM stud
|
||||
WHERE mtknr ='$user1'");
|
||||
$row = $result->fetch_array();
|
||||
$bewerber = $row[bid];
|
||||
|
||||
if($row[0] == ''){
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsche Eingabe</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsche Eingabe</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Matrikelnummer ist im System nicht vorhanden</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$result = $db->query("SELECT uid
|
||||
FROM stud
|
||||
WHERE mtknr ='$user'");
|
||||
$row = $result->fetch_array();
|
||||
|
||||
$uid = $row[uid];
|
||||
setcookie("ck_uid","");
|
||||
setcookie("ck_uid",$uid);
|
||||
|
||||
|
||||
$result1 = $db->query("SELECT anzahl
|
||||
FROM stan_anz_anm
|
||||
WHERE uid ='$uid'");
|
||||
$row1 = $result1->fetch_array();
|
||||
|
||||
if($row1[anzahl] == ''){
|
||||
$anzahl = 4;
|
||||
}else{
|
||||
$anzahl = $row1[anzahl];
|
||||
}
|
||||
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Einzelübersicht</title>
|
||||
</head>
|
||||
<body onload=\"if(document.einzel)document.einzel.anz.focus();return false;\">
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Anzahl Anmeldungen Student</font><br>
|
||||
<font class=\"sh\">Anzahl der Anmeldungen für eine Praxisstelle</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubersicht2"; echo" method=\"POST\" name=\"einzel\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-width: 0\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\" height=\"115\">
|
||||
<tr>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
</td>
|
||||
<td width=\"25%\" height=\"17\"> </td>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
<p> </p>
|
||||
</td>
|
||||
<td width=\"25%\" height=\"17\">
|
||||
<p></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
Bitte die Anzahl der Anmeldungen für Praxisstellen eingeben:
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p align=\"left\">
|
||||
<input type='text' size='10' name='anz' value='$anzahl'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
<p></p>
|
||||
</td>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
<p align=\"center\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"50%\" height=\"17\">
|
||||
|
||||
</td>
|
||||
<td width=\"50%\" align=\"left\" height=\"17\">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"100%\" \" colspan='2' align=\"center\">
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
break;
|
||||
case "ubersicht2":
|
||||
|
||||
$uid=$_COOKIE["ck_uid"];
|
||||
$anz = $_POST[anz];
|
||||
|
||||
if (!(preg_match("/^[0-9]+$/",$anz))) {
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Eingabefehler</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Eingabefehler</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Es muss ein nummerischer Wert eingegeben werden</b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$sql = $db->query ("DELETE FROM stan_anz_anm WHERE uid = '$uid'");
|
||||
if ($anz != 4){
|
||||
$sql = $db->query ("INSERT INTO stan_anz_anm (uid, anzahl) VALUES ('$uid', $anz)");
|
||||
}
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Eingabefehler</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"60%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Eintragung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Änderungen wurden vorgenommen</b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"hauptframe_jahr.php\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
} // Ende Action script
|
||||
?>
|
621
admin/#bereiche.php
Normal file
621
admin/#bereiche.php
Normal file
@ -0,0 +1,621 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_bereich'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
|
||||
echo"
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Bereiche erfassen</title>
|
||||
<style type='text/css'>
|
||||
select{
|
||||
width:323px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload=\"if(document.anmschluss)document.anmschluss.so1.focus();return false;\">
|
||||
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"60%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubernahme"; echo" method=\"POST\" name=\"ubernahme\">
|
||||
<font class=\"hd\">Bereiche <input type=\"submit\" value=\"Übernahme Vorjahr\" name=\"B1\" size=\"20\"></form></font><br>
|
||||
</form>
|
||||
<font class=\"sh\">eintragen / löschen</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"table2\" name=\"anmschluss\">
|
||||
<tr>
|
||||
<td><br>
|
||||
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
||||
<p align=\"center\"> </p>
|
||||
</td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=eintragen"; echo" method=\"POST\" name=\"anmschluss\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<b>Bezeichnung</b>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<b>V</b>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<b>W</b>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<b>Alle</b>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 1:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber1\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich1\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich1\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich1\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 2:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber2\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich2\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich2\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich2\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 3:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber3\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich3\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich3\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich3\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 4:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber4\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich4\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich4\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich4\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 5:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber5\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich5\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich5\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich5\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 6:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber6\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich6\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich6\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich6\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 7:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber7\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich7\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich7\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich7\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 8:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber8\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich8\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich8\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich8\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 9:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber9\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich9\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich9\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich9\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">Bereich 10:
|
||||
</td>
|
||||
<td width=\"61%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"ber10\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich10\" value=\"V\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich10\" value=\"W\">
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"3%\" align=\"center\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"radio\" name=\"bereich10\" value=\"A\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type=\"submit\" value=\"Eintragen\" name=\"B1\" size=\"20\"></form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
||||
<p align=\"center\"> </p>
|
||||
</td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=del"; echo" method=\"POST\" name=\"anmschluss\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<br>";
|
||||
$db = dbconnect();
|
||||
$query = "SELECT sbid, CONCAT( kennung, ' ', bezeichnung ) bezeichnung
|
||||
FROM stan_stellenbereiche
|
||||
WHERE jahrgang='$jahrgang'
|
||||
ORDER BY CONCAT( kennung, ' ', bezeichnung )
|
||||
|
||||
";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
echo "<p align=\"center\"><select size=\"5\" name=\"ber_delete\">";
|
||||
while ($row = $result->fetch_array()){
|
||||
$ort_row = "$row[testdatum]|$row[testzeit]|$row[raum]";
|
||||
echo "<option value='$row[sbid]'>$row[bezeichnung]</option>\n";
|
||||
}
|
||||
echo "</select>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type=\"submit\" value=\"Löschen\" name=\"B1\" size=\"20\"></form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "eintragen":
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
if ($_POST[ber1] != '' AND $_POST[bereich1] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber1]', '$_POST[bereich1]')");}
|
||||
if ($_POST[ber2] != '' AND $_POST[bereich2] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber2]', '$_POST[bereich2]')");}
|
||||
if ($_POST[ber3] != '' AND $_POST[bereich3] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber3]', '$_POST[bereich3]')");}
|
||||
if ($_POST[ber4] != '' AND $_POST[bereich4] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber4]', '$_POST[bereich4]')");}
|
||||
if ($_POST[ber5] != '' AND $_POST[bereich5] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber5]', '$_POST[bereich5]')");}
|
||||
if ($_POST[ber6] != '' AND $_POST[bereich6] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber6]', '$_POST[bereich6]')");}
|
||||
if ($_POST[ber7] != '' AND $_POST[bereich7] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber7]', '$_POST[bereich7]')");}
|
||||
if ($_POST[ber8] != '' AND $_POST[bereich8] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber8]', '$_POST[bereich8]')");}
|
||||
if ($_POST[ber9] != '' AND $_POST[bereich9] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber9]', '$_POST[bereich9]')");}
|
||||
if ($_POST[ber10] != '' AND $_POST[bereich10] != ''){$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$_POST[ber10]', '$_POST[bereich10]')");}
|
||||
|
||||
$sql = $db->query("DELETE FROM stan_stellenbereiche WHERE bezeichnung = ''");
|
||||
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=bereiche.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Datumsänderung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Sachbereiche erfasst!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "del":
|
||||
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$sql = $db->query("DELETE FROM stan_stellenbereiche WHERE sbid = '$_POST[ber_delete]'");
|
||||
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=bereiche.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Datumsänderung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Sachbereiche gelöscht!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "ubernahme":
|
||||
|
||||
$jahr_neu = $jahrgang-1;
|
||||
|
||||
if($jahr_neu < 10){ // ggf. 0 anfügen, damit es DB konform wird
|
||||
$vorjahr = "0".$jahr_neu;
|
||||
}else{
|
||||
$vorjahr = $jahr_neu;
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$query = "SELECT bezeichnung, kennung
|
||||
FROM stan_stellenbereiche
|
||||
WHERE jahrgang = '$vorjahr'
|
||||
AND
|
||||
(bezeichnung not in (SELECT bezeichnung FROM stan_stellenbereiche WHERE jahrgang = '$jahrgang')
|
||||
OR
|
||||
kennung not in (SELECT kennung FROM stan_stellenbereiche WHERE jahrgang = '$jahrgang')
|
||||
)
|
||||
";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
$sql = $db->query("INSERT INTO stan_stellenbereiche (jahrgang, bezeichnung, kennung) VALUES ('$jahrgang', '$row[bezeichnung]', '$row[kennung]')");
|
||||
}
|
||||
|
||||
echo"<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF'] ."?action=default\">";
|
||||
|
||||
} // Ende Action
|
||||
?>
|
441
admin/#fehlende_pu.php
Normal file
441
admin/#fehlende_pu.php
Normal file
@ -0,0 +1,441 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
require("FCKeditor/fckeditor.php") ;
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_pufehl'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
echo"
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Fehlende PU-Wünsche</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Fehlende PU-Wünsche </font><br>
|
||||
<span class=\"sh\">Nicht abgegeben PU-Wünsche beim V-Zweig</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
|
||||
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\" id=\"AutoNumber1\">
|
||||
<tr>
|
||||
<td width=\"80%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p align=\"left\"><b>Name</b></p>
|
||||
</td>
|
||||
<td width=\"20%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>AG</b>
|
||||
</tr>";
|
||||
$db = dbconnect();
|
||||
|
||||
|
||||
$query = "SELECT Nachname, Vorname, AG, Jahrgang, mail
|
||||
FROM stud
|
||||
LEFT JOIN stan_pu_wunsch USING ( uid )
|
||||
WHERE stan_pu_wunsch.uid IS NULL
|
||||
AND stud.Jahrgang=\"$jahrgang\"
|
||||
AND stud.durchgefallen!=\"Y\"
|
||||
AND stud.stg = 'V'
|
||||
ORDER BY Nachname asc";
|
||||
$result = $db->query($query)
|
||||
or die ("Cannot execute query");
|
||||
while ($row = $result->fetch_array()){
|
||||
echo "
|
||||
<tr>
|
||||
<td width=\"80%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p align=\"left\">
|
||||
<a href='mailto:$row[mail]'>$row[Nachname], $row[Vorname]</a>
|
||||
</td>
|
||||
<td width=\"20%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
$row[AG]/$row[Jahrgang]
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p align='center'>
|
||||
<a href='$_SERVER[PHP_SELF]?action=mail'><img src=\"../images/mail.png\" border='0'></img></a>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>";
|
||||
break;
|
||||
case "mail":
|
||||
$db = dbconnect();
|
||||
|
||||
$result2 = $db->query("SELECT count(*) anzahl
|
||||
FROM stud
|
||||
LEFT JOIN stan_pu_wunsch USING ( uid )
|
||||
WHERE stan_pu_wunsch.uid IS NULL
|
||||
AND stud.Jahrgang=\"$jahrgang\"
|
||||
AND stud.durchgefallen!=\"Y\"
|
||||
AND stud.stg = 'V'");
|
||||
$row2 = $result2->fetch_array();
|
||||
|
||||
|
||||
$result3 = $db->query("SELECT wert2 FROM parameter WHERE pid=4");
|
||||
$row3 = $result3->fetch_array();
|
||||
|
||||
$result_admin = $db->query("SELECT vorname, nachname FROM stan_admin WHERE user='$user_admin'");
|
||||
$row_admin = $result_admin->fetch_array();
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Mail an Wahlpflichtfach</title>
|
||||
</head>
|
||||
<body onload=\"if(document.Mail)document.Mail.betreff.focus();return false;\">
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td align=\"left\" width=\"1%\" width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\" colspan=\"2\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Mail an $stud[vorname] $stud[nachname]</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\">
|
||||
<form method=POST action=$_SERVER[PHP_SELF]?action=ausgabe2 name=Mail>
|
||||
<table width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"><b>Absender:</b></td>
|
||||
<td width=\"70%\" valign=\"top\"><input name=\"sender\" type=\"text\" value='$row_admin[vorname] $row_admin[nachname]' id=\"sender\" size=\"66\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"><b>Mail-Adresse Absender:</b></td>
|
||||
<td width=\"70%\" valign=\"top\"><input name=\"sendermail\" value='$row3[wert2]'type=\"text\" id=\"sendermail\" size=\"66\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"> </td>
|
||||
<td width=\"70%\" valign=\"top\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"><b>Mail-Adresse Empfänger:</b></td>
|
||||
<td width=\"70%\" valign=\"top\">Fehlende Erstanträge - $row2[anzahl] Person(en)";
|
||||
$db = dbconnect();
|
||||
// hidden Button Anfang
|
||||
$result = $db->query("SELECT mail
|
||||
FROM stud
|
||||
LEFT JOIN stan_pu_wunsch USING ( uid )
|
||||
WHERE stan_pu_wunsch.uid IS NULL
|
||||
AND stud.Jahrgang=\"$jahrgang\"
|
||||
AND stud.durchgefallen!=\"Y\"
|
||||
AND stud.stg = 'V'
|
||||
ORDER BY Nachname asc");
|
||||
echo"<input type=\"hidden\" name=\"empfaenger\" id=\"empfaenger\" size=\"66\" value=\"";
|
||||
|
||||
while ($row = $result->fetch_array()){ // While Schleife für hidden Button im Value (Vorgabewert) hidden, damit man nichts verändern kann
|
||||
echo"$row[mail], ";
|
||||
}
|
||||
echo"\">";
|
||||
// hidden Button Ende
|
||||
|
||||
|
||||
echo"
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"> </td>
|
||||
<td width=\"70%\" valign=\"top\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"><b>Betreff:</b></td>
|
||||
<td width=\"70%\" valign=\"top\"><input name=\"betreff\" type=\"text\" id=\"betreff\" size=\"66\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"><b>Nachricht:</b></td>
|
||||
<td width=\"70%\" valign=\"top\">";
|
||||
$oFCKeditor = new FCKeditor('inhalt') ;
|
||||
$oFCKeditor->BasePath = './FCKeditor/';
|
||||
#$oFCKeditor->Value = 'Default text in editor';
|
||||
$oFCKeditor->ToolbarSet = 'Basic';
|
||||
$oFCKeditor->Width = '100%' ;
|
||||
$oFCKeditor->Height = '200' ;
|
||||
$oFCKeditor->Create() ;
|
||||
echo"
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" valign=\"top\"> </td>
|
||||
<td width=\"70%\" valign=\"top\"><input type=checkbox NAME=\"kopie\">Kopie der Mail erhalten</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\">
|
||||
</form>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
|
||||
break;
|
||||
case "ausgabe2":
|
||||
$mtknr=$_COOKIE["ck_mtknr1"];
|
||||
|
||||
$empfaenger = $_POST['empfaenger'];
|
||||
$betreff = $_POST['betreff'];
|
||||
$text = stripslashes( $_POST['inhalt'] );
|
||||
$sender = $_POST['sender'];
|
||||
$sendermail = $_POST['sendermail'];
|
||||
$kopie = $_POST['kopie'];
|
||||
// echo"$empfaenger<p>$betreff<p>$text<p>$sender<p>$sendermail";
|
||||
// Emailversand:
|
||||
if ($kopie)
|
||||
{
|
||||
$empfaenger .= ", $sendermail";
|
||||
}
|
||||
|
||||
|
||||
if($empfaenger == '' OR $betreff == '' OR $text == '' OR $sender == '' OR $sendermail == ''){
|
||||
echo"
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Mailversand</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Pflichtfelder ausfüllen</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br><p align=\"center\"><b>Bitte füllen Sie alle Felder aus!</b>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
## Mailversand:
|
||||
$headers = "From: $sender <$sendermail>\r\n";
|
||||
$headers .= "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-type: text/html; charset=utf-8\r\n";
|
||||
$return = @mail($empfaenger, $betreff, $text, $headers);
|
||||
|
||||
// Bestätigungsseite
|
||||
|
||||
if ($return)
|
||||
{
|
||||
echo"
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Mailversand</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Mailversand erfolgreich</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br><p align=\"center\"><b>Die E-Mail wurde verschickt!</b>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p align=\"center\"><a href=\"fehlende_ant.php\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
} else {
|
||||
echo"
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Mailversand</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Mailversand fehlgeschlagen</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br><p align=\"center\">Die E-Mail wurde <b>nicht</b> verschickt!<br>
|
||||
Eine oder mehrere Mailadressen innerhalb des Empfängerkreises sind ungültig!<br>
|
||||
<br>
|
||||
Bei Fragen wenden Sie sich bitte an <a href=\"mailto:$helpmail?subject=$subject\">$ansprechpart</a>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
} //End if
|
||||
|
||||
|
||||
|
||||
|
||||
} //Ende Action
|
||||
?>
|
204
admin/#liste_pu.php
Normal file
204
admin/#liste_pu.php
Normal file
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_pulist'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
$sort = $_GET["sort"];
|
||||
|
||||
if(!isset($sort)){
|
||||
$sort = "nachname";
|
||||
}
|
||||
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Übersicht über zugewiesene PU-Standorte $stud_jahr[Jahrgang]</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"90%\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Übersicht über zugewiesene PU-Standorte Studienjahrgang $jahrgang</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"30%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'nachname'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=nachname><b>Name, Vorname</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=nachname>Name, Vorname</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"30%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'poStrasse'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poStrasse><b>Straße</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poStrasse>Straße</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"5%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'poplz'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poplz><b>PLZ</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poplz>PLZ</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"15%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'poOrt'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poOrt><b>Ort</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=poOrt>Ort</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"8%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'geburtstag'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=geburtstag><b>Geburtstag</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=geburtstag>Geburtstag</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"8%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'geburtsort'){
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=geburtsort><b>Geburtsort</b></a></font>";
|
||||
}else{
|
||||
echo "<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=geburtsort>Geburtsort</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"8%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'ag'){
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=ag><b>AG</b></a></font>";
|
||||
}else{
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=ag>AG</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"8%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'stg'){
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=stg><b>Zweig</b></a></font>";
|
||||
}else{
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=stg>Zweig</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
<td width=\"30%\" align=\"left\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
";
|
||||
if($sort == 'bezeichnung'){
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=bezeichnung><b>PU-Ort</b></a></font>";
|
||||
}else{
|
||||
echo"<font size=\"2\"><a href=$_SERVER[PHP_SELF]?sort=bezeichnung>PU-Ort</a></font>";
|
||||
}
|
||||
echo"
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
$query = "SELECT a.uid, a.nachname, a.vorname, a.ag, a.jahrgang, a.stg,poOrt, poplz, poStrasse, Date_format(a.geburtstag, '%d.%m.%Y') geb_form, a.geburtstag, a.geburtsort, b.bezeichnung
|
||||
FROM stud a, stan_pu_standorte b, stan_pu_wunsch c
|
||||
WHERE a.uid = c.uid
|
||||
AND b.pusoid = c.ort
|
||||
AND c.prioritaet = '0'
|
||||
AND a.jahrgang='$jahrgang'
|
||||
AND a.durchgefallen='N'
|
||||
ORDER BY $sort, nachname";
|
||||
$result = $db->query($query)
|
||||
or die ("Cannot execute query");
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td width=\"30%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[nachname], $row[vorname]</font>
|
||||
</td>
|
||||
<td width=\"30%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[poStrasse]</font>
|
||||
</td>
|
||||
<td width=\"5%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[poplz]</font>
|
||||
</td>
|
||||
<td width=\"15%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[poOrt]</font>
|
||||
</td>
|
||||
<td width=\"8%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[geb_form]</font>
|
||||
</td>
|
||||
<td width=\"8%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[geburtsort]</font>
|
||||
</td>
|
||||
<td width=\"8%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[ag]/$row[jahrgang]</font></td>
|
||||
<td width=\"8%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[stg]</font></td>
|
||||
<td width=\"30%\" align=\"left\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<font size=\"2\">$row[bezeichnung]</font></td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
echo "
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
?>
|
501
admin/#pu_standorte.php
Normal file
501
admin/#pu_standorte.php
Normal file
@ -0,0 +1,501 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_puort'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
|
||||
echo"
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>PU Standorte</title>
|
||||
<style type='text/css'>
|
||||
select{
|
||||
width:323px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload=\"if(document.anmschluss)document.anmschluss.so1.focus();return false;\">
|
||||
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"80%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=ubernahme"; echo" method=\"POST\" name=\"ubernahme\">
|
||||
<font class=\"hd\">PU Standorte <input type=\"submit\" value=\"Übernahme Vorjahr\" name=\"B1\" size=\"20\"></form></font><br>
|
||||
</form>
|
||||
<font class=\"sh\">eintragen / löschen</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"table2\" name=\"anmschluss\">
|
||||
<tr>
|
||||
<td><br>
|
||||
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
||||
<p align=\"center\"> </p>
|
||||
</td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=eintragen"; echo" method=\"POST\" name=\"anmschluss\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 1:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so1\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 2:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so2\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 3:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so3\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 4:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so4\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 5:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so5\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 6:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so6\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 7:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so7\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 8:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so8\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 9:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so9\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU Standort 10:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"so10\" size=\"50\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type=\"submit\" value=\"Eintragen\" name=\"B1\" size=\"20\"></form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
||||
<p align=\"center\"> </p>
|
||||
</td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=del"; echo" method=\"POST\" name=\"anmschluss\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<br>";
|
||||
$db = dbconnect();
|
||||
$query = "SELECT DISTINCT pusoid, bezeichnung
|
||||
FROM stan_pu_standorte
|
||||
WHERE jahrgang='$jahrgang'
|
||||
ORDER BY bezeichnung ASC
|
||||
";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
echo "<p align=\"center\"><select size=\"5\" name=\"pu_delete\">";
|
||||
while ($row = $result->fetch_array()){
|
||||
$ort_row = "$row[testdatum]|$row[testzeit]|$row[raum]";
|
||||
echo "<option value='$row[pusoid]'>$row[bezeichnung]</option>\n";
|
||||
}
|
||||
echo "</select>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type=\"submit\" value=\"Löschen\" name=\"B1\" size=\"20\"></form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "eintragen":
|
||||
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
if ($_POST[so1] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so1]')");}
|
||||
if ($_POST[so2] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so2]')");}
|
||||
if ($_POST[so3] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so3]')");}
|
||||
if ($_POST[so4] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so4]')");}
|
||||
if ($_POST[so5] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so5]')");}
|
||||
if ($_POST[so6] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so6]')");}
|
||||
if ($_POST[so7] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so7]')");}
|
||||
if ($_POST[so8] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so8]')");}
|
||||
if ($_POST[so9] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so9]')");}
|
||||
if ($_POST[so10] != ''){$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$_POST[so10]')");}
|
||||
|
||||
$sql = $db->query("DELETE FROM stan_pu_standorte WHERE bezeichnung = ''");
|
||||
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=pu_standorte.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Datumsänderung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Standorte erfasst!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "del":
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$result = $db->query("SELECT count(*) anzahl
|
||||
FROM stan_pu_wunsch
|
||||
WHERE ort = '$_POST[pu_delete]'
|
||||
");
|
||||
$row = $result->fetch_array();
|
||||
|
||||
if($row[anzahl] < 1){
|
||||
$sql = $db->query("DELETE FROM stan_pu_standorte WHERE pusoid = '$_POST[pu_delete]'");
|
||||
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=pu_standorte.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Löschung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Standort gelöscht!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
}else{
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"5; URL=pu_standorte.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">keine Löschung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Standort konnte nicht gelöscht werden<br> da er noch in Verwendung ist!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
}
|
||||
|
||||
break;
|
||||
case "ubernahme":
|
||||
|
||||
$jahr_neu = $jahrgang-1;
|
||||
|
||||
if($jahr_neu < 10){ // ggf. 0 anfügen, damit es DB konform wird
|
||||
$vorjahr = "0".$jahr_neu;
|
||||
}else{
|
||||
$vorjahr = $jahr_neu;
|
||||
}
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$query = "SELECT bezeichnung
|
||||
FROM stan_pu_standorte
|
||||
WHERE jahrgang = '$vorjahr'
|
||||
AND bezeichnung not in (SELECT bezeichnung FROM stan_pu_standorte WHERE jahrgang = '$jahrgang')
|
||||
";
|
||||
$result = $db->query ($query)
|
||||
or die ("Cannot execute query");
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
$sql = $db->query("INSERT INTO stan_pu_standorte (jahrgang, bezeichnung) VALUES ('$jahrgang', '$row[bezeichnung]')");
|
||||
}
|
||||
|
||||
echo"<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF'] ."?action=default\">";
|
||||
|
||||
} // Ende Action
|
||||
?>
|
424
admin/#puzuweisung.php
Normal file
424
admin/#puzuweisung.php
Normal file
@ -0,0 +1,424 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_puzuw'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
echo"
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Prioritäten bearbeiten</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td align=\"left\" width=\"1%\" width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\" colspan=\"2\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">PU Prioritäten bearbeiten</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\">
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=bearbeiten"; echo" method=\"POST\" name=\"Wpf_bearb\">
|
||||
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
||||
<tr>
|
||||
<td align='left' width=\"64%\"style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Bezeichnung</b>
|
||||
</td>
|
||||
<td width=\"24%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Teilnehmer (Ist)</b>
|
||||
</td>
|
||||
<td width=\"12%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Auswahl</b>
|
||||
</td>
|
||||
</tr>";
|
||||
$db = dbconnect();
|
||||
$query = "SELECT a.pusoid, a.bezeichnung
|
||||
FROM stan_pu_standorte a
|
||||
WHERE a.jahrgang='$jahrgang'
|
||||
ORDER BY a.bezeichnung";
|
||||
$result = $db->query($query)
|
||||
or die ("Cannot execute query");
|
||||
while ($row = $result->fetch_array()){
|
||||
$result1 = $db->query("SELECT count(*) anzahl
|
||||
FROM stan_pu_wunsch a, stud b
|
||||
WHERE a.uid = b.uid
|
||||
AND b.jahrgang = '$jahrgang'
|
||||
AND a.ort = '$row[pusoid]'
|
||||
AND a.prioritaet = '0'
|
||||
");
|
||||
$row1 = $result1->fetch_array();
|
||||
echo "
|
||||
<tr>
|
||||
<td width=\"64%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p align=\"left\">$row[bezeichnung]</p>
|
||||
</td>
|
||||
<td width=\"24%\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p align=\"center\">$row1[anzahl]</p>
|
||||
</td>
|
||||
<td width=\"12%\" align=\"center\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p>
|
||||
<input type=\"radio\" value=\"$row[pusoid]\" name=\"aus_bearb\" size=\"20\">
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
<br>
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\"></p>
|
||||
</form>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "bearbeiten":
|
||||
|
||||
$db = dbconnect();
|
||||
$sel_pu = $db->query("SELECT bezeichnung FROM stan_pu_standorte WHERE pusoid=\"". $_POST['aus_bearb']."\"");
|
||||
$bez_pu = $sel_pu->fetch_array();
|
||||
|
||||
setcookie("ck_bearbeiten",$_POST['aus_bearb']);
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>PU Prioritäten bearbeiten</title>
|
||||
<style type='text/css'>
|
||||
select{
|
||||
width:200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td align=\"left\" width=\"1%\" width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\" colspan=\"2\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Zuordnung der Studenten zu den PU-Standorten</font><br>
|
||||
<span class=\"sh\">Standort: $bez_pu[bezeichnung]</span>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\">
|
||||
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=bearbeiten2"; echo" method=\"POST\" name=\"PU_bearb\">
|
||||
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#E7E8ED\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"30%\" rowspan=\"2\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Name</b>
|
||||
</td>
|
||||
<td width=\"18%\" align=right rowspan=\"2\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<p align=\"center\"><b>Verschieben</b></p>
|
||||
</td>
|
||||
<td width=\"18%\" align=center rowspan=\"2\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Prio. 1</b></td>
|
||||
<td width=\"18%\" align=center rowspan=\"2\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Prio. 2</b></td>
|
||||
<td width=\"16%\" align=center colspan=\"4\" style=\"border-style: none; border-width: medium\">
|
||||
<b>Anz. Alternativen</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"8%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Prio. 1</b></td>
|
||||
<td width=\"8%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<b>Prio. 2</b></td>
|
||||
</tr>";
|
||||
$db = dbconnect();
|
||||
$result = $db->query("SELECT stud.uid, vorname, nachname, ag, jahrgang, ort, prioritaet
|
||||
FROM stan_pu_wunsch, stud
|
||||
WHERE ort='$_POST[aus_bearb]'
|
||||
AND prioritaet='0'
|
||||
AND stan_pu_wunsch.uid = stud.uid
|
||||
AND stud.durchgefallen != 'Y'
|
||||
AND stud.jahrgang = '$jahrgang'
|
||||
ORDER BY stud.uid");
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
echo "
|
||||
<td width=\"30%\" valign=\"middle\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
$row[nachname], $row[vorname] ($row[ag]/$row[jahrgang])
|
||||
</td>
|
||||
<td width=\"18%\" align='left' valign=\"middle\" style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
<select size=1 name=$row[uid]>";
|
||||
$db = dbconnect();
|
||||
$result0 = $db->query("SELECT a.pusoid, bezeichnung
|
||||
FROM stan_pu_standorte a, stan_pu_wunsch b
|
||||
WHERE a.pusoid = b.ort
|
||||
AND b.uid = '$row[uid]'
|
||||
AND b.prioritaet = '0'");
|
||||
$row0 = $result0->fetch_array();
|
||||
|
||||
$result1 = $db->query("SELECT a.pusoid, bezeichnung
|
||||
FROM stan_pu_standorte a, stan_pu_wunsch b
|
||||
WHERE a.pusoid = b.ort
|
||||
AND b.uid = '$row[uid]'
|
||||
AND b.prioritaet = '1'");
|
||||
$row1 = $result1->fetch_array();
|
||||
|
||||
$result2 = $db->query("SELECT a.pusoid, bezeichnung
|
||||
FROM stan_pu_standorte a, stan_pu_wunsch b
|
||||
WHERE a.pusoid = b.ort
|
||||
AND b.uid = '$row[uid]'
|
||||
AND b.prioritaet = '2'");
|
||||
$row2 = $result2->fetch_array();
|
||||
|
||||
$query3 = "SELECT a.pusoid, bezeichnung
|
||||
FROM stan_pu_standorte a
|
||||
WHERE a.jahrgang = '$jahrgang'";
|
||||
$result3 = $db->query($query3);
|
||||
|
||||
echo"
|
||||
<option value=$row0[pusoid]>Admin: $row0[bezeichnung]</option>
|
||||
<option value=$row1[pusoid]>Erstwahl: $row1[bezeichnung]</option>
|
||||
<option value=$row2[pusoid]>Zweitwahl: $row2[bezeichnung]</option>
|
||||
";
|
||||
while ($row3 = $result3->fetch_array()){
|
||||
echo"<option value=$row3[pusoid]>$row3[bezeichnung]</option>";
|
||||
}
|
||||
echo"
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td width=\"18%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
$row1[bezeichnung]
|
||||
</td>
|
||||
<td width=\"18%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">
|
||||
$row2[bezeichnung]
|
||||
</td>
|
||||
<td width=\"8%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">";
|
||||
$db = dbconnect();
|
||||
$result1a = $db->query("SELECT count(*) anzahl
|
||||
FROM stan_pu_wunsch a, stud b
|
||||
WHERE a.uid = b.uid
|
||||
AND b.jahrgang = '$jahrgang'
|
||||
AND a.ort = '$row1[pusoid]'
|
||||
AND a.prioritaet = '0'");
|
||||
$row1a = $result1a->fetch_array();
|
||||
|
||||
echo "
|
||||
$row1a[anzahl]
|
||||
</td>
|
||||
<td width=\"8%\" align=center style=\"border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1px\">";
|
||||
$db = dbconnect();
|
||||
$result2a = $db->query("SELECT count(*) anzahl
|
||||
FROM stan_pu_wunsch a, stud b
|
||||
WHERE a.uid = b.uid
|
||||
AND b.jahrgang = '$jahrgang'
|
||||
AND a.ort = '$row2[pusoid]'
|
||||
AND a.prioritaet = '0'");
|
||||
$row2a = $result2a->fetch_array();
|
||||
|
||||
echo "
|
||||
$row2a[anzahl]
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
echo "
|
||||
</table>
|
||||
<br>
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\"></p>
|
||||
</form>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
|
||||
break;
|
||||
case "bearbeiten2":
|
||||
|
||||
$ck_bearbeiten=$_COOKIE["ck_bearbeiten"];
|
||||
|
||||
$db = dbconnect();
|
||||
$result8 = $db->query("SELECT uid, prioritaet FROM stan_pu_wunsch WHERE ort='$ck_bearbeiten' and prioritaet='0'");
|
||||
|
||||
while ($row8 = mysql_fetch_array($result8, MYSQL_NUM)){
|
||||
$stud="$row8[0]";
|
||||
$sql = $db->query ("UPDATE stan_pu_wunsch SET ort=\"". $_POST[$stud]."\" WHERE uid='$row8[0]' and prioritaet='0'"); // hier entspricht die uid den namen des Dropdownfeldes in der der neue Ort des PU steht
|
||||
}
|
||||
if($sql){
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=puzuweisung.php\">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Aktualisierung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Aktualisierung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Standorte wurde aktualisiert!</b>
|
||||
</p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
}else{
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"5; URL=puzuweisung.php\">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Aktualisierung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Aktualisierung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Es trat ein Fehler auf!<br>Keine Aktualisierung</b>
|
||||
</p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
} // Ende Wenn update fehlgeschlagne
|
||||
} //Ende Action Abfrage
|
||||
?>
|
638
admin/#sperrzeiten.php
Normal file
638
admin/#sperrzeiten.php
Normal file
@ -0,0 +1,638 @@
|
||||
<?php
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
$jahrgang=$_COOKIE["jahrgang"];
|
||||
|
||||
if ($jahrgang == ""){ require("jahrgang.php"); exit;} //Wenn man kein Jahrgang ausgewählt hat wird die Jahrgangsauswahlseite geladen
|
||||
include("kurs/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
|
||||
// Rechteüberprüfung
|
||||
$db = dbconnect();
|
||||
if ($user_admin == ""){ require("index.php"); exit;} //Wenn man nicht angemeldet ist, darf man nicht auf die Seite
|
||||
$result = $db->query("SELECT 1 FROM stan_admin_rechte, stan_admin_rechte_zuord , stan_admin where stan_admin_rechte.stan_admin_rolle = stan_admin_rechte_zuord.stan_admin_rolle AND stan_admin_rechte_zuord.said = stan_admin.said AND stan_admin.user = '$user_admin' AND stan_admin_rechte_zuord.stan_admin_rolle = 'a_sperrfr'");
|
||||
$row = $result->fetch_array();
|
||||
if ($row[0] != 1){ include("kurs/rechte.php"); exit;}
|
||||
// Rechteüberprüfung ende
|
||||
|
||||
|
||||
if (isset($_GET['action']))
|
||||
$action = $_GET['action'];
|
||||
else
|
||||
$action = "";
|
||||
|
||||
switch($action){
|
||||
default:
|
||||
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$frist_beg_v = $db->query("SELECT DATE_Format(beginn, '%d') tag_anmbeg_v,
|
||||
DATE_Format(beginn, '%m') mon_anmbeg_v,
|
||||
DATE_Format(beginn, '%Y') jahr_anmbeg_v,
|
||||
DATE_Format(ende, '%d') tag_ende_v,
|
||||
DATE_Format(ende, '%m') mon_ende_v,
|
||||
DATE_Format(ende, '%Y') jahr_ende_v
|
||||
FROM stan_sperrzeit
|
||||
WHERE kennung = 'V'
|
||||
AND jahrgang='$jahrgang'");
|
||||
$anmelde_v = $frist_beg_v->fetch_array();
|
||||
|
||||
$frist_beg_w = $db->query("SELECT DATE_Format(beginn, '%d') tag_anmbeg_w,
|
||||
DATE_Format(beginn, '%m') mon_anmbeg_w,
|
||||
DATE_Format(beginn, '%Y') jahr_anmbeg_w,
|
||||
DATE_Format(ende, '%d') tag_ende_w,
|
||||
DATE_Format(ende, '%m') mon_ende_w,
|
||||
DATE_Format(ende, '%Y') jahr_ende_w
|
||||
FROM stan_sperrzeit
|
||||
WHERE kennung = 'W'
|
||||
AND jahrgang='$jahrgang'");
|
||||
$anmelde_w = $frist_beg_w->fetch_array();
|
||||
|
||||
$frist_beg_a = $db->query("SELECT DATE_Format(beginn, '%d') tag_anmbeg_a,
|
||||
DATE_Format(beginn, '%m') mon_anmbeg_a,
|
||||
DATE_Format(beginn, '%Y') jahr_anmbeg_a,
|
||||
DATE_Format(ende, '%d') tag_ende_a,
|
||||
DATE_Format(ende, '%m') mon_ende_a,
|
||||
DATE_Format(ende, '%Y') jahr_ende_a
|
||||
FROM stan_sperrzeit
|
||||
WHERE kennung = 'A'
|
||||
AND jahrgang='$jahrgang'");
|
||||
$anmelde_a = $frist_beg_a->fetch_array();
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Sperrfristen</title>
|
||||
</head>
|
||||
|
||||
<body onload=\"if(document.anmschluss)document.anmschluss.beg_tag_v.focus();return false;\">
|
||||
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"80%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_top.gif\" valign=\"top\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<font class=\"hd\">Sperrfristen</font><br>
|
||||
<font class=\"sh\">Jahrgang: $jahrgang<br>In dieser Zeit können keine Praxisstellen belegt werden</font><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"table2\" name=\"anmschluss\">
|
||||
<tr>
|
||||
<td><br>
|
||||
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_e1a.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_top1.gif\" valign=\"top\">
|
||||
<p align=\"center\"> </p>
|
||||
</td>
|
||||
<td align=\"right\" width=\"1%\" background=\"../images/box_e2a.gif\"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td>
|
||||
<form action="; echo $_SERVER['PHP_SELF'] . "?action=schluss"; echo" method=\"POST\" name=\"anmschluss\">
|
||||
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; border-left-width:0; border-right-width:0; border-bottom-width:0\" bordercolor=\"#111111\" width=\"100%\">
|
||||
<tr>
|
||||
<td width=\"30%\">
|
||||
<p style=\"margin:10 4; \">PU V-Zweig:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\" >
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"beg_tag_v\" size=\"1\" value=\"$anmelde_v[tag_anmbeg_v]\">.<input type=\"text\" name=\"beg_mon_v\" size=\"1\" value=\"$anmelde_v[mon_anmbeg_v]\">.<input type=\"text\" name=\"beg_jahr_v\" size=\"3\" value=\"$anmelde_v[jahr_anmbeg_v]\"> bis <input type=\"text\" name=\"end_tag_v\" size=\"1\" value=\"$anmelde_v[tag_ende_v]\">.<input type=\"text\" name=\"end_mon_v\" size=\"1\" value=\"$anmelde_v[mon_ende_v]\">.<input type=\"text\" name=\"end_jahr_v\" size=\"3\" value=\"$anmelde_v[jahr_ende_v]\">
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" >
|
||||
<p style=\"margin:10 4; \">PU W-Zweig:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\">
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"beg_tag_w\" size=\"1\" value=\"$anmelde_w[tag_anmbeg_w]\">.<input type=\"text\" name=\"beg_mon_w\" size=\"1\" value=\"$anmelde_w[mon_anmbeg_w]\">.<input type=\"text\" name=\"beg_jahr_w\" size=\"3\" value=\"$anmelde_w[jahr_anmbeg_w]\"> bis <input type=\"text\" name=\"end_tag_w\" size=\"1\" value=\"$anmelde_w[tag_ende_w]\">.<input type=\"text\" name=\"end_mon_w\" size=\"1\" value=\"$anmelde_w[mon_ende_w]\">.<input type=\"text\" name=\"end_jahr_w\" size=\"3\" value=\"$anmelde_w[jahr_ende_w]\">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"30%\" >
|
||||
<p style=\"margin:10 4; \">Ausland:
|
||||
</td>
|
||||
<td width=\"70%\" align=\"left\">
|
||||
<p style=\"margin:10 4; \">
|
||||
<input type=\"text\" name=\"beg_tag_a\" size=\"1\" value=\"$anmelde_a[tag_anmbeg_a]\">.<input type=\"text\" name=\"beg_mon_a\" size=\"1\" value=\"$anmelde_a[mon_anmbeg_a]\">.<input type=\"text\" name=\"beg_jahr_a\" size=\"3\" value=\"$anmelde_a[jahr_anmbeg_a]\"> bis <input type=\"text\" name=\"end_tag_a\" size=\"1\" value=\"$anmelde_a[tag_ende_a]\">.<input type=\"text\" name=\"end_mon_a\" size=\"1\" value=\"$anmelde_a[mon_ende_a]\">.<input type=\"text\" name=\"end_jahr_a\" size=\"3\" value=\"$anmelde_a[jahr_ende_a]\">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\"> </td>
|
||||
<td align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<input type=\"submit\" value=\"Abschicken\" name=\"B1\" size=\"20\"></form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>";
|
||||
|
||||
break;
|
||||
case "schluss":
|
||||
|
||||
|
||||
if (checkdate($_POST[beg_mon_v], $_POST[beg_tag_v], $_POST[beg_jahr_v]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Beginn der Sperrfrist des PU V-Zweigs ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
if (checkdate($_POST[end_mon_v], $_POST[end_tag_v], $_POST[end_jahr_v]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Ende der Sperrfrist des PU V-Zweigs ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
|
||||
|
||||
|
||||
if (checkdate($_POST[beg_mon_w], $_POST[beg_tag_w], $_POST[beg_jahr_w]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Beginn der Sperrfrist des PU W-Zweigs ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
if (checkdate($_POST[end_mon_w], $_POST[end_tag_w], $_POST[end_jahr_w]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Ende der Sperrfrist des PU W-Zweigs ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
|
||||
|
||||
if (checkdate($_POST[beg_mon_a], $_POST[beg_tag_a], $_POST[beg_jahr_a]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Beginn der Sperrfrist der Auslandsstelle ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
if (checkdate($_POST[end_mon_a], $_POST[end_tag_a], $_POST[end_jahr_a]) == 0) { // checkdate liefert 0 & 1 zurück: 0 wenn Datum falsch, 1 wenn Datum richtig
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Falsches Datum</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Falsches Datum</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Die Datumseingabe beim Ende der Sperrfrist der Auslandsstelle ist falsch!</p></b>
|
||||
</p>
|
||||
<p align=\"center\"><a href=\"javascript:history.back()\">
|
||||
<img border=\"0\" src=\"../images/zurueck.gif\" width=\"77\" height=\"22\"></a><br>
|
||||
</p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p></p>
|
||||
<p><br>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
exit;
|
||||
} // Ende Datumsüberprüfung
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$beg_dat_v = "$_POST[beg_jahr_v]-$_POST[beg_mon_v]-$_POST[beg_tag_v]";
|
||||
$end_dat_v = "$_POST[end_jahr_v]-$_POST[end_mon_v]-$_POST[end_tag_v]";
|
||||
|
||||
$beg_dat_w = "$_POST[beg_jahr_w]-$_POST[beg_mon_w]-$_POST[beg_tag_w]";
|
||||
$end_dat_w = "$_POST[end_jahr_w]-$_POST[end_mon_w]-$_POST[end_tag_w]";
|
||||
|
||||
$beg_dat_a = "$_POST[beg_jahr_a]-$_POST[beg_mon_a]-$_POST[beg_tag_a]";
|
||||
$end_dat_a = "$_POST[end_jahr_a]-$_POST[end_mon_a]-$_POST[end_tag_a]";
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
$sql = $db->query ("DELETE FROM stan_sperrzeit WHERE jahrgang='$jahrgang'");
|
||||
$sql = $db->query("INSERT INTO stan_sperrzeit (jahrgang, beginn, ende, kennung) VALUES ('$jahrgang', '$beg_dat_v', '$end_dat_v', 'V')");
|
||||
$sql = $db->query("INSERT INTO stan_sperrzeit (jahrgang, beginn, ende, kennung) VALUES ('$jahrgang', '$beg_dat_w', '$end_dat_w', 'W')");
|
||||
$sql = $db->query("INSERT INTO stan_sperrzeit (jahrgang, beginn, ende, kennung) VALUES ('$jahrgang', '$beg_dat_a', '$end_dat_a', 'A')");
|
||||
|
||||
echo "
|
||||
<meta http-equiv=\"refresh\" content=\"1; URL=sperrzeiten.php\">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
|
||||
<link rel=\"stylesheet\" href=\"../styles_pc.css\" type=\"text/css\">
|
||||
<title>Datumsänderung</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border=\"0\" style=\"border-collapse: collapse\" width=\"100%\" cellpadding=\"0\" height=\"100%\" id=\"table1\">
|
||||
<tr>
|
||||
<td>
|
||||
<div align=\"center\">
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" width=\"550\" border=\"0\">
|
||||
<tr>
|
||||
<td width=\"10\" background=\"../images/box_e1.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"3%\" background=\"../images/box_top.gif\" valign=\"top\"></td>
|
||||
<td width=\"95%\" background=\"../images/box_top.gif\">
|
||||
<img height=\"10\" src=\"../images/blank.gif\" width=\"1\"><br>
|
||||
<span class=\"sh\">Datumsänderung</span><br>
|
||||
<img height=\"5\" src=\"../images/blank.gif\" width=\"1\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e2.gif\">
|
||||
<img height=\"40\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=\"1%\" background=\"../images/box_l.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td colspan=\"2\"><br>
|
||||
<p align=\"center\"><b>Das Datum wurde aktualisiert!</b>
|
||||
</p>
|
||||
</p>
|
||||
</td>
|
||||
<td width=\"1%\" background=\"../images/box_r.gif\">
|
||||
<img height=\"1\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"1%\" background=\"../images/box_e3.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"left\" width=\"98%\" background=\"../images/box_bottom.gif\" colspan=\"2\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"8\"></td>
|
||||
<td nowrap=\"nowrap\" align=\"right\" width=\"1%\" background=\"../images/box_e4.gif\">
|
||||
<img height=\"16\" src=\"../images/blank.gif\" width=\"22\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
} // Ende Action
|
||||
?>
|
30
admin/FCKeditor/_documentation.html
Normal file
30
admin/FCKeditor/_documentation.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Documentation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<style type="text/css">
|
||||
body { font-family: arial, verdana, sans-serif }
|
||||
p { margin-left: 20px }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor Documentation</h1>
|
||||
<p>
|
||||
You can find the official documentation for FCKeditor online, at <a href="http://wiki.fckeditor.net/">
|
||||
http://wiki.fckeditor.net/</a>.</p>
|
||||
</body>
|
||||
</html>
|
34
admin/FCKeditor/_samples/_plugins/findreplace/fckplugin.js
Normal file
34
admin/FCKeditor/_samples/_plugins/findreplace/fckplugin.js
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckplugin.js
|
||||
* This is the sample plugin definition file.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
// Register the related commands.
|
||||
FCKCommands.RegisterCommand( 'My_Find' , new FCKDialogCommand( FCKLang['DlgMyFindTitle'] , FCKLang['DlgMyFindTitle'] , FCKConfig.PluginsPath + 'findreplace/find.html' , 340, 170 ) ) ;
|
||||
FCKCommands.RegisterCommand( 'My_Replace' , new FCKDialogCommand( FCKLang['DlgMyReplaceTitle'], FCKLang['DlgMyReplaceTitle'] , FCKConfig.PluginsPath + 'findreplace/replace.html', 340, 200 ) ) ;
|
||||
|
||||
// Create the "Find" toolbar button.
|
||||
var oFindItem = new FCKToolbarButton( 'My_Find', FCKLang['DlgMyFindTitle'] ) ;
|
||||
oFindItem.IconPath = FCKConfig.PluginsPath + 'findreplace/find.gif' ;
|
||||
|
||||
FCKToolbarItems.RegisterItem( 'My_Find', oFindItem ) ; // 'My_Find' is the name used in the Toolbar config.
|
||||
|
||||
// Create the "Replace" toolbar button.
|
||||
var oReplaceItem = new FCKToolbarButton( 'My_Replace', FCKLang['DlgMyReplaceTitle'] ) ;
|
||||
oReplaceItem.IconPath = FCKConfig.PluginsPath + 'findreplace/replace.gif' ;
|
||||
|
||||
FCKToolbarItems.RegisterItem( 'My_Replace', oReplaceItem ) ; // 'My_Replace' is the name used in the Toolbar config.
|
BIN
admin/FCKeditor/_samples/_plugins/findreplace/find.gif
Normal file
BIN
admin/FCKeditor/_samples/_plugins/findreplace/find.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 595 B |
168
admin/FCKeditor/_samples/_plugins/findreplace/find.html
Normal file
168
admin/FCKeditor/_samples/_plugins/findreplace/find.html
Normal file
@ -0,0 +1,168 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: find.html
|
||||
* This is the sample "Find" plugin window.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta content="noindex, nofollow" name="robots">
|
||||
<script type="text/javascript">
|
||||
|
||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
// Whole word is available on IE only.
|
||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||
document.getElementById('divWord').style.display = '' ;
|
||||
|
||||
// First of all, translate the dialog box texts.
|
||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||
|
||||
window.parent.SetAutoSize( true ) ;
|
||||
}
|
||||
|
||||
function btnStat(frm)
|
||||
{
|
||||
document.getElementById('btnFind').disabled =
|
||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||
}
|
||||
|
||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
|
||||
{
|
||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||
{
|
||||
var oNode = parentNode.childNodes[i] ;
|
||||
if ( oNode.nodeType == 3 )
|
||||
{
|
||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||
if ( oNode.nodeValue != sReplaced )
|
||||
{
|
||||
oNode.nodeValue = sReplaced ;
|
||||
if ( ! replaceAll )
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
function GetRegexExpr()
|
||||
{
|
||||
if ( document.getElementById('chkWord').checked )
|
||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
||||
else
|
||||
var sExpr = document.getElementById('txtFind').value ;
|
||||
|
||||
return sExpr ;
|
||||
}
|
||||
|
||||
function GetCase()
|
||||
{
|
||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||
}
|
||||
|
||||
function Ok()
|
||||
{
|
||||
if ( document.getElementById('txtFind').value.length == 0 )
|
||||
return ;
|
||||
|
||||
if ( oEditor.FCKBrowserInfo.IsIE )
|
||||
FindIE() ;
|
||||
else
|
||||
FindGecko() ;
|
||||
}
|
||||
|
||||
var oRange = null ;
|
||||
|
||||
function FindIE()
|
||||
{
|
||||
if ( oRange == null )
|
||||
oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
|
||||
|
||||
var iFlags = 0 ;
|
||||
|
||||
if ( chkCase.checked )
|
||||
iFlags = iFlags | 4 ;
|
||||
|
||||
if ( chkWord.checked )
|
||||
iFlags = iFlags | 2 ;
|
||||
|
||||
var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
|
||||
|
||||
if ( bFound )
|
||||
{
|
||||
oRange.scrollIntoView() ;
|
||||
oRange.select() ;
|
||||
oRange.collapse(false) ;
|
||||
oLastRangeFound = oRange ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oRange = null ;
|
||||
alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
|
||||
}
|
||||
}
|
||||
|
||||
function FindGecko()
|
||||
{
|
||||
var bCase = document.getElementById('chkCase').checked ;
|
||||
var bWord = document.getElementById('chkWord').checked ;
|
||||
|
||||
// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
|
||||
oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) ;
|
||||
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
||||
<div align="center">
|
||||
This is my Plugin!
|
||||
</div>
|
||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
||||
<tr>
|
||||
<td nowrap>
|
||||
<label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
||||
</td>
|
||||
<td width="100%">
|
||||
<input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
||||
</td>
|
||||
<td>
|
||||
<input id="btnFind" style="WIDTH: 100%; PADDING-RIGHT: 5px; PADDING-LEFT: 5px" disabled
|
||||
onclick="Ok();" type="button" value="Find" fckLang="DlgMyFindFindBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom" colSpan="3">
|
||||
<input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
||||
case</label>
|
||||
<br>
|
||||
<div id="divWord" style="DISPLAY: none">
|
||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
||||
whole word</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/en.js
Normal file
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/en.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: en.js
|
||||
* English language file for the sample plugin.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Replace' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Find what:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Replace with:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Match case' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Replace' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Replace All' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Match whole word' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Find' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Find' ;
|
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/fr.js
Normal file
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/fr.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fr.js
|
||||
* French language file for the sample plugin.
|
||||
*
|
||||
* File Authors:
|
||||
* Benjamin Cartereau (b.cartereau@infass.com)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Remplacer' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Chercher:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Remplacer par:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Respecter la casse' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Remplacer' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Remplacer Tout' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Mot entier' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Chercher' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Chercher' ;
|
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/it.js
Normal file
29
admin/FCKeditor/_samples/_plugins/findreplace/lang/it.js
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: it.js
|
||||
* Italian language file for the sample plugin.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
FCKLang['DlgMyReplaceTitle'] = 'Plugin - Sostituisci' ;
|
||||
FCKLang['DlgMyReplaceFindLbl'] = 'Trova:' ;
|
||||
FCKLang['DlgMyReplaceReplaceLbl'] = 'Sostituisci con:' ;
|
||||
FCKLang['DlgMyReplaceCaseChk'] = 'Maiuscole/minuscole' ;
|
||||
FCKLang['DlgMyReplaceReplaceBtn'] = 'Sostituisci' ;
|
||||
FCKLang['DlgMyReplaceReplAllBtn'] = 'Sostituisci tutto' ;
|
||||
FCKLang['DlgMyReplaceWordChk'] = 'Parola intera' ;
|
||||
|
||||
FCKLang['DlgMyFindTitle'] = 'Plugin - Cerca' ;
|
||||
FCKLang['DlgMyFindFindBtn'] = 'Cerca' ;
|
BIN
admin/FCKeditor/_samples/_plugins/findreplace/replace.gif
Normal file
BIN
admin/FCKeditor/_samples/_plugins/findreplace/replace.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
131
admin/FCKeditor/_samples/_plugins/findreplace/replace.html
Normal file
131
admin/FCKeditor/_samples/_plugins/findreplace/replace.html
Normal file
@ -0,0 +1,131 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: replace.html
|
||||
* This is the sample "Replace" plugin window.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta content="noindex, nofollow" name="robots">
|
||||
<script type="text/javascript">
|
||||
|
||||
var oEditor = window.parent.InnerDialogLoaded() ;
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
// First of all, translate the dialog box texts
|
||||
oEditor.FCKLanguageManager.TranslatePage( document ) ;
|
||||
|
||||
window.parent.SetAutoSize( true ) ;
|
||||
}
|
||||
|
||||
function btnStat(frm)
|
||||
{
|
||||
document.getElementById('btnReplace').disabled =
|
||||
document.getElementById('btnReplaceAll').disabled =
|
||||
( document.getElementById('txtFind').value.length == 0 ) ;
|
||||
}
|
||||
|
||||
function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll, hasFound )
|
||||
{
|
||||
for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
|
||||
{
|
||||
var oNode = parentNode.childNodes[i] ;
|
||||
if ( oNode.nodeType == 3 )
|
||||
{
|
||||
var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
|
||||
if ( oNode.nodeValue != sReplaced )
|
||||
{
|
||||
oNode.nodeValue = sReplaced ;
|
||||
if ( ! replaceAll )
|
||||
return true ;
|
||||
hasFound = true ;
|
||||
}
|
||||
}
|
||||
|
||||
hasFound = ReplaceTextNodes( oNode, regex, replaceValue, replaceAll, hasFound ) ;
|
||||
if ( ! replaceAll && hasFound )
|
||||
return true ;
|
||||
}
|
||||
|
||||
return hasFound ;
|
||||
}
|
||||
|
||||
function GetRegexExpr()
|
||||
{
|
||||
if ( document.getElementById('chkWord').checked )
|
||||
var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
|
||||
else
|
||||
var sExpr = document.getElementById('txtFind').value ;
|
||||
|
||||
return sExpr ;
|
||||
}
|
||||
|
||||
function GetCase()
|
||||
{
|
||||
return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
|
||||
}
|
||||
|
||||
function Replace()
|
||||
{
|
||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() ) ;
|
||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, false ) ;
|
||||
}
|
||||
|
||||
function ReplaceAll()
|
||||
{
|
||||
var oRegex = new RegExp( GetRegexExpr(), GetCase() + 'g' ) ;
|
||||
ReplaceTextNodes( oEditor.FCK.EditorDocument.body, oRegex, document.getElementById('txtReplace').value, true ) ;
|
||||
window.parent.Cancel() ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="OnLoad()" scroll="no" style="OVERFLOW: hidden">
|
||||
<div align="center">
|
||||
This is my Plugin!
|
||||
</div>
|
||||
<table cellSpacing="3" cellPadding="2" width="100%" border="0">
|
||||
<tr>
|
||||
<td noWrap><label for="txtFind" fckLang="DlgMyReplaceFindLbl">Find what:</label>
|
||||
</td>
|
||||
<td width="100%"><input id="txtFind" onkeyup="btnStat(this.form)" style="WIDTH: 100%" tabIndex="1" type="text">
|
||||
</td>
|
||||
<td><input id="btnReplace" style="WIDTH: 100%" disabled onclick="Replace();" type="button"
|
||||
value="Replace" fckLang="DlgMyReplaceReplaceBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td vAlign="top" nowrap><label for="txtReplace" fckLang="DlgMyReplaceReplaceLbl">Replace
|
||||
with:</label>
|
||||
</td>
|
||||
<td vAlign="top"><input id="txtReplace" style="WIDTH: 100%" tabIndex="2" type="text">
|
||||
</td>
|
||||
<td><input id="btnReplaceAll" disabled onclick="ReplaceAll()" type="button" value="Replace All"
|
||||
fckLang="DlgMyReplaceReplAllBtn">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td vAlign="bottom" colSpan="3"> <input id="chkCase" tabIndex="3" type="checkbox"><label for="chkCase" fckLang="DlgMyReplaceCaseChk">Match
|
||||
case</label>
|
||||
<br>
|
||||
<input id="chkWord" tabIndex="4" type="checkbox"><label for="chkWord" fckLang="DlgMyReplaceWordChk">Match
|
||||
whole word</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
69
admin/FCKeditor/_samples/_plugins/samples/fckplugin.js
Normal file
69
admin/FCKeditor/_samples/_plugins/samples/fckplugin.js
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckplugin.js
|
||||
* This is a sample plugin definition file.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
// Here we define our custom Style combo, with custom widths.
|
||||
var oMyBigStyleCombo = new FCKToolbarStyleCombo() ;
|
||||
oMyBigStyleCombo.FieldWidth = 250 ;
|
||||
oMyBigStyleCombo.PanelWidth = 300 ;
|
||||
FCKToolbarItems.RegisterItem( 'My_BigStyle', oMyBigStyleCombo ) ;
|
||||
|
||||
|
||||
// ##### Defining a custom context menu entry.
|
||||
|
||||
// ## 1. Define the command to be executed when selecting the context menu item.
|
||||
var oMyCMCommand = new Object() ;
|
||||
oMyCMCommand.Name = 'OpenImage' ;
|
||||
|
||||
// This is the standard function used to execute the command (called when clicking in the context menu item).
|
||||
oMyCMCommand.Execute = function()
|
||||
{
|
||||
// This command is called only when an image element is selected (IMG).
|
||||
// Get image URL (src).
|
||||
var sUrl = FCKSelection.GetSelectedElement().src ;
|
||||
|
||||
// Open the URL in a new window.
|
||||
window.top.open( sUrl ) ;
|
||||
}
|
||||
|
||||
// This is the standard function used to retrieve the command state (it could be disabled for some reason).
|
||||
oMyCMCommand.GetState = function()
|
||||
{
|
||||
// Let's make it always enabled.
|
||||
return FCK_TRISTATE_OFF ;
|
||||
}
|
||||
|
||||
// ## 2. Register our custom command.
|
||||
FCKCommands.RegisterCommand( 'OpenImage', oMyCMCommand ) ;
|
||||
|
||||
// ## 3. Define the context menu "listener".
|
||||
var oMyContextMenuListener = new Object() ;
|
||||
|
||||
// This is the standard function called right before sowing the context menu.
|
||||
oMyContextMenuListener.AddItems = function( contextMenu, tag, tagName )
|
||||
{
|
||||
// Let's show our custom option only for images.
|
||||
if ( tagName == 'IMG' )
|
||||
{
|
||||
contextMenu.AddSeparator() ;
|
||||
contextMenu.AddItem( 'OpenImage', 'Open image in a new window (Custom)' ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// ## 4. Register our context menu listener.
|
||||
FCK.ContextMenu.RegisterListener( oMyContextMenuListener ) ;
|
1
admin/FCKeditor/_samples/afp/fck.afpa
Normal file
1
admin/FCKeditor/_samples/afp/fck.afpa
Normal file
@ -0,0 +1 @@
|
||||
<application ID="fck"/>
|
121
admin/FCKeditor/_samples/afp/fck.afpa.code
Normal file
121
admin/FCKeditor/_samples/afp/fck.afpa.code
Normal file
@ -0,0 +1,121 @@
|
||||
DEFINE CLASS fckeditor AS custom
|
||||
cInstanceName =""
|
||||
BasePath =""
|
||||
cWIDTH =""
|
||||
cHEIGHT =""
|
||||
ToolbarSet =""
|
||||
cValue=""
|
||||
DIMENSION aConfig(10,2)
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION fckeditor( tcInstanceName )
|
||||
LOCAL lnLoop,lnLoop2
|
||||
THIS.cInstanceName = tcInstanceName
|
||||
THIS.BasePath = '../../'
|
||||
THIS.cWIDTH = '100%'
|
||||
THIS.cHEIGHT = '200'
|
||||
THIS.ToolbarSet = 'Default'
|
||||
THIS.cValue = ''
|
||||
FOR lnLoop=1 TO 10
|
||||
FOR lnLoop2=1 TO 2
|
||||
THIS.aConfig(lnLoop,lnLoop2) = ""
|
||||
NEXT
|
||||
NEXT
|
||||
RETURN
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CREATE()
|
||||
RETURN(THIS.CreateHtml())
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CreateHtml()
|
||||
LOCAL html
|
||||
LOCAL lcLink
|
||||
|
||||
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
|
||||
|
||||
html = [<div>]
|
||||
IF THIS.IsCompatible()
|
||||
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
|
||||
|
||||
IF ( THIS.ToolbarSet # '' )
|
||||
lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet
|
||||
ENDIF
|
||||
|
||||
&& Render the LINKED HIDDEN FIELD.
|
||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[">]
|
||||
|
||||
&& Render the configurations HIDDEN FIELD.
|
||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [">] +CHR(13)+CHR(10)
|
||||
|
||||
&& Render the EDITOR IFRAME.
|
||||
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="]+lcLink+[" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="0" scrolling="no"></iframe>]
|
||||
ELSE
|
||||
IF ( AT("%", THIS.cWIDTH)=0 )
|
||||
WidthCSS = THIS.cWIDTH + 'px'
|
||||
ELSE
|
||||
WidthCSS = THIS.cWIDTH
|
||||
ENDIF
|
||||
|
||||
IF ( AT("%",THIS.cHEIGHT)=0 )
|
||||
HeightCSS = THIS.cHEIGHT + 'px'
|
||||
ELSE
|
||||
HeightCSS = THIS.cHEIGHT
|
||||
ENDIF
|
||||
|
||||
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[" wrap="virtual">]+HtmlValue+[</textarea>]
|
||||
ENDIF
|
||||
|
||||
html = html + [</div>]
|
||||
|
||||
RETURN (html)
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION IsCompatible()
|
||||
LOCAL llRetval
|
||||
LOCAL sAgent
|
||||
|
||||
llRetval=.F.
|
||||
|
||||
sAgent= LOWER(Request.ServerVariables("HTTP_USER_AGENT"))
|
||||
|
||||
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
|
||||
llRetval= iVersion > 5.5
|
||||
ELSE
|
||||
IF AT("gecko",sAgent)>0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
|
||||
llRetval =iVersion > 20030210
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN (llRetval)
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION GetConfigFieldString()
|
||||
LOCAL sParams
|
||||
LOCAL bFirst
|
||||
LOCAL sKey
|
||||
sParams = ""
|
||||
bFirst = .T.
|
||||
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
|
||||
IF !EMPTY(THIS.aConfig(lnLoop,1))
|
||||
IF bFirst = .F.
|
||||
sParams = sParams + "&"
|
||||
ELSE
|
||||
bFirst = .F.
|
||||
ENDIF
|
||||
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
|
||||
ELSE
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
RETURN(sParams)
|
||||
ENDFUNC
|
||||
ENDDEFINE
|
||||
|
52
admin/FCKeditor/_samples/afp/sample01.afp
Normal file
52
admin/FCKeditor/_samples/afp/sample01.afp
Normal file
@ -0,0 +1,52 @@
|
||||
<%
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* File Name: sampleposteddata.php
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* Version: 1.0
|
||||
* Modified: 2005-07-01
|
||||
*
|
||||
* File Authors: Soenke Freitag (www.afp-hosting.de)
|
||||
*
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - AFP - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
||||
<%
|
||||
|
||||
sBasePath="../../fckeditor/" && Change this to your local path
|
||||
|
||||
lcText=[This is some <strong>sample text</strong>. You are using ]
|
||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
||||
|
||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
||||
oFCKeditor.fckeditor("FCKeditor1")
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
oFCKeditor.cValue = lcText
|
||||
|
||||
? oFCKeditor.Create()
|
||||
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
54
admin/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
54
admin/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
@ -0,0 +1,54 @@
|
||||
<%
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* File Name: sampleposteddata.php
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* Version: 1.0
|
||||
* Modified: 2005-07-01
|
||||
*
|
||||
* File Authors: Soenke Freitag (www.afp-hosting.de)
|
||||
*
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<%
|
||||
lcForm=REQUEST.Form()
|
||||
lcForm=STRTRAN(lcForm,"&",CHR(13)+CHR(10))
|
||||
|
||||
FOR lnLoop=1 TO MEMLINES(lcForm)
|
||||
lcZeile=ALLTRIM(MLINE(lcForm,lnLoop))
|
||||
IF AT("=",lcZeile)>0
|
||||
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
|
||||
lcWert=ALLTRIM(RIGHT(lcZeile,LEN(lcZeile)-AT("=",lcZeile)))
|
||||
lcWert=Server.UrlDecode( lcWert )
|
||||
|
||||
? [<tr><td>]+lcVariable+[ =</td><td>]+lcWert+[</td></tr>]
|
||||
ENDIF
|
||||
NEXT
|
||||
%>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
58
admin/FCKeditor/_samples/asp/sample01.asp
Normal file
58
admin/FCKeditor/_samples/asp/sample01.asp
Normal file
@ -0,0 +1,58 @@
|
||||
<%@ codepage="65001" language="VBScript" %>
|
||||
<% Option Explicit %>
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample01.asp
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - ASP - Sample 1
|
||||
</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' Automatically calculates the editor base path based on the _samples directory.
|
||||
' This is usefull only for these samples. A real application should use something like this:
|
||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
104
admin/FCKeditor/_samples/asp/sample02.asp
Normal file
104
admin/FCKeditor/_samples/asp/sample02.asp
Normal file
@ -0,0 +1,104 @@
|
||||
<%@ CodePage=65001 Language="VBScript"%>
|
||||
<% Option Explicit %>
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample02.asp
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
||||
for ( code in editorInstance.Language.AvailableLanguages )
|
||||
{
|
||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
||||
}
|
||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
||||
}
|
||||
|
||||
function AddComboOption(combo, optionText, optionValue)
|
||||
{
|
||||
var oOption = document.createElement("OPTION") ;
|
||||
|
||||
combo.options.add(oOption) ;
|
||||
|
||||
oOption.innerHTML = optionText ;
|
||||
oOption.value = optionValue ;
|
||||
|
||||
return oOption ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - ASP - Sample 2</h1>
|
||||
This sample shows the editor in all its available languages.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' Automatically calculates the editor base path based on the _samples directory.
|
||||
' This is usefull only for these samples. A real application should use something like this:
|
||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Lang") = "" Then
|
||||
oFCKeditor.Config("AutoDetectLanguage") = True
|
||||
oFCKeditor.Config("DefaultLanguage") = "en"
|
||||
Else
|
||||
oFCKeditor.Config("AutoDetectLanguage") = False
|
||||
oFCKeditor.Config("DefaultLanguage") = Request.QueryString("Lang")
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
88
admin/FCKeditor/_samples/asp/sample03.asp
Normal file
88
admin/FCKeditor/_samples/asp/sample03.asp
Normal file
@ -0,0 +1,88 @@
|
||||
<%@ CodePage=65001 Language="VBScript"%>
|
||||
<% Option Explicit %>
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample03.asp
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeToolbar( toolbarName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - ASP - Sample 3</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="Default" selected>Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' Automatically calculates the editor base path based on the _samples directory.
|
||||
' This is usefull only for these samples. A real application should use something like this:
|
||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Toolbar") <> "" Then
|
||||
oFCKeditor.ToolbarSet = Server.HTMLEncode( Request.QueryString("Toolbar") )
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
94
admin/FCKeditor/_samples/asp/sample04.asp
Normal file
94
admin/FCKeditor/_samples/asp/sample04.asp
Normal file
@ -0,0 +1,94 @@
|
||||
<%@ CodePage=65001 Language="VBScript"%>
|
||||
<% Option Explicit %>
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample04.asp
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<% ' You must set "Enable Parent Paths" on your web site in order this relative include to work. %>
|
||||
<!-- #INCLUDE file="../../fckeditor.asp" -->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
||||
|
||||
// Get the active skin.
|
||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
||||
|
||||
oCombo.value = sSkin ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeSkin( skinName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - ASP - Sample 4</h1>
|
||||
This sample shows how to change the editor skin.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="default" selected>Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<%
|
||||
' Automatically calculates the editor base path based on the _samples directory.
|
||||
' This is usefull only for these samples. A real application should use something like this:
|
||||
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
Dim sBasePath
|
||||
sBasePath = Request.ServerVariables("PATH_INFO")
|
||||
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )
|
||||
|
||||
Dim oFCKeditor
|
||||
Set oFCKeditor = New FCKeditor
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
|
||||
If Request.QueryString("Skin") <> "" Then
|
||||
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Server.HTMLEncode( Request.QueryString("Skin") ) + "/"
|
||||
End If
|
||||
|
||||
oFCKeditor.Value = "This is some <strong>sample text</strong>. You are using <a href=""http://www.fckeditor.net/"">FCKeditor</a>."
|
||||
oFCKeditor.Create "FCKeditor1"
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
49
admin/FCKeditor/_samples/asp/sampleposteddata.asp
Normal file
49
admin/FCKeditor/_samples/asp/sampleposteddata.asp
Normal file
@ -0,0 +1,49 @@
|
||||
<%@ CodePage=65001 Language="VBScript"%>
|
||||
<% Option Explicit %>
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.asp
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td noWrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<%
|
||||
Dim sForm
|
||||
For Each sForm in Request.Form
|
||||
%>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><%=sForm%></b></td>
|
||||
<td width="100%"><%=Server.HTMLEncode( Request.Form(sForm) )%></td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
84
admin/FCKeditor/_samples/cfm/sample01.cfm
Normal file
84
admin/FCKeditor/_samples/cfm/sample01.cfm
Normal file
@ -0,0 +1,84 @@
|
||||
<cfsetting enablecfoutputonly="true" showdebugoutput="false">
|
||||
<!---
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample01.cfm
|
||||
* Sample page for ColdFusion.
|
||||
*
|
||||
* File Authors:
|
||||
* Hendrik Kramer (hk@lwd.de)
|
||||
* Mark Woods (mark@thickpaddy.com)
|
||||
* Wim Lemmens (didgiman@gmail.com)
|
||||
--->
|
||||
|
||||
<cfoutput>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>FCKeditor - ColdFusion - Sample 1</h1>
|
||||
|
||||
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Custom Tag / Module.
|
||||
<hr>
|
||||
<form method="POST" action="#cgi.script_name#">
|
||||
</cfoutput>
|
||||
|
||||
<cfmodule
|
||||
template="../../fckeditor.cfm"
|
||||
basePath="#Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1)#"
|
||||
instanceName="myEditor"
|
||||
value='This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.'
|
||||
width="100%"
|
||||
height="200"
|
||||
>
|
||||
<cfoutput>
|
||||
<br />
|
||||
<input type="submit" value="Submit">
|
||||
<br />
|
||||
</form>
|
||||
</cfoutput>
|
||||
|
||||
<cfif isDefined( 'FORM.fieldnames' )>
|
||||
<cfoutput>
|
||||
<style>
|
||||
<!--
|
||||
td, th { font: 11px Verdana, Arial, Helv, Helvetica, sans-serif; }
|
||||
-->
|
||||
</style>
|
||||
<table border="1" cellspacing="0" cellpadding="2" bordercolor="darkblue" bordercolordark="darkblue" bordercolorlight="darkblue">
|
||||
<tr>
|
||||
<th colspan="2" bgcolor="darkblue"><font color="white"><strong>Dump of FORM Variables</strong></font></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="lightskyblue">FieldNames</td>
|
||||
<td>#FORM.fieldNames#</td>
|
||||
</tr>
|
||||
<cfloop list="#FORM.fieldnames#" index="key">
|
||||
<tr>
|
||||
<td valign="top" bgcolor="lightskyblue">#key#</td>
|
||||
<td>#HTMLEditFormat(evaluate("FORM.#key#"))#</td>
|
||||
</tr>
|
||||
</cfloop>
|
||||
</table>
|
||||
</cfoutput>
|
||||
</cfif>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<cfsetting enablecfoutputonly="false">
|
90
admin/FCKeditor/_samples/cfm/sample02_mx.cfm
Normal file
90
admin/FCKeditor/_samples/cfm/sample02_mx.cfm
Normal file
@ -0,0 +1,90 @@
|
||||
<cfsetting enablecfoutputonly="true">
|
||||
<!---
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample02_mx.cfm
|
||||
* Sample page for ColdFusion MX.
|
||||
*
|
||||
* File Authors:
|
||||
* Hendrik Kramer (hk@lwd.de)
|
||||
* Wim Lemmens (didgiman@gmail.com)
|
||||
--->
|
||||
|
||||
<!--- ::
|
||||
* You must set the url path to the base directory for your media files (images, flash, files)
|
||||
* The best position for this variable is in your Application.cfm file
|
||||
*
|
||||
* Possible variable scopes are:
|
||||
* <cfset APPLICATION.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset SERVER.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset request.FCKeditor.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset application.FCKeditor.userFilesPath = "/UserFiles/">
|
||||
* OR:
|
||||
* <cfset server.FCKeditor.userFilesPath = "/UserFiles/">
|
||||
*
|
||||
* Note #1: Do _not_ set the physical directory on your server, only a path relative to your current webroot
|
||||
* Note #2: Directories will be automatically created
|
||||
:: --->
|
||||
|
||||
<cfoutput>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - ColdFusion Component (CFC) - Sample 2</h1>
|
||||
|
||||
This sample displays a normal HTML form with a FCKeditor with full features enabled; invoked by a ColdFusion Component.
|
||||
<hr>
|
||||
|
||||
<form method="POST" action="#cgi.script_name#">
|
||||
</cfoutput>
|
||||
|
||||
<cfif listFirst( server.coldFusion.productVersion ) LT 6>
|
||||
<cfoutput><br><em style="color: red;">This sample works only with a ColdFusion MX server and higher, because it uses some advantages of this version.</em></cfoutput>
|
||||
<cfabort>
|
||||
</cfif>
|
||||
|
||||
<cfscript>
|
||||
// Calculate basepath for FCKeditor. It's in the folder right above _samples
|
||||
basePath = Left(cgi.script_name, FindNoCase('_samples', cgi.script_name)-1);
|
||||
|
||||
fckEditor = createObject("component", "#basePath#fckeditor");
|
||||
fckEditor.instanceName = "myEditor";
|
||||
fckEditor.value = 'This is some sample text. You are using <a href="http://fckeditor.net/" target="_blank">FCKeditor</a>.';
|
||||
fckEditor.basePath = basePath;
|
||||
fckEditor.width = "100%";
|
||||
fckEditor.height = 300;
|
||||
fckEditor.create(); // create the editor.
|
||||
</cfscript>
|
||||
|
||||
<cfoutput>
|
||||
<br />
|
||||
<input type="submit" value="Submit">
|
||||
<hr />
|
||||
</cfoutput>
|
||||
|
||||
<cfdump
|
||||
var="#FORM#"
|
||||
label="Dump of FORM Variables"
|
||||
>
|
||||
|
||||
<cfoutput></form></body></html></cfoutput>
|
||||
|
||||
<cfsetting enablecfoutputonly="false">
|
30
admin/FCKeditor/_samples/default.html
Normal file
30
admin/FCKeditor/_samples/default.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: default.html
|
||||
* Samples Frameset page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
</head>
|
||||
<frameset rows="60,*">
|
||||
<frame src="sampleslist.html" noresize scrolling="no">
|
||||
<frame name="Sample" src="html/sample01.html" noresize>
|
||||
</frameset>
|
||||
</html>
|
55
admin/FCKeditor/_samples/html/sample01.html
Normal file
55
admin/FCKeditor/_samples/html/sample01.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample01.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 1
|
||||
</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 300 ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
59
admin/FCKeditor/_samples/html/sample02.html
Normal file
59
admin/FCKeditor/_samples/html/sample02.html
Normal file
@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample02.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload = function()
|
||||
{
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.ReplaceTextarea() ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 2</h1>
|
||||
<div>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
It uses the "ReplaceTextarea" command to create the editor.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<div>
|
||||
<textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</textarea>
|
||||
</div>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
132
admin/FCKeditor/_samples/html/sample03.html
Normal file
132
admin/FCKeditor/_samples/html/sample03.html
Normal file
@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample03.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var bIsLoaded = false ;
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
if ( bIsLoaded )
|
||||
return ;
|
||||
|
||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
||||
|
||||
var aLanguages = new Array() ;
|
||||
|
||||
for ( code in editorInstance.Language.AvailableLanguages )
|
||||
aLanguages.push( { Code : code, Name : editorInstance.Language.AvailableLanguages[code] } ) ;
|
||||
|
||||
aLanguages.sort( SortLanguage ) ;
|
||||
|
||||
for ( var i = 0 ; i < aLanguages.length ; i++ )
|
||||
AddComboOption( oCombo, aLanguages[i].Name + ' (' + aLanguages[i].Code + ')', aLanguages[i].Code ) ;
|
||||
|
||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
||||
|
||||
document.getElementById('eNumLangs').innerHTML = '(' + aLanguages.length + ' languages available!)' ;
|
||||
|
||||
bIsLoaded = true ;
|
||||
}
|
||||
|
||||
function SortLanguage( langA, langB )
|
||||
{
|
||||
return ( langA.Name < langB.Name ? -1 : langA.Name > langB.Name ? 1 : 0 ) ;
|
||||
}
|
||||
|
||||
function AddComboOption(combo, optionText, optionValue)
|
||||
{
|
||||
var oOption = document.createElement("OPTION") ;
|
||||
|
||||
combo.options.add(oOption) ;
|
||||
|
||||
oOption.innerHTML = optionText ;
|
||||
oOption.value = optionValue ;
|
||||
|
||||
return oOption ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?" + languageCode ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 3</h1>
|
||||
<div>
|
||||
This sample shows the editor in all its available languages.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span id="eNumLangs"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var sLang ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sLang = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
if ( sLang == null )
|
||||
{
|
||||
oFCKeditor.Config["AutoDetectLanguage"] = true ;
|
||||
oFCKeditor.Config["DefaultLanguage"] = "en" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oFCKeditor.Config["AutoDetectLanguage"] = false ;
|
||||
oFCKeditor.Config["DefaultLanguage"] = sLang ;
|
||||
}
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
91
admin/FCKeditor/_samples/html/sample04.html
Normal file
91
admin/FCKeditor/_samples/html/sample04.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample04.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?" + languageCode ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 4</h1>
|
||||
<div>
|
||||
This sample shows how to change the editor toolbar.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
||||
<option value="Default" selected="selected">Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
// Get the toolbar from the URL.
|
||||
var sToolbar ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sToolbar = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
if ( sToolbar != null )
|
||||
oFCKeditor.ToolbarSet = sToolbar ;
|
||||
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
121
admin/FCKeditor/_samples/html/sample05.html
Normal file
121
admin/FCKeditor/_samples/html/sample05.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample05.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
||||
|
||||
// Get the active skin.
|
||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
||||
|
||||
oCombo.value = sSkin ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?" + languageCode ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 5</h1>
|
||||
<div>
|
||||
This sample shows how to change the editor skin.
|
||||
</div>
|
||||
<hr />
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeLanguage(this.value);" style="visibility: hidden">
|
||||
<option value="default" selected="selected">Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
// Get the skin from the URL.
|
||||
var sSkin ;
|
||||
if ( document.location.search.length > 1 )
|
||||
sSkin = document.location.search.substr(1) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
if ( sSkin != null )
|
||||
{
|
||||
var sSkinPath = sBasePath + 'editor/skins/' + sSkin + '/' ;
|
||||
oFCKeditor.Config['SkinPath'] = sSkinPath ;
|
||||
|
||||
// The following switch is optional. It is done to enhance the loading
|
||||
// time of the toolbar, by preloading the images used on it.
|
||||
switch ( sSkin )
|
||||
{
|
||||
case 'office2003' :
|
||||
oFCKeditor.Config['PreloadImages'] =
|
||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.bg.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
||||
break ;
|
||||
|
||||
case 'silver' :
|
||||
oFCKeditor.Config['PreloadImages'] =
|
||||
sSkinPath + 'images/toolbar.start.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.end.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonbg.gif' + ';' +
|
||||
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
45
admin/FCKeditor/_samples/html/sample06.config.js
Normal file
45
admin/FCKeditor/_samples/html/sample06.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample06.config.js
|
||||
* Sample custom configuration settings used in the plugin sample page (sample06).
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
// Set our sample toolbar.
|
||||
FCKConfig.ToolbarSets['PluginTest'] = [
|
||||
['SourceSimple'],
|
||||
['My_Find','My_Replace','-','Placeholder'],
|
||||
['StyleSimple','FontFormatSimple','FontNameSimple','FontSizeSimple'],
|
||||
['Table','-','TableInsertRow','TableDeleteRows','TableInsertColumn','TableDeleteColumns','TableInsertCell','TableDeleteCells','TableMergeCells','TableSplitCell'],
|
||||
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink'],
|
||||
'/',
|
||||
['My_BigStyle','-','Smiley','-','About']
|
||||
] ;
|
||||
|
||||
// Change the default plugin path.
|
||||
FCKConfig.PluginsPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + '_samples/_plugins/' ;
|
||||
|
||||
// Add our plugin to the plugins list.
|
||||
// FCKConfig.Plugins.Add( pluginName, availableLanguages )
|
||||
// pluginName: The plugin name. The plugin directory must match this name.
|
||||
// availableLanguages: a list of available language files for the plugin (separated by a comma).
|
||||
FCKConfig.Plugins.Add( 'findreplace', 'en,it,fr' ) ;
|
||||
FCKConfig.Plugins.Add( 'samples' ) ;
|
||||
|
||||
// If you want to use plugins found on other directories, just use the third parameter.
|
||||
var sOtherPluginPath = FCKConfig.BasePath.substr(0, FCKConfig.BasePath.length - 7) + 'editor/plugins/' ;
|
||||
FCKConfig.Plugins.Add( 'placeholder', 'en,it,de,fr', sOtherPluginPath ) ;
|
||||
FCKConfig.Plugins.Add( 'tablecommands', null, sOtherPluginPath ) ;
|
||||
FCKConfig.Plugins.Add( 'simplecommands', null, sOtherPluginPath ) ;
|
69
admin/FCKeditor/_samples/html/sample06.html
Normal file
69
admin/FCKeditor/_samples/html/sample06.html
Normal file
@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample06.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - 6</h1>
|
||||
<div>
|
||||
This sample shows some sample plugins implementations. Things to note:<br />
|
||||
<ul>
|
||||
<li>In the toolbar, you will find sample "Find" and "Replace" plugins that do exactly
|
||||
the same thing that the built in ones do. It just shows how to do that with a custom
|
||||
implementation. Use the green toolbar buttons the test then. </li>
|
||||
<li>There is also another sample plugin that is available in the package: the "Placeholder"
|
||||
command (use the yellow icon). </li>
|
||||
<li>It also shows a custom context menu option when right cliking on images (insert
|
||||
a smiley to test it).</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
|
||||
// Set the custom configurations file path (in this way the original file is mantained).
|
||||
oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample06.config.js' ;
|
||||
|
||||
// Let's use a custom toolbar for this sample.
|
||||
oFCKeditor.ToolbarSet = 'PluginTest' ;
|
||||
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
55
admin/FCKeditor/_samples/html/sample07.html
Normal file
55
admin/FCKeditor/_samples/html/sample07.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample07.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 7</h1>
|
||||
<div>
|
||||
In this sample the user can edit the complete page contents and header (from <HTML>
|
||||
to </HTML>).
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Config['FullPage'] = true ;
|
||||
oFCKeditor.Value = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Full Page Test</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/></head><body>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</body></html>' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
192
admin/FCKeditor/_samples/html/sample08.html
Normal file
192
admin/FCKeditor/_samples/html/sample08.html
Normal file
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample08.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
// FCKeditor_OnComplete is a special function that is called when an editor
|
||||
// instance is loaded ad available to the API. It must be named exactly in
|
||||
// this way.
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
// Show the editor name and description in the browser status bar.
|
||||
document.getElementById('eMessage').innerHTML = 'Instance "' + editorInstance.Name + '" loaded - ' + editorInstance.Description ;
|
||||
|
||||
// Show this sample buttons.
|
||||
document.getElementById('eButtons').style.visibility = '' ;
|
||||
}
|
||||
|
||||
function InsertHTML()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Check the active editing mode.
|
||||
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
|
||||
{
|
||||
// Insert the desired HTML.
|
||||
oEditor.InsertHtml( '- This is some <a href="/Test1.html">sample</a> HTML -' ) ;
|
||||
}
|
||||
else
|
||||
alert( 'You must be on WYSIWYG mode!' ) ;
|
||||
}
|
||||
|
||||
function SetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Set the editor contents (replace the actual one).
|
||||
oEditor.SetHTML( 'This is the <b>new content</b> I want in the editor.' ) ;
|
||||
}
|
||||
|
||||
function GetContents()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Get the editor contents in XHTML.
|
||||
alert( oEditor.GetXHTML( true ) ) ; // "true" means you want it formatted.
|
||||
}
|
||||
|
||||
function ExecuteCommand( commandName )
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Execute the command.
|
||||
oEditor.Commands.GetCommand( commandName ).Execute() ;
|
||||
}
|
||||
|
||||
function GetLength()
|
||||
{
|
||||
// This functions shows that you can interact directly with the editor area
|
||||
// DOM. In this way you have the freedom to do anything you want with it.
|
||||
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Get the Editor Area DOM (Document object).
|
||||
var oDOM = oEditor.EditorDocument ;
|
||||
|
||||
var iLength ;
|
||||
|
||||
// The are two diffent ways to get the text (without HTML markups).
|
||||
// It is browser specific.
|
||||
|
||||
if ( document.all ) // If Internet Explorer.
|
||||
{
|
||||
iLength = oDOM.body.innerText.length ;
|
||||
}
|
||||
else // If Gecko.
|
||||
{
|
||||
var r = oDOM.createRange() ;
|
||||
r.selectNodeContents( oDOM.body ) ;
|
||||
iLength = r.toString().length ;
|
||||
}
|
||||
|
||||
alert( 'Actual text length (without HTML markups): ' + iLength + ' characters' ) ;
|
||||
}
|
||||
|
||||
function GetInnerHTML()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
alert( oEditor.EditorDocument.body.innerHTML ) ;
|
||||
}
|
||||
|
||||
function CheckIsDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
alert( oEditor.IsDirty() ) ;
|
||||
}
|
||||
|
||||
function ResetIsDirty()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
oEditor.ResetIsDirty() ;
|
||||
alert( 'The "IsDirty" status has been reset' ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 8
|
||||
</h1>
|
||||
<div>
|
||||
This sample shows how to use the FCKeditor JavaScript API to interact with the editor
|
||||
at runtime.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<hr />
|
||||
<div id="eMessage">
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
<div id="eButtons" style="visibility: hidden">
|
||||
<input type="button" value="Insert HTML" onclick="InsertHTML();" />
|
||||
<input type="button" value="Set Editor Contents" onclick="SetContents();" />
|
||||
<input type="button" value="Get Editor Contents (XHTML)" onclick="GetContents();" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value='Execute "Bold" Command' onclick="ExecuteCommand('Bold');" />
|
||||
<input type="button" value='Execute "Link" Command' onclick="ExecuteCommand('Link');" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value="Interact with the Editor Area DOM" onclick="GetLength();" />
|
||||
<input type="button" value="Get innerHTML" onclick="GetInnerHTML();" />
|
||||
<br />
|
||||
<br />
|
||||
<input type="button" value="Check IsDirty()" onclick="CheckIsDirty();" />
|
||||
<input type="button" value="Reset IsDirty()" onclick="ResetIsDirty();" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
96
admin/FCKeditor/_samples/html/sample09.html
Normal file
96
admin/FCKeditor/_samples/html/sample09.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample09.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ;
|
||||
editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
|
||||
}
|
||||
|
||||
function FCKeditor_OnBlur( editorInstance )
|
||||
{
|
||||
editorInstance.ToolbarSet.Collapse() ;
|
||||
}
|
||||
|
||||
function FCKeditor_OnFocus( editorInstance )
|
||||
{
|
||||
editorInstance.ToolbarSet.Expand() ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 9</h1>
|
||||
<div>
|
||||
This sample shows FCKeditor in a more complex form with two different instances.<br />
|
||||
It also shows and interesting usage of the "OnFocus" and "OnBlur" events available
|
||||
in the JavaScript API.
|
||||
</div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor with Basic toolbar:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_Basic' ) ;
|
||||
|
||||
oFCKeditor.Config['ToolbarStartExpanded'] = false ;
|
||||
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.ToolbarSet = 'Basic' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor with Default toolbar:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_Default' ) ;
|
||||
|
||||
oFCKeditor.Config['ToolbarStartExpanded'] = false ;
|
||||
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
75
admin/FCKeditor/_samples/html/sample10.html
Normal file
75
admin/FCKeditor/_samples/html/sample10.html
Normal file
@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample10.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 10</h1>
|
||||
<div>
|
||||
This sample shows a form with two FCKeditor instance. Both instances share the same
|
||||
toolbar, available in the top.
|
||||
</div>
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor 1:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor 2:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:xToolbar' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
39
admin/FCKeditor/_samples/html/sample11.html
Normal file
39
admin/FCKeditor/_samples/html/sample11.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample11.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - JavaScript - Sample 11</h1>
|
||||
<div>
|
||||
This sample shows a form with two FCKeditor instance loaded inside an IFRAME. Both instances share the same
|
||||
toolbar, available in the main page (top).
|
||||
</div>
|
||||
<hr />
|
||||
<div id="xToolbar"></div>
|
||||
<hr />
|
||||
<iframe src="sample11_frame.html" width="100%" height="300"></iframe>
|
||||
</body>
|
||||
</html>
|
65
admin/FCKeditor/_samples/html/sample11_frame.html
Normal file
65
admin/FCKeditor/_samples/html/sample11_frame.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample11_frame.html
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
Normal text field:<br />
|
||||
<input name="NormaText" value="Plain Text" />
|
||||
<br />
|
||||
<br />
|
||||
FCKeditor 1:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor_1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
FCKeditor 2:
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
oFCKeditor = new FCKeditor( 'FCKeditor_2' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Height = 100 ;
|
||||
oFCKeditor.Config[ 'ToolbarLocation' ] = 'Out:parent(xToolbar)' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
68
admin/FCKeditor/_samples/html/sampleposteddata.asp
Normal file
68
admin/FCKeditor/_samples/html/sampleposteddata.asp
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.asp
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Samples - Posted Data</h1>
|
||||
<div>
|
||||
This page lists all data posted by the form.
|
||||
</div>
|
||||
<hr />
|
||||
<table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
|
||||
<tr style="font-weight: bold; color: #dddddd; background-color: #999999">
|
||||
<td style="white-space: nowrap;">
|
||||
Field Name </td>
|
||||
<td>
|
||||
Value</td>
|
||||
</tr>
|
||||
<% For Each sForm in Request.Form %>
|
||||
<tr>
|
||||
<td valign="top" style="white-space: nowrap;">
|
||||
<b>
|
||||
<%=sForm%>
|
||||
</b>
|
||||
</td>
|
||||
<td style="width: 100%;">
|
||||
<pre><%=ModifyForOutput( Request.Form(sForm) )%></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<%
|
||||
|
||||
' This function is useful only for this sample page se whe can display the
|
||||
' posted data accordingly. This processing is usually not done on real
|
||||
' applications, where the posted data must be saved on a DB or file. In those
|
||||
' cases, no processing must be done, and the data is saved as posted.
|
||||
Function ModifyForOutput( value )
|
||||
|
||||
ModifyForOutput = Server.HTMLEncode( Request.Form(sForm) )
|
||||
|
||||
End Function
|
||||
|
||||
%>
|
76
admin/FCKeditor/_samples/html/sampleposteddata.html
Normal file
76
admin/FCKeditor/_samples/html/sampleposteddata.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.html
|
||||
* This page lists the data posted by a form. It uses the URL (GET data),
|
||||
* so it's limited to 2KB of data.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Samples - Posted Data
|
||||
</h1>
|
||||
<div>
|
||||
This page lists all data posted by the form. It uses the "QueryString" to search
|
||||
for data submitted using the "GET" method, so it is limited to 2KB.
|
||||
</div>
|
||||
<hr />
|
||||
<table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
|
||||
<tr style="font-weight: bold; color: #dddddd; background-color: #999999">
|
||||
<td style="white-space: nowrap;">
|
||||
Field</td>
|
||||
<td>
|
||||
Value</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
function HTMLEncode( text )
|
||||
{
|
||||
text = text.replace(/&/g, "&") ;
|
||||
text = text.replace(/"/g, """) ;
|
||||
text = text.replace(/</g, "<") ;
|
||||
text = text.replace(/>/g, ">") ;
|
||||
text = text.replace(/'/g, "'") ;
|
||||
|
||||
return text ;
|
||||
}
|
||||
|
||||
var aParams = document.location.search.substr(1).split('&') ;
|
||||
|
||||
for ( i = 0 ; i < aParams.length ; i++ )
|
||||
{
|
||||
var aParam = aParams[i].split('=') ;
|
||||
var sParamName = aParam[0] ;
|
||||
var sParamValue = aParam[1] ;
|
||||
|
||||
document.write( '<tr>' ) ;
|
||||
document.write( '<td valign="top" style="white-space: nowrap;">' + sParamName + '</td>' ) ;
|
||||
document.write( '<td style="width: 100%;"><pre>' + HTMLEncode( unescape( sParamValue.replace( /\+/g, ' ' ) ) ) + '</pre></td>' ) ;
|
||||
document.write( '</tr>' ) ;
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
51
admin/FCKeditor/_samples/lasso/sample01.lasso
Normal file
51
admin/FCKeditor/_samples/lasso/sample01.lasso
Normal file
@ -0,0 +1,51 @@
|
||||
[//lasso
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample01.lasso
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Jason Huck (jason.huck@corefive.com)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Lasso - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
105
admin/FCKeditor/_samples/lasso/sample02.lasso
Normal file
105
admin/FCKeditor/_samples/lasso/sample02.lasso
Normal file
@ -0,0 +1,105 @@
|
||||
[//lasso
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample02.lasso
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Jason Huck (jason.huck@corefive.com)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
||||
for ( code in editorInstance.Language.AvailableLanguages )
|
||||
{
|
||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
||||
}
|
||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
||||
}
|
||||
|
||||
function AddComboOption(combo, optionText, optionValue)
|
||||
{
|
||||
var oOption = document.createElement("OPTION") ;
|
||||
|
||||
combo.options.add(oOption) ;
|
||||
|
||||
oOption.innerHTML = optionText ;
|
||||
oOption.value = optionValue ;
|
||||
|
||||
return oOption ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Lasso - Sample 2</h1>
|
||||
This sample shows the editor in all its available languages.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
if(action_param('Lang'));
|
||||
var('config') = array(
|
||||
'AutoDetectLanguage' = 'false',
|
||||
'DefaultLanguage' = action_param('Lang')
|
||||
);
|
||||
else;
|
||||
var('config') = array(
|
||||
'AutoDetectLanguage' = 'true',
|
||||
'DefaultLanguage' = 'en'
|
||||
);
|
||||
/if;
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-config=$config,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
83
admin/FCKeditor/_samples/lasso/sample03.lasso
Normal file
83
admin/FCKeditor/_samples/lasso/sample03.lasso
Normal file
@ -0,0 +1,83 @@
|
||||
[//lasso
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample03.lasso
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Jason Huck (jason.huck@corefive.com)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeToolbar( toolbarName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Lasso - Sample 3</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="Default" selected>Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
if(action_param('Toolbar'));
|
||||
$myeditor->toolbarset = action_param('Toolbar');
|
||||
/if;
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
89
admin/FCKeditor/_samples/lasso/sample04.lasso
Normal file
89
admin/FCKeditor/_samples/lasso/sample04.lasso
Normal file
@ -0,0 +1,89 @@
|
||||
[//lasso
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample04.lasso
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Jason Huck (jason.huck@corefive.com)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
||||
|
||||
// Get the active skin.
|
||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
||||
|
||||
oCombo.value = sSkin ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeSkin( skinName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Lasso - Sample 4</h1>
|
||||
This sample shows how to change the editor skin.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="default" selected>Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.lasso" method="post" target="_blank">
|
||||
[//lasso
|
||||
include('../../fckeditor.lasso');
|
||||
var('basepath') = response_filepath->split('_samples')->get(1);
|
||||
|
||||
var('myeditor') = fck_editor(
|
||||
-instancename='FCKeditor1',
|
||||
-basepath=$basepath,
|
||||
-initialvalue='This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.'
|
||||
);
|
||||
|
||||
if(action_param('Skin'));
|
||||
$myeditor->config = array('SkinPath' = $basepath + 'editor/skins/' + action_param('Skin') + '/');
|
||||
/if;
|
||||
|
||||
$myeditor->create;
|
||||
]
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
47
admin/FCKeditor/_samples/lasso/sampleposteddata.lasso
Normal file
47
admin/FCKeditor/_samples/lasso/sampleposteddata.lasso
Normal file
@ -0,0 +1,47 @@
|
||||
[//lasso
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.lasso
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Jason Huck (jason.huck@corefive.com)
|
||||
* Jim Michaels (jmichae3@yahoo.com)
|
||||
*/
|
||||
]
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
[iterate(client_postparams, local('this'))]
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>[#this->first]</b></td>
|
||||
<td width="100%">[#this->second]</td>
|
||||
</tr>
|
||||
[/iterate]
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
111
admin/FCKeditor/_samples/perl/sample01.cgi
Normal file
111
admin/FCKeditor/_samples/perl/sample01.cgi
Normal file
@ -0,0 +1,111 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#####
|
||||
# FCKeditor - The text editor for internet
|
||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
#
|
||||
# Licensed under the terms of the GNU Lesser General Public License:
|
||||
# http://www.opensource.org/licenses/lgpl-license.php
|
||||
#
|
||||
# For further information visit:
|
||||
# http://www.fckeditor.net/
|
||||
#
|
||||
# "Support Open Source software. What about a donation today?"
|
||||
#
|
||||
# File Name: sample01.cgi
|
||||
# Sample page.
|
||||
#
|
||||
# File Authors:
|
||||
# Takashi Yamaguchi (jack@omakase.net)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample01.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Perl - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// Automatically calculates the editor base path based on the _samples directory.
|
||||
#// This is usefull only for these samples. A real application should use something like this:
|
||||
#// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr($sBasePath,0,index($sBasePath,"_samples"));
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.';
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
176
admin/FCKeditor/_samples/perl/sample02.cgi
Normal file
176
admin/FCKeditor/_samples/perl/sample02.cgi
Normal file
@ -0,0 +1,176 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#####
|
||||
# FCKeditor - The text editor for internet
|
||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
#
|
||||
# Licensed under the terms of the GNU Lesser General Public License:
|
||||
# http://www.opensource.org/licenses/lgpl-license.php
|
||||
#
|
||||
# For further information visit:
|
||||
# http://www.fckeditor.net/
|
||||
#
|
||||
# "Support Open Source software. What about a donation today?"
|
||||
#
|
||||
# File Name: sample02.cgi
|
||||
# Sample page.
|
||||
#
|
||||
# File Authors:
|
||||
# Takashi Yamaguchi (jack@omakase.net)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample02.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
||||
for ( code in editorInstance.Language.AvailableLanguages )
|
||||
{
|
||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
||||
}
|
||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
||||
}
|
||||
|
||||
function AddComboOption(combo, optionText, optionValue)
|
||||
{
|
||||
var oOption = document.createElement("OPTION") ;
|
||||
|
||||
combo.options.add(oOption) ;
|
||||
|
||||
oOption.innerHTML = optionText ;
|
||||
oOption.value = optionValue ;
|
||||
|
||||
return oOption ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Perl - Sample 2</h1>
|
||||
This sample shows the editor in all its available languages.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// Automatically calculates the editor base path based on the _samples directory.
|
||||
#// This is usefull only for these samples. A real application should use something like this:
|
||||
#// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr( $sBasePath, 0, index($sBasePath,"_samples"));
|
||||
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
|
||||
if($FORM{'Lang'} ne "") {
|
||||
$Config{'AutoDetectLanguage'} = "false";
|
||||
$Config{'DefaultLanguage'} = $FORM{'Lang'};
|
||||
} else {
|
||||
$Config{'AutoDetectLanguage'} = "true";
|
||||
$Config{'DefaultLanguage'} = 'en' ;
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
161
admin/FCKeditor/_samples/perl/sample03.cgi
Normal file
161
admin/FCKeditor/_samples/perl/sample03.cgi
Normal file
@ -0,0 +1,161 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#####
|
||||
# FCKeditor - The text editor for internet
|
||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
#
|
||||
# Licensed under the terms of the GNU Lesser General Public License:
|
||||
# http://www.opensource.org/licenses/lgpl-license.php
|
||||
#
|
||||
# For further information visit:
|
||||
# http://www.fckeditor.net/
|
||||
#
|
||||
# "Support Open Source software. What about a donation today?"
|
||||
#
|
||||
# File Name: sample03.cgi
|
||||
# Sample page.
|
||||
#
|
||||
# File Authors:
|
||||
# Takashi Yamaguchi (jack@omakase.net)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample03.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeToolbar( toolbarName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Perl - Sample 3</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="Default" selected>Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// Automatically calculates the editor base path based on the _samples directory.
|
||||
#// This is usefull only for these samples. A real application should use something like this:
|
||||
#// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr($sBasePath, 0, index( $sBasePath, "_samples" ));
|
||||
|
||||
&FCKeditor('FCKeditor1') ;
|
||||
$BasePath = $sBasePath ;
|
||||
|
||||
if($FORM{'Toolbar'} ne "") {
|
||||
$ToolbarSet = &specialchar_cnv( $FORM{'Toolbar'} );
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create();
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
168
admin/FCKeditor/_samples/perl/sample04.cgi
Normal file
168
admin/FCKeditor/_samples/perl/sample04.cgi
Normal file
@ -0,0 +1,168 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#####
|
||||
# FCKeditor - The text editor for internet
|
||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
#
|
||||
# Licensed under the terms of the GNU Lesser General Public License:
|
||||
# http://www.opensource.org/licenses/lgpl-license.php
|
||||
#
|
||||
# For further information visit:
|
||||
# http://www.fckeditor.net/
|
||||
#
|
||||
# "Support Open Source software. What about a donation today?"
|
||||
#
|
||||
# File Name: sample04.cgi
|
||||
# Sample page.
|
||||
#
|
||||
# File Authors:
|
||||
# Takashi Yamaguchi (jack@omakase.net)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
# When $ENV{'PATH_INFO'} cannot be used by perl.
|
||||
# $DefRootPath = "/XXXXX/_samples/perl/sample04.cgi"; Please write in script.
|
||||
|
||||
my $DefServerPath = "";
|
||||
my $ServerPath;
|
||||
|
||||
$ServerPath = &GetServerPath();
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
#!!Caution javascript \ Quart
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
||||
|
||||
// Get the active skin.
|
||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
||||
sSkin = sSkin.match(/[^\\/]+(?=\\/\$)/g) ;
|
||||
|
||||
oCombo.value = sSkin ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeSkin( skinName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Perl - Sample 4</h1>
|
||||
This sample shows how to change the editor skin.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="default" selected>Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.cgi" method="post" target="_blank">
|
||||
_HTML_TAG_
|
||||
|
||||
#// Automatically calculates the editor base path based on the _samples directory.
|
||||
#// This is usefull only for these samples. A real application should use something like this:
|
||||
#// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $ServerPath;
|
||||
$sBasePath = substr( $sBasePath, 0, index( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
&FCKeditor('FCKeditor1');
|
||||
$BasePath = $sBasePath;
|
||||
|
||||
if($FORM{'Skin'} ne "") {
|
||||
$Config{'SkinPath'} = $sBasePath . 'editor/skins/' . &specialchar_cnv( $FORM{'Skin'} ) . '/' ;
|
||||
}
|
||||
$Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
&Create() ;
|
||||
|
||||
print <<"_HTML_TAG_";
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
||||
|
||||
################
|
||||
#Please use this function, rewriting it depending on a server's environment.
|
||||
################
|
||||
sub GetServerPath
|
||||
{
|
||||
my $dir;
|
||||
|
||||
if($DefServerPath) {
|
||||
$dir = $DefServerPath;
|
||||
} else {
|
||||
if($ENV{'PATH_INFO'}) {
|
||||
$dir = $ENV{'PATH_INFO'};
|
||||
} elsif($ENV{'FILEPATH_INFO'}) {
|
||||
$dir = $ENV{'FILEPATH_INFO'};
|
||||
}
|
||||
}
|
||||
return($dir);
|
||||
}
|
101
admin/FCKeditor/_samples/perl/sampleposteddata.cgi
Normal file
101
admin/FCKeditor/_samples/perl/sampleposteddata.cgi
Normal file
@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#####
|
||||
# FCKeditor - The text editor for internet
|
||||
# Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
#
|
||||
# Licensed under the terms of the GNU Lesser General Public License:
|
||||
# http://www.opensource.org/licenses/lgpl-license.php
|
||||
#
|
||||
# For further information visit:
|
||||
# http://www.fckeditor.net/
|
||||
#
|
||||
# "Support Open Source software. What about a donation today?"
|
||||
#
|
||||
# File Name: sampleposteddata.cgi
|
||||
# This page lists the data posted by a form.
|
||||
#
|
||||
# File Authors:
|
||||
# Takashi Yamaguchi (jack@omakase.net)
|
||||
#####
|
||||
|
||||
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
|
||||
if(Windows_check()) {
|
||||
chdir(GetScriptPath($0));
|
||||
}
|
||||
|
||||
sub Windows_check
|
||||
{
|
||||
# IIS,PWS(NT/95)
|
||||
$www_server_os = $^O;
|
||||
# Win98 & NT(SP4)
|
||||
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
|
||||
# AnHTTPd/Omni/IIS
|
||||
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
|
||||
# Win Apache
|
||||
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
|
||||
if($www_server_os=~ /win/i) { return(1); }
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub GetScriptPath {
|
||||
local($path) = @_;
|
||||
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
|
||||
$path;
|
||||
}
|
||||
## END: Hack for IIS
|
||||
|
||||
require '../../fckeditor.pl';
|
||||
|
||||
if($ENV{'REQUEST_METHOD'} eq "POST") {
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
} else {
|
||||
$buffer = $ENV{'QUERY_STRING'};
|
||||
}
|
||||
@pairs = split(/&/,$buffer);
|
||||
foreach $pair (@pairs) {
|
||||
($name,$value) = split(/=/,$pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$value =~ s/\t//g;
|
||||
$value =~ s/\r\n/\n/g;
|
||||
$FORM{$name} .= "\0" if(defined($FORM{$name}));
|
||||
$FORM{$name} .= $value;
|
||||
}
|
||||
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"_HTML_TAG_";
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
_HTML_TAG_
|
||||
|
||||
foreach $key (keys %FORM) {
|
||||
$postedValue = &specialchar_cnv($FORM{$key});
|
||||
print <<"_HTML_TAG_";
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>$key</b></td>
|
||||
<td width="100%">$postedValue</td>
|
||||
</tr>
|
||||
_HTML_TAG_
|
||||
}
|
||||
print <<"_HTML_TAG_";
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
_HTML_TAG_
|
53
admin/FCKeditor/_samples/php/sample01.php
Normal file
53
admin/FCKeditor/_samples/php/sample01.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample01.php
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - PHP - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
104
admin/FCKeditor/_samples/php/sample02.php
Normal file
104
admin/FCKeditor/_samples/php/sample02.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample02.php
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbLanguages' ) ;
|
||||
for ( code in editorInstance.Language.AvailableLanguages )
|
||||
{
|
||||
AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
|
||||
}
|
||||
oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
|
||||
}
|
||||
|
||||
function AddComboOption(combo, optionText, optionValue)
|
||||
{
|
||||
var oOption = document.createElement("OPTION") ;
|
||||
|
||||
combo.options.add(oOption) ;
|
||||
|
||||
oOption.innerHTML = optionText ;
|
||||
oOption.value = optionValue ;
|
||||
|
||||
return oOption ;
|
||||
}
|
||||
|
||||
function ChangeLanguage( languageCode )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Lang=" + languageCode ;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - PHP - Sample 2</h1>
|
||||
This sample shows the editor in all its available languages.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select a language:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Lang']) )
|
||||
{
|
||||
$oFCKeditor->Config['AutoDetectLanguage'] = false ;
|
||||
$oFCKeditor->Config['DefaultLanguage'] = $_GET['Lang'] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
|
||||
$oFCKeditor->Config['DefaultLanguage'] = 'en' ;
|
||||
}
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?> <br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
85
admin/FCKeditor/_samples/php/sample03.php
Normal file
85
admin/FCKeditor/_samples/php/sample03.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample03.php
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeToolbar( toolbarName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - PHP - Sample 3</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the toolbar to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="Default" selected>Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Toolbar']) )
|
||||
$oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
85
admin/FCKeditor/_samples/php/sample03a.php
Normal file
85
admin/FCKeditor/_samples/php/sample03a.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample03.php
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbToolbars' ) ;
|
||||
oCombo.value = editorInstance.ToolbarSet.Name ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeToolbar( toolbarName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Toolbar=" + toolbarName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Erfassung</h1>
|
||||
This sample shows how to change the editor toolbar.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Text:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbToolbars" onchange="ChangeToolbar(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="Default" selected>Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Toolbar']) )
|
||||
$oFCKeditor->ToolbarSet = htmlspecialchars($_GET['Toolbar']);
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
91
admin/FCKeditor/_samples/php/sample04.php
Normal file
91
admin/FCKeditor/_samples/php/sample04.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample04.php
|
||||
* Sample page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
include("../../fckeditor.php") ;
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
var oCombo = document.getElementById( 'cmbSkins' ) ;
|
||||
|
||||
// Get the active skin.
|
||||
var sSkin = editorInstance.Config['SkinPath'] ;
|
||||
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
|
||||
|
||||
oCombo.value = sSkin ;
|
||||
oCombo.style.visibility = '' ;
|
||||
}
|
||||
|
||||
function ChangeSkin( skinName )
|
||||
{
|
||||
window.location.href = window.location.pathname + "?Skin=" + skinName ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - PHP - Sample 4</h1>
|
||||
This sample shows how to change the editor skin.
|
||||
<hr>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Select the skin to load:
|
||||
</td>
|
||||
<td>
|
||||
<select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
|
||||
<option value="default" selected>Default</option>
|
||||
<option value="office2003">Office 2003</option>
|
||||
<option value="silver">Silver</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<form action="sampleposteddata.php" method="post" target="_blank">
|
||||
<?php
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
$sBasePath = $_SERVER['PHP_SELF'] ;
|
||||
$sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
|
||||
|
||||
$oFCKeditor = new FCKeditor('FCKeditor1') ;
|
||||
$oFCKeditor->BasePath = $sBasePath ;
|
||||
|
||||
if ( isset($_GET['Skin']) )
|
||||
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . htmlspecialchars($_GET['Skin']) . '/' ;
|
||||
|
||||
$oFCKeditor->Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
$oFCKeditor->Create() ;
|
||||
?>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
60
admin/FCKeditor/_samples/php/sampleposteddata.php
Normal file
60
admin/FCKeditor/_samples/php/sampleposteddata.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.php
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
* Jim Michaels (jmichae3@yahoo.com)
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if ( isset( $_POST ) )
|
||||
$postArray = &$_POST ; // 4.1.0 or later, use $_POST
|
||||
else
|
||||
$postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
|
||||
|
||||
foreach ( $postArray as $sForm => $value )
|
||||
{
|
||||
$postedValue = htmlspecialchars( stripslashes( $value ) ) ;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td valign="top" nowrap><b><?=$sForm?></b></td>
|
||||
<td width="100%"><?=$postedValue?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
78
admin/FCKeditor/_samples/py/sample01.py
Normal file
78
admin/FCKeditor/_samples/py/sample01.py
Normal file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
FCKeditor - The text editor for internet
|
||||
Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
|
||||
Licensed under the terms of the GNU Lesser General Public License:
|
||||
http://www.opensource.org/licenses/lgpl-license.php
|
||||
|
||||
For further information visit:
|
||||
http://www.fckeditor.net/
|
||||
|
||||
"Support Open Source software. What about a donation today?"
|
||||
|
||||
File Name: sample01.py
|
||||
Sample page.
|
||||
|
||||
File Authors:
|
||||
Andrew Liu (andrew@liuholdings.com)
|
||||
"""
|
||||
|
||||
import cgi
|
||||
import os
|
||||
|
||||
# Ensure that the fckeditor.py is included in your classpath
|
||||
import fckeditor
|
||||
|
||||
# Tell the browser to render html
|
||||
print "Content-Type: text/html"
|
||||
print ""
|
||||
|
||||
# Document header
|
||||
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Python - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features
|
||||
enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.py" method="post" target="_blank">
|
||||
"""
|
||||
|
||||
# This is the real work
|
||||
try:
|
||||
sBasePath = os.environ.get("SCRIPT_NAME")
|
||||
sBasePath = sBasePath[0:sBasePath.find("_samples")]
|
||||
|
||||
oFCKeditor = fckeditor.FCKeditor('FCKeditor1')
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
oFCKeditor.Value = """This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>."""
|
||||
print oFCKeditor.Create()
|
||||
except Exception, e:
|
||||
print e
|
||||
print """
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
"""
|
||||
|
||||
# For testing your environments
|
||||
print "<hr>"
|
||||
for key in os.environ.keys():
|
||||
print "%s: %s<br>" % (key, os.environ.get(key, ""))
|
||||
print "<hr>"
|
||||
|
||||
# Document footer
|
||||
print """
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
|
81
admin/FCKeditor/_samples/py/sampleposteddata.py
Normal file
81
admin/FCKeditor/_samples/py/sampleposteddata.py
Normal file
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
FCKeditor - The text editor for internet
|
||||
Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
|
||||
Licensed under the terms of the GNU Lesser General Public License:
|
||||
http://www.opensource.org/licenses/lgpl-license.php
|
||||
|
||||
For further information visit:
|
||||
http://www.fckeditor.net/
|
||||
|
||||
"Support Open Source software. What about a donation today?"
|
||||
|
||||
File Name: sampleposteddata.py
|
||||
This page lists the data posted by a form.
|
||||
|
||||
File Authors:
|
||||
Andrew Liu (andrew@liuholdings.com)
|
||||
"""
|
||||
|
||||
import cgi
|
||||
import os
|
||||
|
||||
# Tell the browser to render html
|
||||
print "Content-Type: text/html"
|
||||
print ""
|
||||
|
||||
try:
|
||||
# Create a cgi object
|
||||
form = cgi.FieldStorage()
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
# Document header
|
||||
print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
"""
|
||||
|
||||
# This is the real work
|
||||
print """
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
"""
|
||||
for key in form.keys():
|
||||
try:
|
||||
value = form[key].value
|
||||
print """
|
||||
<tr>
|
||||
<td valign="top" nowrap><b>%s</b></td>
|
||||
<td width="100%%">%s</td>
|
||||
</tr>
|
||||
""" % (key, value)
|
||||
except Exception, e:
|
||||
print e
|
||||
print "</table>"
|
||||
|
||||
# For testing your environments
|
||||
print "<hr>"
|
||||
for key in os.environ.keys():
|
||||
print "%s: %s<br>" % (key, os.environ.get(key, ""))
|
||||
print "<hr>"
|
||||
|
||||
# Document footer
|
||||
print """
|
||||
</body>
|
||||
</html>
|
||||
"""
|
46
admin/FCKeditor/_samples/sample.css
Normal file
46
admin/FCKeditor/_samples/sample.css
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sample.css
|
||||
* Styles used in the samples pages.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
body, td, input, select, textarea
|
||||
{
|
||||
font-size: 12px;
|
||||
font-family: Arial, Verdana, Sans-Serif;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-weight: bold;
|
||||
font-size: 180%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
89
admin/FCKeditor/_samples/sampleslist.html
Normal file
89
admin/FCKeditor/_samples/sampleslist.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleslist.html
|
||||
* Page used to select the sample to view.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample Selection</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="sample.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript">
|
||||
|
||||
if ( window.top == window )
|
||||
document.location = 'default.html' ;
|
||||
|
||||
function OpenSample( sample )
|
||||
{
|
||||
if ( sample.length > 0 )
|
||||
window.open( sample, 'Sample' ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin-top: 0px; margin-bottom: 0px;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="height: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
Please select the sample you want to view:
|
||||
<br />
|
||||
<select onchange="OpenSample(this.value);">
|
||||
<option value="html/sample01.html" selected="selected">JavaScript : Sample 01 : Editor
|
||||
with all features</option>
|
||||
<option value="html/sample02.html">JavaScript : Sample 02 : Replacement of a TEXTAREA</option>
|
||||
<option value="html/sample03.html">JavaScript : Sample 03 : Multi-language support</option>
|
||||
<option value="html/sample04.html">JavaScript : Sample 04 : Toolbar selection</option>
|
||||
<option value="html/sample05.html">JavaScript : Sample 05 : Skins support</option>
|
||||
<option value="html/sample06.html">JavaScript : Sample 06 : Plugins support</option>
|
||||
<option value="html/sample07.html">JavaScript : Sample 07 : Full Page editing</option>
|
||||
<option value="html/sample08.html">JavaScript : Sample 08 : Editor API usage</option>
|
||||
<option value="html/sample09.html">JavaScript : Sample 09 : Complex form (multiple editors)</option>
|
||||
<option value="html/sample10.html">JavaScript : Sample 10 : Shared toolbar on same page</option>
|
||||
<option value="html/sample11.html">JavaScript : Sample 11 : Shared toolbar from IFRAME</option>
|
||||
<option value=""></option>
|
||||
<option value="cfm/sample01.cfm">ColdFusion : Sample 01 : Editor with all features</option>
|
||||
<option value="cfm/sample02_mx.cfm">ColdFusion : Sample 02 : Advanced version for ColdFusion
|
||||
MX</option>
|
||||
<option value=""></option>
|
||||
<option value="asp/sample01.asp">ASP : Sample 01 : Editor with all features</option>
|
||||
<option value="asp/sample02.asp">ASP : Sample 02 : Multi-language support</option>
|
||||
<option value="asp/sample03.asp">ASP : Sample 03 : Toolbar selection</option>
|
||||
<option value="asp/sample04.asp">ASP : Sample 04 : Skins support</option>
|
||||
<option value=""></option>
|
||||
<option value="lasso/sample01.lasso">Lasso : Sample 01 : Editor with all features</option>
|
||||
<option value="lasso/sample02.lasso">Lasso : Sample 02 : Multi-language support</option>
|
||||
<option value="lasso/sample03.lasso">Lasso : Sample 03 : Toolbar selection</option>
|
||||
<option value="lasso/sample04.lasso">Lasso : Sample 04 : Skins support</option>
|
||||
<option value=""></option>
|
||||
<option value="perl/sample01.cgi">Perl : Sample 01 : Editor with all features</option>
|
||||
<option value="perl/sample02.cgi">Perl : Sample 02 : Multi-language support</option>
|
||||
<option value="perl/sample03.cgi">Perl : Sample 03 : Toolbar selection</option>
|
||||
<option value="perl/sample04.cgi">Perl : Sample 04 : Skins support</option>
|
||||
<option value=""></option>
|
||||
<option value="php/sample01.php">PHP : Sample 01 : Editor with all features</option>
|
||||
<option value="php/sample02.php">PHP : Sample 02 : Multi-language support</option>
|
||||
<option value="php/sample03.php">PHP : Sample 03 : Toolbar selection</option>
|
||||
<option value="php/sample04.php">PHP : Sample 04 : Skins support</option>
|
||||
<option value=""></option>
|
||||
<option value="py/sample01.py">Python : Sample 01 : Editor with all features</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
72
admin/FCKeditor/_testcases/001.html
Normal file
72
admin/FCKeditor/_testcases/001.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 001.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
<script>
|
||||
|
||||
function SubmitForm()
|
||||
{
|
||||
document.forms[0].submit() ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Test 001</h1>
|
||||
<p>
|
||||
<strong>Expected results</strong>: The editor content must be loaded and the submit
|
||||
button must post the editors html.<br>
|
||||
<strong>Configurations</strong>: Default<br>
|
||||
<strong>Steps to Reproduce</strong>:
|
||||
</p>
|
||||
<ol>
|
||||
<li>Wait the editor to load.</li>
|
||||
<li>Hit the "submit" button and check the posted data.</li>
|
||||
<li>Hit the "submit by code" button and check the posted data.</li>
|
||||
</ol>
|
||||
<p>
|
||||
<hr>
|
||||
</p>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
<input type="button" value="Submit by Code" onclick="SubmitForm();">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
70
admin/FCKeditor/_testcases/002.html
Normal file
70
admin/FCKeditor/_testcases/002.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 002.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 002</h1>
|
||||
<P><STRONG>Expected results</STRONG>: The editor must work correctly when not value
|
||||
has been set<BR>
|
||||
<STRONG>Configurations</STRONG>: Default<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Type some text and format it (use the "Bold" and "Style" commands).
|
||||
<LI>
|
||||
Check the toolbar buttons context sensitiveness.
|
||||
<LI>
|
||||
Switch to Source mode.
|
||||
<LI>
|
||||
Repeat steps 2, 3 and 4.
|
||||
<LI>
|
||||
Hit submit button and check the submitted data.
|
||||
</LI>
|
||||
</OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
72
admin/FCKeditor/_testcases/003.html
Normal file
72
admin/FCKeditor/_testcases/003.html
Normal file
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 003.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 003</h1>
|
||||
<P><STRONG>Expected results</STRONG>: The user must be able to edit the complete
|
||||
page html.<BR>
|
||||
<STRONG>Configurations</STRONG>: FullPage = true ;<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Type some text.
|
||||
<LI>
|
||||
Switch to Source mode.
|
||||
<LI>
|
||||
Switch back to WYSIWYG mode.
|
||||
<LI>
|
||||
Repeat steps 2, 3 and 4.
|
||||
<LI>
|
||||
Hit submit button and check the submitted data.
|
||||
</LI>
|
||||
</OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Config["FullPage"] = true ;
|
||||
oFCKeditor.Value = '<html>\n\n<head><title></title></head><body>This is a Full Page editing Test:<br/>This is an image: <img src="' + sBasePath + 'editor/images/smiley/msn/lightbulb.gif" alt=""/></body></html>' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
105
admin/FCKeditor/_testcases/004.html
Normal file
105
admin/FCKeditor/_testcases/004.html
Normal file
@ -0,0 +1,105 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 004.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
<script language="javascript">
|
||||
|
||||
function Show()
|
||||
{
|
||||
document.getElementById('eEditor').style.display = '' ;
|
||||
document.getElementById('eNoEditor').style.display = 'none' ;
|
||||
|
||||
// This is a hack for Gecko... it stops editing when the editor is hidden.
|
||||
if ( !document.all )
|
||||
{
|
||||
var oEditor = FCKeditorAPI.GetInstance( 'FCKeditor1' ) ;
|
||||
|
||||
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
|
||||
oEditor.MakeEditable() ;
|
||||
}
|
||||
}
|
||||
|
||||
function Hide()
|
||||
{
|
||||
document.getElementById('eEditor').style.display = 'none' ;
|
||||
document.getElementById('eNoEditor').style.display = '' ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="Prova">FCKeditor - Test 004</h1>
|
||||
<P>
|
||||
<STRONG>Expected results</STRONG> : The editor must still work when hidding it
|
||||
programmatically (through javascript).<BR>
|
||||
<STRONG>Configurations</STRONG>: Default<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the page to load.
|
||||
<LI>
|
||||
Hit the "Show Editor" button.
|
||||
<LI>
|
||||
Insert some text and format it.
|
||||
<LI>
|
||||
Hit the "Hide Editor" button.
|
||||
<LI>
|
||||
Hit the "Submit" and check the posted HTML.
|
||||
<LI>
|
||||
Close the "Submit" window.
|
||||
<LI>
|
||||
Hit the "Show Editor" button.
|
||||
<LI>
|
||||
Repeat steps 2 and 4.</LI></OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<div id="eNoEditor">
|
||||
<input type="button" value="Show Editor" onclick="Show();">
|
||||
</div>
|
||||
<div id="eEditor" style="DISPLAY: none">
|
||||
<input type="button" value="Hide Editor" onclick="Hide();">
|
||||
<br><br>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
68
admin/FCKeditor/_testcases/005.html
Normal file
68
admin/FCKeditor/_testcases/005.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 005.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 005</h1>
|
||||
<P>
|
||||
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
|
||||
submit button must post the editors html. No javascript errors should be thrown
|
||||
(security errors).<BR>
|
||||
<STRONG>Configurations</STRONG>: BaseHref = http://www.fckeditor.net
|
||||
<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Create a table with border =
|
||||
0 and an anchor.
|
||||
<LI>Create an image and points it to /images/logotop.gif
|
||||
<LI>Hit submit button and check the posted data.</LI></OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Config['BaseHref'] = 'http://www.fckeditor.net' ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
75
admin/FCKeditor/_testcases/006.html
Normal file
75
admin/FCKeditor/_testcases/006.html
Normal file
@ -0,0 +1,75 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 006.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 006</h1>
|
||||
<P>
|
||||
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
|
||||
submit button must post the editors html. No javascript errors should be thorwn
|
||||
(security errors).<BR>
|
||||
<STRONG>Configurations</STRONG>: BaseHref = http://www.fckeditor.net / FullPage
|
||||
= true
|
||||
<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Create a table with border = 0 and an anchor.
|
||||
<LI>
|
||||
Create an image and points it to /images/logotop.gif
|
||||
<LI>
|
||||
Paste the following CSS tag in the source: <link href="/css/main.css" type="text/css" rel="stylesheet" />
|
||||
<LI>
|
||||
Check the WYSIWYG mode.
|
||||
<LI>
|
||||
Hit submit button and check the posted data.</LI></OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Config['FullPage'] = true ;
|
||||
oFCKeditor.Config['BaseHref'] = 'http://www.fckeditor.net' ;
|
||||
oFCKeditor.Value = '<html><head><title></title></head><body>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</body></html>' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
64
admin/FCKeditor/_testcases/007.html
Normal file
64
admin/FCKeditor/_testcases/007.html
Normal file
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 007.html
|
||||
* Test Page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 007</h1>
|
||||
<P>
|
||||
<STRONG>Expected results</STRONG>: The editor content must be loaded and the
|
||||
submit button must post the editor's html.<BR>
|
||||
<STRONG>Configurations</STRONG>: Default<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Enter some text.
|
||||
<LI>
|
||||
Hit submit button and check the posted data.</LI></OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P></P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = '<div></div>' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
83
admin/FCKeditor/_testcases/008.html
Normal file
83
admin/FCKeditor/_testcases/008.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 008.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function Validate()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Get the editor contents in XHTML.
|
||||
if ( oEditor.GetXHTML( false ).length == 0 )
|
||||
{
|
||||
alert( 'The "Save" command must not submit if the editor is empty' ) ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Test 008</h1>
|
||||
<p>
|
||||
<strong>Expected results</strong>: The editor content must be loaded and the submit
|
||||
button must post the editors html.<br />
|
||||
<strong>Configurations</strong>: Default<br />
|
||||
<strong>Steps to Reproduce</strong>:
|
||||
</p>
|
||||
<ol>
|
||||
<li>Wait the editor to load.</li>
|
||||
<li>Select all the content with the mouse and delete it.</li>
|
||||
<li>Hit the "Save" button - an alert should popup.</li>
|
||||
<li>Insert some text.</li>
|
||||
<li>Hit the "Save" button and check the posted data.</li>
|
||||
<li>Close the data window.</li>
|
||||
<li>Press the "New Page" button.</li>
|
||||
<li>Hit the "Save" button - an alert should popup.</li>
|
||||
</ol>
|
||||
<p>
|
||||
<hr />
|
||||
<p>
|
||||
</p>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="return Validate();">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
109
admin/FCKeditor/_testcases/009.html
Normal file
109
admin/FCKeditor/_testcases/009.html
Normal file
@ -0,0 +1,109 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 009.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
<script>
|
||||
|
||||
function FCKeditor_OnComplete( editorInstance )
|
||||
{
|
||||
// Attach to the event fired when the editor's HTML is set.
|
||||
editorInstance.Events.AttachEvent( 'OnAfterSetHTML', FCKeditor_OnAfterSetHTML ) ;
|
||||
}
|
||||
|
||||
function FCKeditor_OnAfterSetHTML( editorInstance )
|
||||
{
|
||||
// Get the actual color from the combo.
|
||||
var sColor = document.getElementById('ActualColor').value ;
|
||||
|
||||
// Set the color of the editor instance.
|
||||
editorInstance.EditorDocument.body.style.backgroundColor = sColor ;
|
||||
}
|
||||
|
||||
function SetActualColor()
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
|
||||
// Call the event function to set the color.
|
||||
FCKeditor_OnAfterSetHTML( oEditor ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Test 009</h1>
|
||||
<P>
|
||||
<STRONG>Expected results</STRONG> : The user should be able to background color
|
||||
of the editor by code.<BR>
|
||||
<STRONG>Configurations</STRONG>: Default<BR>
|
||||
<STRONG>Steps to Reproduce</STRONG>:
|
||||
</P>
|
||||
<OL>
|
||||
<LI>
|
||||
Wait the editor to load.
|
||||
<LI>
|
||||
Type some text.
|
||||
<LI>
|
||||
Change the background color using the combo.
|
||||
<LI>
|
||||
Type more text.
|
||||
<LI>
|
||||
Switch to source view.
|
||||
<LI>
|
||||
Switch back to WYSIWYG. The background color must be the same.
|
||||
<LI>
|
||||
Repeate steps 3 to 6.
|
||||
<LI>
|
||||
Submit the form.</LI></OL>
|
||||
<P>
|
||||
<hr>
|
||||
<P>
|
||||
Select a color for the background:<br>
|
||||
<select id="ActualColor" onchange="SetActualColor();">
|
||||
<option value="white" selected>White</option>
|
||||
<option value="red">Red</option>
|
||||
<option value="green">Green</option>
|
||||
<option value="gold">Gold</option>
|
||||
</select>
|
||||
</P>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
89
admin/FCKeditor/_testcases/010.html
Normal file
89
admin/FCKeditor/_testcases/010.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: 010.html
|
||||
* Test page.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../fckeditor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function SubmitForm()
|
||||
{
|
||||
document.forms[0].submit() ;
|
||||
}
|
||||
|
||||
function SetToolbar( toolbarName )
|
||||
{
|
||||
// Get the editor instance that we want to interact with.
|
||||
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
|
||||
oEditor.ToolbarSet.Load( toolbarName ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Test 010</h1>
|
||||
<p>
|
||||
<strong>Expected results</strong>: The editor content must be loaded and the the
|
||||
user must be able to change the toolbar dinamically (without reloading the page).<br />
|
||||
<strong>Configurations</strong>: Default<br />
|
||||
<strong>Steps to Reproduce</strong>:
|
||||
</p>
|
||||
<ol>
|
||||
<li>Wait the editor to load.</li>
|
||||
<li>Select some text and format it.</li>
|
||||
<li>Select the "Basic" toolbar.</li>
|
||||
<li>Format more text.</li>
|
||||
<li>Select the "Default" toolbar.</li>
|
||||
<li>Go to "Source" view.</li>
|
||||
<li>Select the "Basic" toolbar.</li>
|
||||
<li>Select the "Default" toolbar.</li>
|
||||
<li>Go to "WYSIWYG" view.</li>
|
||||
<li>Hit submit button and check the posted data.</li></ol>
|
||||
<hr />
|
||||
<p>
|
||||
Select the toolbar you want to load:<br />
|
||||
<select onchange="SetToolbar( this.value );">
|
||||
<option value="Default" selected="selected">Default</option>
|
||||
<option value="Basic">Basic</option>
|
||||
</select>
|
||||
</p>
|
||||
<form action="sampleposteddata.asp" method="post" target="_blank">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
// Automatically calculates the editor base path based on the _samples directory.
|
||||
// This is usefull only for these samples. A real application should use something like this:
|
||||
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
|
||||
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_testcases')) ;
|
||||
|
||||
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
|
||||
oFCKeditor.BasePath = sBasePath ;
|
||||
oFCKeditor.Value = 'This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.' ;
|
||||
oFCKeditor.Create() ;
|
||||
//-->
|
||||
</script>
|
||||
<br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
68
admin/FCKeditor/_testcases/sampleposteddata.asp
Normal file
68
admin/FCKeditor/_testcases/sampleposteddata.asp
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!--
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: sampleposteddata.asp
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<link href="testcases.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
FCKeditor - Samples - Posted Data</h1>
|
||||
<div>
|
||||
This page lists all data posted by the form.
|
||||
</div>
|
||||
<hr />
|
||||
<table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
|
||||
<tr style="font-weight: bold; color: #dddddd; background-color: #999999">
|
||||
<td style="white-space: nowrap;">
|
||||
Field Name </td>
|
||||
<td>
|
||||
Value</td>
|
||||
</tr>
|
||||
<% For Each sForm in Request.Form %>
|
||||
<tr>
|
||||
<td valign="top" style="white-space: nowrap;">
|
||||
<b>
|
||||
<%=sForm%>
|
||||
</b>
|
||||
</td>
|
||||
<td style="width: 100%;">
|
||||
<pre><%=ModifyForOutput( Request.Form(sForm) )%></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<%
|
||||
|
||||
' This function is useful only for this sample page se whe can display the
|
||||
' posted data accordingly. This processing is usually not done on real
|
||||
' applications, where the posted data must be saved on a DB or file. In those
|
||||
' cases, no processing must be done, and the data is saved as posted.
|
||||
Function ModifyForOutput( value )
|
||||
|
||||
ModifyForOutput = Server.HTMLEncode( Request.Form(sForm) )
|
||||
|
||||
End Function
|
||||
|
||||
%>
|
46
admin/FCKeditor/_testcases/testcases.css
Normal file
46
admin/FCKeditor/_testcases/testcases.css
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: testcases.css
|
||||
* Styles used in the samples pages.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
body, td, input, select, textarea
|
||||
{
|
||||
font-size: 12px;
|
||||
font-family: Arial, Verdana, Sans-Serif;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-weight: bold;
|
||||
font-size: 180%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
form
|
||||
{
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
pre
|
||||
{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
2364
admin/FCKeditor/_whatsnew.html
Normal file
2364
admin/FCKeditor/_whatsnew.html
Normal file
File diff suppressed because it is too large
Load Diff
123
admin/FCKeditor/editor/_source/classes/fckcontextmenu.js
Normal file
123
admin/FCKeditor/editor/_source/classes/fckcontextmenu.js
Normal file
@ -0,0 +1,123 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckcontextmenu.js
|
||||
* FCKContextMenu Class: renders an control a context menu.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKContextMenu = function( parentWindow, mouseClickWindow, langDir )
|
||||
{
|
||||
var oPanel = this._Panel = new FCKPanel( parentWindow, true ) ;
|
||||
oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
||||
oPanel.IsContextMenu = true ;
|
||||
|
||||
var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ;
|
||||
oMenuBlock.Panel = oPanel ;
|
||||
oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ;
|
||||
|
||||
this._Redraw = true ;
|
||||
|
||||
this.SetMouseClickWindow( mouseClickWindow || parentWindow ) ;
|
||||
}
|
||||
|
||||
|
||||
FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow )
|
||||
{
|
||||
if ( !FCKBrowserInfo.IsIE )
|
||||
{
|
||||
this._Document = mouseClickWindow.document ;
|
||||
this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
|
||||
{
|
||||
var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled) ;
|
||||
this._Redraw = true ;
|
||||
return oItem ;
|
||||
}
|
||||
|
||||
FCKContextMenu.prototype.AddSeparator = function()
|
||||
{
|
||||
this._MenuBlock.AddSeparator() ;
|
||||
this._Redraw = true ;
|
||||
}
|
||||
|
||||
FCKContextMenu.prototype.RemoveAllItems = function()
|
||||
{
|
||||
this._MenuBlock.RemoveAllItems() ;
|
||||
this._Redraw = true ;
|
||||
}
|
||||
|
||||
FCKContextMenu.prototype.AttachToElement = function( element )
|
||||
{
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
FCKTools.AddEventListenerEx( element, 'contextmenu', FCKContextMenu_AttachedElement_OnContextMenu, this ) ;
|
||||
else
|
||||
element._FCKContextMenu = this ;
|
||||
|
||||
// element.onmouseup = FCKContextMenu_AttachedElement_OnMouseUp ;
|
||||
}
|
||||
|
||||
function FCKContextMenu_Document_OnContextMenu( e )
|
||||
{
|
||||
var el = e.target ;
|
||||
|
||||
while ( el )
|
||||
{
|
||||
if ( el._FCKContextMenu )
|
||||
{
|
||||
FCKTools.CancelEvent( e ) ;
|
||||
FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ;
|
||||
}
|
||||
el = el.parentNode ;
|
||||
}
|
||||
}
|
||||
|
||||
function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el )
|
||||
{
|
||||
// var iButton = e ? e.which - 1 : event.button ;
|
||||
|
||||
// if ( iButton != 2 )
|
||||
// return ;
|
||||
|
||||
var eTarget = el || this ;
|
||||
|
||||
if ( fckContextMenu.OnBeforeOpen )
|
||||
fckContextMenu.OnBeforeOpen.call( fckContextMenu, eTarget ) ;
|
||||
|
||||
if ( fckContextMenu._MenuBlock.Count() == 0 )
|
||||
return false ;
|
||||
|
||||
if ( fckContextMenu._Redraw )
|
||||
{
|
||||
fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ;
|
||||
fckContextMenu._Redraw = false ;
|
||||
}
|
||||
|
||||
fckContextMenu._Panel.Show(
|
||||
ev.pageX || ev.screenX,
|
||||
ev.pageY || ev.screenY,
|
||||
ev.currentTarget || null
|
||||
) ;
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
function FCKContextMenu_MenuBlock_OnClick( menuItem, contextMenu )
|
||||
{
|
||||
contextMenu._Panel.Hide() ;
|
||||
FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ;
|
||||
}
|
190
admin/FCKeditor/editor/_source/classes/fckeditingarea.js
Normal file
190
admin/FCKeditor/editor/_source/classes/fckeditingarea.js
Normal file
@ -0,0 +1,190 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckeditingarea.js
|
||||
* FCKEditingArea Class: renders an editable area.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {String} targetElement The element that will hold the editing area. Any child element present in the target will be deleted.
|
||||
*/
|
||||
var FCKEditingArea = function( targetElement )
|
||||
{
|
||||
this.TargetElement = targetElement ;
|
||||
this.Mode = FCK_EDITMODE_WYSIWYG ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKEditingArea_Cleanup ) ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} html The complete HTML for the page, including DOCTYPE and the <html> tag.
|
||||
*/
|
||||
FCKEditingArea.prototype.Start = function( html, secondCall )
|
||||
{
|
||||
var eTargetElement = this.TargetElement ;
|
||||
var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ;
|
||||
|
||||
// Remove all child nodes from the target.
|
||||
while( eTargetElement.childNodes.length > 0 )
|
||||
eTargetElement.removeChild( eTargetElement.childNodes[0] ) ;
|
||||
|
||||
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
|
||||
{
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
html = html.replace( /(<body[^>]*>)\s*(<\/body>)/i, '$1' + GECKO_BOGUS + '$2' ) ;
|
||||
|
||||
// Create the editing area IFRAME.
|
||||
var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
|
||||
oIFrame.src = 'javascript:void(0)' ;
|
||||
oIFrame.frameBorder = 0 ;
|
||||
oIFrame.width = oIFrame.height = '100%' ;
|
||||
|
||||
// Append the new IFRAME to the target.
|
||||
eTargetElement.appendChild( oIFrame ) ;
|
||||
|
||||
// IE has a bug with the <base> tag... it must have a </base> closer,
|
||||
// otherwise the all sucessive tags will be set as children nodes of the <base>.
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
html = html.replace( /(<base[^>]*?)\s*\/?>(?!\s*<\/base>)/gi, '$1></base>' ) ;
|
||||
|
||||
// Get the window and document objects used to interact with the newly created IFRAME.
|
||||
this.Window = oIFrame.contentWindow ;
|
||||
|
||||
// IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
|
||||
// TODO: This error handler is not being fired.
|
||||
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
|
||||
|
||||
var oDoc = this.Document = this.Window.document ;
|
||||
|
||||
oDoc.open() ;
|
||||
oDoc.write( html ) ;
|
||||
oDoc.close() ;
|
||||
|
||||
// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
|
||||
// will magicaly work.
|
||||
if ( FCKBrowserInfo.IsGecko10 && !secondCall )
|
||||
{
|
||||
this.Start( html, true ) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
this.Window._FCKEditingArea = this ;
|
||||
|
||||
// FF 1.0.x is buggy... we must wait a lot to enable editing because
|
||||
// sometimes the content simply disappears, for example when pasting
|
||||
// "bla1!<img src='some_url'>!bla2" in the source and then switching
|
||||
// back to design.
|
||||
if ( FCKBrowserInfo.IsGecko10 )
|
||||
this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
|
||||
else
|
||||
FCKEditingArea_CompleteStart.call( this.Window ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ;
|
||||
eTextarea.className = 'SourceField' ;
|
||||
eTextarea.dir = 'ltr' ;
|
||||
eTextarea.style.width = eTextarea.style.height = '100%' ;
|
||||
eTextarea.style.border = 'none' ;
|
||||
eTargetElement.appendChild( eTextarea ) ;
|
||||
|
||||
eTextarea.value = html ;
|
||||
|
||||
// Fire the "OnLoad" event.
|
||||
FCKTools.RunFunction( this.OnLoad ) ;
|
||||
}
|
||||
}
|
||||
|
||||
// "this" here is FCKEditingArea.Window
|
||||
function FCKEditingArea_CompleteStart()
|
||||
{
|
||||
// Of Firefox, the DOM takes a little to become available. So we must wait for it in a loop.
|
||||
if ( !this.document.body )
|
||||
{
|
||||
this.setTimeout( FCKEditingArea_CompleteStart, 50 ) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
var oEditorArea = this._FCKEditingArea ;
|
||||
oEditorArea.MakeEditable() ;
|
||||
|
||||
// Fire the "OnLoad" event.
|
||||
FCKTools.RunFunction( oEditorArea.OnLoad ) ;
|
||||
}
|
||||
|
||||
FCKEditingArea.prototype.MakeEditable = function()
|
||||
{
|
||||
var oDoc = this.Document ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
oDoc.body.contentEditable = true ;
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
oDoc.designMode = 'on' ;
|
||||
|
||||
// Tell Gecko to use or not the <SPAN> tag for the bold, italic and underline.
|
||||
oDoc.execCommand( 'useCSS', false, !FCKConfig.GeckoUseSPAN ) ;
|
||||
|
||||
// Analysing Firefox 1.5 source code, it seams that there is support for a
|
||||
// "insertBrOnReturn" command. Applying it gives no error, but it doesn't
|
||||
// gives the same behavior that you have with IE. It works only if you are
|
||||
// already inside a paragraph and it doesn't render correctly in the first enter.
|
||||
// oDoc.execCommand( 'insertBrOnReturn', false, false ) ;
|
||||
|
||||
// Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez)
|
||||
oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ;
|
||||
|
||||
// Disable the standard table editing features of Firefox.
|
||||
oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
FCKEditingArea.prototype.Focus = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
|
||||
{
|
||||
if ( FCKBrowserInfo.IsSafari )
|
||||
this.IFrame.focus() ;
|
||||
else
|
||||
this.Window.focus() ;
|
||||
}
|
||||
else
|
||||
this.Textarea.focus() ;
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
|
||||
function FCKEditingArea_Cleanup()
|
||||
{
|
||||
this.TargetElement = null ;
|
||||
this.IFrame = null ;
|
||||
this.Document = null ;
|
||||
this.Textarea = null ;
|
||||
|
||||
if ( this.Window )
|
||||
{
|
||||
this.Window._FCKEditingArea = null ;
|
||||
this.Window = null ;
|
||||
}
|
||||
}
|
51
admin/FCKeditor/editor/_source/classes/fckevents.js
Normal file
51
admin/FCKeditor/editor/_source/classes/fckevents.js
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckevents.js
|
||||
* FCKEvents Class: used to handle events is a advanced way.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKEvents ;
|
||||
|
||||
FCKEvents = function( eventsOwner )
|
||||
{
|
||||
this.Owner = eventsOwner ;
|
||||
this.RegisteredEvents = new Object() ;
|
||||
}
|
||||
|
||||
FCKEvents.prototype.AttachEvent = function( eventName, functionPointer )
|
||||
{
|
||||
var aTargets ;
|
||||
|
||||
if ( !( aTargets = this.RegisteredEvents[ eventName ] ) )
|
||||
this.RegisteredEvents[ eventName ] = [ functionPointer ] ;
|
||||
else
|
||||
aTargets.push( functionPointer ) ;
|
||||
}
|
||||
|
||||
FCKEvents.prototype.FireEvent = function( eventName, params )
|
||||
{
|
||||
var bReturnValue = true ;
|
||||
|
||||
var oCalls = this.RegisteredEvents[ eventName ] ;
|
||||
|
||||
if ( oCalls )
|
||||
{
|
||||
for ( var i = 0 ; i < oCalls.length ; i++ )
|
||||
bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ;
|
||||
}
|
||||
|
||||
return bReturnValue ;
|
||||
}
|
94
admin/FCKeditor/editor/_source/classes/fckicon.js
Normal file
94
admin/FCKeditor/editor/_source/classes/fckicon.js
Normal file
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckicon.js
|
||||
* FCKIcon Class: renders an icon from a single image, a strip or even a
|
||||
* spacer.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKIcon = function( iconPathOrStripInfoArray )
|
||||
{
|
||||
var sTypeOf = iconPathOrStripInfoArray ? typeof( iconPathOrStripInfoArray ) : 'undefined' ;
|
||||
switch ( sTypeOf )
|
||||
{
|
||||
case 'number' :
|
||||
this.Path = FCKConfig.SkinPath + 'fck_strip.gif' ;
|
||||
this.Size = 16 ;
|
||||
this.Position = iconPathOrStripInfoArray ;
|
||||
break ;
|
||||
|
||||
case 'undefined' :
|
||||
this.Path = FCK_SPACER_PATH ;
|
||||
break ;
|
||||
|
||||
case 'string' :
|
||||
this.Path = iconPathOrStripInfoArray ;
|
||||
break ;
|
||||
|
||||
default :
|
||||
// It is an array in the format [ StripFilePath, IconSize, IconPosition ]
|
||||
this.Path = iconPathOrStripInfoArray[0] ;
|
||||
this.Size = iconPathOrStripInfoArray[1] ;
|
||||
this.Position = iconPathOrStripInfoArray[2] ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKIcon.prototype.CreateIconElement = function( document )
|
||||
{
|
||||
var eIcon ;
|
||||
|
||||
if ( this.Position ) // It is using an icons strip image.
|
||||
{
|
||||
var sPos = '-' + ( ( this.Position - 1 ) * this.Size ) + 'px' ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
// <div class="TB_Button_Image"><img src="strip.gif" style="top:-16px"></div>
|
||||
|
||||
eIcon = document.createElement( 'DIV' ) ;
|
||||
|
||||
var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
|
||||
eIconImage.src = this.Path ;
|
||||
eIconImage.style.top = sPos ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// <img class="TB_Button_Image" src="spacer.gif" style="background-position: 0px -16px;background-image: url(strip.gif);">
|
||||
|
||||
eIcon = document.createElement( 'IMG' ) ;
|
||||
eIcon.src = FCK_SPACER_PATH ;
|
||||
eIcon.style.backgroundPosition = '0px ' + sPos ;
|
||||
eIcon.style.backgroundImage = 'url(' + this.Path + ')' ;
|
||||
}
|
||||
}
|
||||
else // It is using a single icon image.
|
||||
{
|
||||
// This is not working well with IE. See notes bellow.
|
||||
// <img class="TB_Button_Image" src="smiley.gif">
|
||||
// eIcon = document.createElement( 'IMG' ) ;
|
||||
// eIcon.src = this.Path ? this.Path : FCK_SPACER_PATH ;
|
||||
|
||||
// IE makes the button 1px higher if using the <img> directly, so we
|
||||
// are changing to the <div> system to clip the image correctly.
|
||||
eIcon = document.createElement( 'DIV' ) ;
|
||||
|
||||
var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
|
||||
eIconImage.src = this.Path ? this.Path : FCK_SPACER_PATH ;
|
||||
}
|
||||
|
||||
eIcon.className = 'TB_Button_Image' ;
|
||||
|
||||
return eIcon ;
|
||||
}
|
51
admin/FCKeditor/editor/_source/classes/fckiecleanup.js
Normal file
51
admin/FCKeditor/editor/_source/classes/fckiecleanup.js
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckiecleanup.js
|
||||
* FCKIECleanup Class: a generic class used as a tool to remove IE leaks.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
|
||||
var FCKIECleanup = function( attachWindow )
|
||||
{
|
||||
|
||||
this.Items = new Array() ;
|
||||
|
||||
attachWindow._FCKCleanupObj = this ;
|
||||
attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ;
|
||||
}
|
||||
|
||||
FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction )
|
||||
{
|
||||
this.Items.push( [ dirtyItem, cleanupFunction ] ) ;
|
||||
}
|
||||
|
||||
function FCKIECleanup_Cleanup()
|
||||
{
|
||||
var aItems = this._FCKCleanupObj.Items ;
|
||||
var iLenght = aItems.length ;
|
||||
|
||||
for ( var i = 0 ; i < iLenght ; i++ )
|
||||
{
|
||||
var oItem = aItems[i] ;
|
||||
oItem[1].call( oItem[0] ) ;
|
||||
aItems[i] = null ;
|
||||
}
|
||||
|
||||
this._FCKCleanupObj = null ;
|
||||
|
||||
if ( CollectGarbage )
|
||||
CollectGarbage() ;
|
||||
}
|
140
admin/FCKeditor/editor/_source/classes/fckmenublock.js
Normal file
140
admin/FCKeditor/editor/_source/classes/fckmenublock.js
Normal file
@ -0,0 +1,140 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckmenublock.js
|
||||
* Renders a list of menu items.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
|
||||
var FCKMenuBlock = function()
|
||||
{
|
||||
this._Items = new Array() ;
|
||||
}
|
||||
|
||||
|
||||
FCKMenuBlock.prototype.Count = function()
|
||||
{
|
||||
return this._Items.length ;
|
||||
}
|
||||
|
||||
FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
|
||||
{
|
||||
var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
|
||||
|
||||
oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ;
|
||||
oItem.OnActivate = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnActivate, this ) ;
|
||||
|
||||
this._Items.push( oItem ) ;
|
||||
|
||||
return oItem ;
|
||||
}
|
||||
|
||||
FCKMenuBlock.prototype.AddSeparator = function()
|
||||
{
|
||||
this._Items.push( new FCKMenuSeparator() ) ;
|
||||
}
|
||||
|
||||
FCKMenuBlock.prototype.RemoveAllItems = function()
|
||||
{
|
||||
this._Items = new Array() ;
|
||||
|
||||
var eItemsTable = this._ItemsTable ;
|
||||
if ( eItemsTable )
|
||||
{
|
||||
while ( eItemsTable.rows.length > 0 )
|
||||
eItemsTable.deleteRow( 0 ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKMenuBlock.prototype.Create = function( parentElement )
|
||||
{
|
||||
if ( !this._ItemsTable )
|
||||
{
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKMenuBlock_Cleanup ) ;
|
||||
|
||||
this._Window = FCKTools.GetElementWindow( parentElement ) ;
|
||||
|
||||
var oDoc = FCKTools.GetElementDocument( parentElement ) ;
|
||||
|
||||
var eTable = parentElement.appendChild( oDoc.createElement( 'table' ) ) ;
|
||||
eTable.cellPadding = 0 ;
|
||||
eTable.cellSpacing = 0 ;
|
||||
|
||||
FCKTools.DisableSelection( eTable ) ;
|
||||
|
||||
var oMainElement = eTable.insertRow(-1).insertCell(-1) ;
|
||||
oMainElement.className = 'MN_Menu' ;
|
||||
|
||||
var eItemsTable = this._ItemsTable = oMainElement.appendChild( oDoc.createElement( 'table' ) ) ;
|
||||
eItemsTable.cellPadding = 0 ;
|
||||
eItemsTable.cellSpacing = 0 ;
|
||||
}
|
||||
|
||||
for ( var i = 0 ; i < this._Items.length ; i++ )
|
||||
this._Items[i].Create( this._ItemsTable ) ;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
|
||||
function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock )
|
||||
{
|
||||
FCKTools.RunFunction( menuBlock.OnClick, menuBlock, [ clickedItem ] ) ;
|
||||
}
|
||||
|
||||
function FCKMenuBlock_Item_OnActivate( menuBlock )
|
||||
{
|
||||
var oActiveItem = menuBlock._ActiveItem ;
|
||||
|
||||
if ( oActiveItem && oActiveItem != this )
|
||||
{
|
||||
// Set the focus to this menu block window (to fire OnBlur on opened panels).
|
||||
if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu )
|
||||
menuBlock._Window.focus() ;
|
||||
|
||||
oActiveItem.Deactivate() ;
|
||||
}
|
||||
|
||||
menuBlock._ActiveItem = this ;
|
||||
}
|
||||
|
||||
function FCKMenuBlock_Cleanup()
|
||||
{
|
||||
this._Window = null ;
|
||||
this._ItemsTable = null ;
|
||||
}
|
||||
|
||||
// ################# //
|
||||
|
||||
var FCKMenuSeparator = function()
|
||||
{}
|
||||
|
||||
FCKMenuSeparator.prototype.Create = function( parentTable )
|
||||
{
|
||||
var oDoc = FCKTools.GetElementDocument( parentTable ) ;
|
||||
|
||||
var r = parentTable.insertRow(-1) ;
|
||||
|
||||
var eCell = r.insertCell(-1) ;
|
||||
eCell.className = 'MN_Separator MN_Icon' ;
|
||||
|
||||
eCell = r.insertCell(-1) ;
|
||||
eCell.className = 'MN_Separator' ;
|
||||
eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ;
|
||||
|
||||
eCell = r.insertCell(-1) ;
|
||||
eCell.className = 'MN_Separator' ;
|
||||
eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ;
|
||||
}
|
51
admin/FCKeditor/editor/_source/classes/fckmenublockpanel.js
Normal file
51
admin/FCKeditor/editor/_source/classes/fckmenublockpanel.js
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckmenublockpanel.js
|
||||
* This class is a menu block that behaves like a panel. It's a mix of the
|
||||
* FCKMenuBlock and FCKPanel classes.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
|
||||
var FCKMenuBlockPanel = function()
|
||||
{
|
||||
// Call the "base" constructor.
|
||||
FCKMenuBlock.call( this ) ;
|
||||
}
|
||||
|
||||
FCKMenuBlockPanel.prototype = new FCKMenuBlock() ;
|
||||
|
||||
|
||||
// Override the create method.
|
||||
FCKMenuBlockPanel.prototype.Create = function()
|
||||
{
|
||||
var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ;
|
||||
oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
||||
|
||||
// Call the "base" implementation.
|
||||
FCKMenuBlock.prototype.Create.call( this, oPanel.MainNode ) ;
|
||||
}
|
||||
|
||||
FCKMenuBlockPanel.prototype.Show = function( x, y, relElement )
|
||||
{
|
||||
if ( !this.Panel.CheckIsOpened() )
|
||||
this.Panel.Show( x, y, relElement ) ;
|
||||
}
|
||||
|
||||
FCKMenuBlockPanel.prototype.Hide = function()
|
||||
{
|
||||
if ( this.Panel.CheckIsOpened() )
|
||||
this.Panel.Hide() ;
|
||||
}
|
157
admin/FCKeditor/editor/_source/classes/fckmenuitem.js
Normal file
157
admin/FCKeditor/editor/_source/classes/fckmenuitem.js
Normal file
@ -0,0 +1,157 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckmenuitem.js
|
||||
* Defines and renders a menu items in a menu block.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
|
||||
var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled )
|
||||
{
|
||||
this.Name = name ;
|
||||
this.Label = label || name ;
|
||||
this.IsDisabled = isDisabled ;
|
||||
|
||||
this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ;
|
||||
|
||||
this.SubMenu = new FCKMenuBlockPanel() ;
|
||||
this.SubMenu.Parent = parentMenuBlock ;
|
||||
this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKMenuItem_Cleanup ) ;
|
||||
}
|
||||
|
||||
|
||||
FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
|
||||
{
|
||||
this.HasSubMenu = true ;
|
||||
return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
|
||||
}
|
||||
|
||||
FCKMenuItem.prototype.AddSeparator = function()
|
||||
{
|
||||
this.SubMenu.AddSeparator() ;
|
||||
}
|
||||
|
||||
FCKMenuItem.prototype.Create = function( parentTable )
|
||||
{
|
||||
var bHasSubMenu = this.HasSubMenu ;
|
||||
|
||||
var oDoc = FCKTools.GetElementDocument( parentTable ) ;
|
||||
|
||||
// Add a row in the table to hold the menu item.
|
||||
var r = this.MainElement = parentTable.insertRow(-1) ;
|
||||
r.className = this.IsDisabled ? 'MN_Item_Disabled' : 'MN_Item' ;
|
||||
|
||||
// Set the row behavior.
|
||||
if ( !this.IsDisabled )
|
||||
{
|
||||
FCKTools.AddEventListenerEx( r, 'mouseover', FCKMenuItem_OnMouseOver, [ this ] ) ;
|
||||
FCKTools.AddEventListenerEx( r, 'click', FCKMenuItem_OnClick, [ this ] ) ;
|
||||
|
||||
if ( !bHasSubMenu )
|
||||
FCKTools.AddEventListenerEx( r, 'mouseout', FCKMenuItem_OnMouseOut, [ this ] ) ;
|
||||
}
|
||||
|
||||
// Create the icon cell.
|
||||
var eCell = r.insertCell(-1) ;
|
||||
eCell.className = 'MN_Icon' ;
|
||||
eCell.appendChild( this.Icon.CreateIconElement( oDoc ) ) ;
|
||||
|
||||
// Create the label cell.
|
||||
eCell = r.insertCell(-1) ;
|
||||
eCell.className = 'MN_Label' ;
|
||||
eCell.noWrap = true ;
|
||||
eCell.appendChild( oDoc.createTextNode( this.Label ) ) ;
|
||||
|
||||
// Create the arrow cell and setup the sub menu panel (if needed).
|
||||
eCell = r.insertCell(-1) ;
|
||||
if ( bHasSubMenu )
|
||||
{
|
||||
eCell.className = 'MN_Arrow' ;
|
||||
|
||||
// The arrow is a fixed size image.
|
||||
var eArrowImg = eCell.appendChild( oDoc.createElement( 'IMG' ) ) ;
|
||||
eArrowImg.src = FCK_IMAGES_PATH + 'arrow_' + FCKLang.Dir + '.gif' ;
|
||||
eArrowImg.width = 4 ;
|
||||
eArrowImg.height = 7 ;
|
||||
|
||||
this.SubMenu.Create() ;
|
||||
this.SubMenu.Panel.OnHide = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnHide, this ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKMenuItem.prototype.Activate = function()
|
||||
{
|
||||
this.MainElement.className = 'MN_Item_Over' ;
|
||||
|
||||
if ( this.HasSubMenu )
|
||||
{
|
||||
// Show the child menu block. The ( +2, -2 ) correction is done because
|
||||
// of the padding in the skin. It is not a good solution because one
|
||||
// could change the skin and so the final result would not be accurate.
|
||||
// For now it is ok because we are controlling the skin.
|
||||
this.SubMenu.Show( this.MainElement.offsetWidth + 2, -2, this.MainElement ) ;
|
||||
}
|
||||
|
||||
FCKTools.RunFunction( this.OnActivate, this ) ;
|
||||
}
|
||||
|
||||
FCKMenuItem.prototype.Deactivate = function()
|
||||
{
|
||||
this.MainElement.className = 'MN_Item' ;
|
||||
|
||||
if ( this.HasSubMenu )
|
||||
this.SubMenu.Hide() ;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
|
||||
function FCKMenuItem_SubMenu_OnClick( clickedItem, listeningItem )
|
||||
{
|
||||
FCKTools.RunFunction( listeningItem.OnClick, listeningItem, [ clickedItem ] ) ;
|
||||
}
|
||||
|
||||
function FCKMenuItem_SubMenu_OnHide( menuItem )
|
||||
{
|
||||
menuItem.Deactivate() ;
|
||||
}
|
||||
|
||||
function FCKMenuItem_OnClick( ev, menuItem )
|
||||
{
|
||||
if ( menuItem.HasSubMenu )
|
||||
menuItem.Activate() ;
|
||||
else
|
||||
{
|
||||
menuItem.Deactivate() ;
|
||||
FCKTools.RunFunction( menuItem.OnClick, menuItem, [ menuItem ] ) ;
|
||||
}
|
||||
}
|
||||
|
||||
function FCKMenuItem_OnMouseOver( ev, menuItem )
|
||||
{
|
||||
menuItem.Activate() ;
|
||||
}
|
||||
|
||||
function FCKMenuItem_OnMouseOut( ev, menuItem )
|
||||
{
|
||||
menuItem.Deactivate() ;
|
||||
}
|
||||
|
||||
function FCKMenuItem_Cleanup()
|
||||
{
|
||||
this.MainElement = null ;
|
||||
}
|
295
admin/FCKeditor/editor/_source/classes/fckpanel.js
Normal file
295
admin/FCKeditor/editor/_source/classes/fckpanel.js
Normal file
@ -0,0 +1,295 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckpanel.js
|
||||
* Component that creates floating panels. It is used by many
|
||||
* other components, like the toolbar items, context menu, etc...
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
|
||||
var FCKPanel = function( parentWindow )
|
||||
{
|
||||
this.IsRTL = ( FCKLang.Dir == 'rtl' ) ;
|
||||
this.IsContextMenu = false ;
|
||||
this._LockCounter = 0 ;
|
||||
|
||||
this._Window = parentWindow || window ;
|
||||
|
||||
var oDocument ;
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
// Create the Popup that will hold the panel.
|
||||
this._Popup = this._Window.createPopup() ;
|
||||
oDocument = this.Document = this._Popup.document ;
|
||||
}
|
||||
else
|
||||
{
|
||||
var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ;
|
||||
oIFrame.src = 'javascript:void(0)' ;
|
||||
oIFrame.allowTransparency = true ;
|
||||
oIFrame.frameBorder = '0' ;
|
||||
oIFrame.scrolling = 'no' ;
|
||||
oIFrame.style.position = 'absolute';
|
||||
oIFrame.style.zIndex = FCKConfig.FloatingPanelsZIndex ;
|
||||
oIFrame.width = oIFrame.height = 0 ;
|
||||
|
||||
if ( this._Window == window.parent && window.frameElement )
|
||||
window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ;
|
||||
else
|
||||
this._Window.document.body.appendChild( oIFrame ) ;
|
||||
|
||||
var oIFrameWindow = oIFrame.contentWindow ;
|
||||
|
||||
oDocument = this.Document = oIFrameWindow.document ;
|
||||
|
||||
// Initialize the IFRAME document body.
|
||||
oDocument.open() ;
|
||||
oDocument.write( '<html><head></head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ;
|
||||
oDocument.close() ;
|
||||
|
||||
FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ;
|
||||
FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ;
|
||||
}
|
||||
|
||||
oDocument.dir = FCKLang.Dir ;
|
||||
|
||||
oDocument.oncontextmenu = FCKTools.CancelEvent ;
|
||||
|
||||
|
||||
// Create the main DIV that is used as the panel base.
|
||||
this.MainNode = oDocument.body.appendChild( oDocument.createElement('DIV') ) ;
|
||||
|
||||
// The "float" property must be set so Firefox calculates the size correcly.
|
||||
this.MainNode.style.cssFloat = this.IsRTL ? 'right' : 'left' ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ;
|
||||
}
|
||||
|
||||
|
||||
FCKPanel.prototype.AppendStyleSheet = function( styleSheet )
|
||||
{
|
||||
FCKTools.AppendStyleSheet( this.Document, styleSheet ) ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.Preload = function( x, y, relElement )
|
||||
{
|
||||
// The offsetWidth and offsetHeight properties are not available if the
|
||||
// element is not visible. So we must "show" the popup with no size to
|
||||
// be able to use that values in the second call (IE only).
|
||||
if ( this._Popup )
|
||||
this._Popup.show( x, y, 0, 0, relElement ) ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.Show = function( x, y, relElement, width, height )
|
||||
{
|
||||
if ( this._Popup )
|
||||
{
|
||||
// The offsetWidth and offsetHeight properties are not available if the
|
||||
// element is not visible. So we must "show" the popup with no size to
|
||||
// be able to use that values in the second call.
|
||||
this._Popup.show( x, y, 0, 0, relElement ) ;
|
||||
|
||||
// The following lines must be place after the above "show", otherwise it
|
||||
// doesn't has the desired effect.
|
||||
this.MainNode.style.width = width ? width + 'px' : '' ;
|
||||
this.MainNode.style.height = height ? height + 'px' : '' ;
|
||||
|
||||
var iMainWidth = this.MainNode.offsetWidth ;
|
||||
|
||||
if ( this.IsRTL )
|
||||
{
|
||||
if ( this.IsContextMenu )
|
||||
x = x - iMainWidth + 1 ;
|
||||
else if ( relElement )
|
||||
x = ( x * -1 ) + relElement.offsetWidth - iMainWidth ;
|
||||
}
|
||||
|
||||
// Second call: Show the Popup at the specified location, with the correct size.
|
||||
this._Popup.show( x, y, iMainWidth, this.MainNode.offsetHeight, relElement ) ;
|
||||
|
||||
if ( this.OnHide )
|
||||
{
|
||||
if ( this._Timer )
|
||||
CheckPopupOnHide.call( this, true ) ;
|
||||
|
||||
this._Timer = FCKTools.SetInterval( CheckPopupOnHide, 100, this ) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do not fire OnBlur while the panel is opened.
|
||||
if ( typeof( FCKFocusManager ) != 'undefined' )
|
||||
FCKFocusManager.Lock() ;
|
||||
|
||||
if ( this.ParentPanel )
|
||||
this.ParentPanel.Lock() ;
|
||||
|
||||
this.MainNode.style.width = width ? width + 'px' : '' ;
|
||||
this.MainNode.style.height = height ? height + 'px' : '' ;
|
||||
|
||||
var iMainWidth = this.MainNode.offsetWidth ;
|
||||
|
||||
if ( !width ) this._IFrame.width = 1 ;
|
||||
if ( !height ) this._IFrame.height = 1 ;
|
||||
|
||||
// This is weird... but with Firefox, we must get the offsetWidth before
|
||||
// setting the _IFrame size (which returns "0"), and then after that,
|
||||
// to return the correct width. Remove the first step and it will not
|
||||
// work when the editor is in RTL.
|
||||
iMainWidth = this.MainNode.offsetWidth ;
|
||||
|
||||
var oPos = FCKTools.GetElementPosition( ( relElement.nodeType == 9 ? relElement.body : relElement), this._Window ) ;
|
||||
|
||||
if ( this.IsRTL && !this.IsContextMenu )
|
||||
x = ( x * -1 ) ;
|
||||
|
||||
x += oPos.X ;
|
||||
y += oPos.Y ;
|
||||
|
||||
if ( this.IsRTL )
|
||||
{
|
||||
if ( this.IsContextMenu )
|
||||
x = x - iMainWidth + 1 ;
|
||||
else if ( relElement )
|
||||
x = x + relElement.offsetWidth - iMainWidth ;
|
||||
}
|
||||
else
|
||||
{
|
||||
var oViewPaneSize = FCKTools.GetViewPaneSize( this._Window ) ;
|
||||
var oScrollPosition = FCKTools.GetScrollPosition( this._Window ) ;
|
||||
|
||||
var iViewPaneHeight = oViewPaneSize.Height + oScrollPosition.Y ;
|
||||
var iViewPaneWidth = oViewPaneSize.Width + oScrollPosition.X ;
|
||||
|
||||
if ( ( x + iMainWidth ) > iViewPaneWidth )
|
||||
x -= x + iMainWidth - iViewPaneWidth ;
|
||||
|
||||
if ( ( y + this.MainNode.offsetHeight ) > iViewPaneHeight )
|
||||
y -= y + this.MainNode.offsetHeight - iViewPaneHeight ;
|
||||
}
|
||||
|
||||
if ( x < 0 )
|
||||
x = 0 ;
|
||||
|
||||
// Set the context menu DIV in the specified location.
|
||||
this._IFrame.style.left = x + 'px' ;
|
||||
this._IFrame.style.top = y + 'px' ;
|
||||
|
||||
var iWidth = iMainWidth ;
|
||||
var iHeight = this.MainNode.offsetHeight ;
|
||||
|
||||
this._IFrame.width = iWidth ;
|
||||
this._IFrame.height = iHeight ;
|
||||
|
||||
// Move the focus to the IFRAME so we catch the "onblur".
|
||||
this._IFrame.contentWindow.focus() ;
|
||||
}
|
||||
|
||||
this._IsOpened = true ;
|
||||
|
||||
FCKTools.RunFunction( this.OnShow, this ) ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.Hide = function( ignoreOnHide )
|
||||
{
|
||||
if ( this._Popup )
|
||||
this._Popup.hide() ;
|
||||
else
|
||||
{
|
||||
if ( !this._IsOpened )
|
||||
return ;
|
||||
|
||||
// Enable the editor to fire the "OnBlur".
|
||||
if ( typeof( FCKFocusManager ) != 'undefined' )
|
||||
FCKFocusManager.Unlock() ;
|
||||
|
||||
// It is better to set the sizes to 0, otherwise Firefox would have
|
||||
// rendering problems.
|
||||
this._IFrame.width = this._IFrame.height = 0 ;
|
||||
|
||||
this._IsOpened = false ;
|
||||
|
||||
if ( this.ParentPanel )
|
||||
this.ParentPanel.Unlock() ;
|
||||
|
||||
if ( !ignoreOnHide )
|
||||
FCKTools.RunFunction( this.OnHide, this ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKPanel.prototype.CheckIsOpened = function()
|
||||
{
|
||||
if ( this._Popup )
|
||||
return this._Popup.isOpen ;
|
||||
else
|
||||
return this._IsOpened ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.CreateChildPanel = function()
|
||||
{
|
||||
var oWindow = this._Popup ? FCKTools.GetParentWindow( this.Document ) : this._Window ;
|
||||
|
||||
var oChildPanel = new FCKPanel( oWindow, true ) ;
|
||||
oChildPanel.ParentPanel = this ;
|
||||
|
||||
return oChildPanel ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.Lock = function()
|
||||
{
|
||||
this._LockCounter++ ;
|
||||
}
|
||||
|
||||
FCKPanel.prototype.Unlock = function()
|
||||
{
|
||||
if ( --this._LockCounter == 0 && !this.HasFocus )
|
||||
this.Hide() ;
|
||||
}
|
||||
|
||||
/* Events */
|
||||
|
||||
function FCKPanel_Window_OnFocus( e, panel )
|
||||
{
|
||||
panel.HasFocus = true ;
|
||||
}
|
||||
|
||||
function FCKPanel_Window_OnBlur( e, panel )
|
||||
{
|
||||
panel.HasFocus = false ;
|
||||
|
||||
if ( panel._LockCounter == 0 )
|
||||
FCKTools.RunFunction( panel.Hide, panel ) ;
|
||||
}
|
||||
|
||||
function CheckPopupOnHide( forceHide )
|
||||
{
|
||||
if ( forceHide || !this._Popup.isOpen )
|
||||
{
|
||||
window.clearInterval( this._Timer ) ;
|
||||
this._Timer = null ;
|
||||
|
||||
FCKTools.RunFunction( this.OnHide, this ) ;
|
||||
}
|
||||
}
|
||||
|
||||
function FCKPanel_Cleanup()
|
||||
{
|
||||
this._Popup = null ;
|
||||
this._Window = null ;
|
||||
this.Document = null ;
|
||||
this.MainNode = null ;
|
||||
}
|
52
admin/FCKeditor/editor/_source/classes/fckplugin.js
Normal file
52
admin/FCKeditor/editor/_source/classes/fckplugin.js
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckplugin.js
|
||||
* FCKPlugin Class: Represents a single plugin.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKPlugin = function( name, availableLangs, basePath )
|
||||
{
|
||||
this.Name = name ;
|
||||
this.BasePath = basePath ? basePath : FCKConfig.PluginsPath ;
|
||||
this.Path = this.BasePath + name + '/' ;
|
||||
|
||||
if ( !availableLangs || availableLangs.length == 0 )
|
||||
this.AvailableLangs = new Array() ;
|
||||
else
|
||||
this.AvailableLangs = availableLangs.split(',') ;
|
||||
}
|
||||
|
||||
FCKPlugin.prototype.Load = function()
|
||||
{
|
||||
// Load the language file, if defined.
|
||||
if ( this.AvailableLangs.length > 0 )
|
||||
{
|
||||
var sLang ;
|
||||
|
||||
// Check if the plugin has the language file for the active language.
|
||||
if ( this.AvailableLangs.indexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 )
|
||||
sLang = FCKLanguageManager.ActiveLanguage.Code ;
|
||||
else
|
||||
// Load the default language file (first one) if the current one is not available.
|
||||
sLang = this.AvailableLangs[0] ;
|
||||
|
||||
// Add the main plugin script.
|
||||
LoadScript( this.Path + 'lang/' + sLang + '.js' ) ;
|
||||
}
|
||||
|
||||
// Add the main plugin script.
|
||||
LoadScript( this.Path + 'fckplugin.js' ) ;
|
||||
}
|
351
admin/FCKeditor/editor/_source/classes/fckspecialcombo.js
Normal file
351
admin/FCKeditor/editor/_source/classes/fckspecialcombo.js
Normal file
@ -0,0 +1,351 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckspecialcombo.js
|
||||
* FCKSpecialCombo Class: represents a special combo.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow )
|
||||
{
|
||||
// Default properties values.
|
||||
this.FieldWidth = fieldWidth || 100 ;
|
||||
this.PanelWidth = panelWidth || 150 ;
|
||||
this.PanelMaxHeight = panelMaxHeight || 150 ;
|
||||
this.Label = ' ' ;
|
||||
this.Caption = caption ;
|
||||
this.Tooltip = caption ;
|
||||
this.Style = FCK_TOOLBARITEM_ICONTEXT ;
|
||||
|
||||
this.Enabled = true ;
|
||||
|
||||
this.Items = new Object() ;
|
||||
|
||||
this._Panel = new FCKPanel( parentWindow || window, true ) ;
|
||||
this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
|
||||
this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
|
||||
this._PanelBox.className = 'SC_Panel' ;
|
||||
this._PanelBox.style.width = this.PanelWidth + 'px' ;
|
||||
|
||||
this._PanelBox.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
|
||||
|
||||
this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKSpecialCombo_Cleanup ) ;
|
||||
|
||||
// this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ;
|
||||
// this._Panel.Create() ;
|
||||
// this._Panel.PanelDiv.className += ' SC_Panel' ;
|
||||
// this._Panel.PanelDiv.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ;
|
||||
// this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ;
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_ItemOnMouseOver()
|
||||
{
|
||||
this.className += ' SC_ItemOver' ;
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_ItemOnMouseOut()
|
||||
{
|
||||
this.className = this.originalClass ;
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_ItemOnClick()
|
||||
{
|
||||
this.className = this.originalClass ;
|
||||
|
||||
this.FCKSpecialCombo._Panel.Hide() ;
|
||||
|
||||
this.FCKSpecialCombo.SetLabel( this.FCKItemLabel ) ;
|
||||
|
||||
if ( typeof( this.FCKSpecialCombo.OnSelect ) == 'function' )
|
||||
this.FCKSpecialCombo.OnSelect( this.FCKItemID, this ) ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor )
|
||||
{
|
||||
// <div class="SC_Item" onmouseover="this.className='SC_Item SC_ItemOver';" onmouseout="this.className='SC_Item';"><b>Bold 1</b></div>
|
||||
var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
|
||||
oDiv.className = oDiv.originalClass = 'SC_Item' ;
|
||||
oDiv.innerHTML = html ;
|
||||
oDiv.FCKItemID = id ;
|
||||
oDiv.FCKItemLabel = label || id ;
|
||||
oDiv.FCKSpecialCombo = this ;
|
||||
oDiv.Selected = false ;
|
||||
|
||||
// In IE, the width must be set so the borders are shown correctly when the content overflows.
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
oDiv.style.width = '100%' ;
|
||||
|
||||
if ( bgColor )
|
||||
oDiv.style.backgroundColor = bgColor ;
|
||||
|
||||
oDiv.onmouseover = FCKSpecialCombo_ItemOnMouseOver ;
|
||||
oDiv.onmouseout = FCKSpecialCombo_ItemOnMouseOut ;
|
||||
oDiv.onclick = FCKSpecialCombo_ItemOnClick ;
|
||||
|
||||
this.Items[ id.toString().toLowerCase() ] = oDiv ;
|
||||
|
||||
return oDiv ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.SelectItem = function( itemId )
|
||||
{
|
||||
itemId = itemId ? itemId.toString().toLowerCase() : '' ;
|
||||
|
||||
var oDiv = this.Items[ itemId ] ;
|
||||
if ( oDiv )
|
||||
{
|
||||
oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ;
|
||||
oDiv.Selected = true ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.SelectItemByLabel = function( itemLabel, setLabel )
|
||||
{
|
||||
for ( var id in this.Items )
|
||||
{
|
||||
var oDiv = this.Items[id] ;
|
||||
|
||||
if ( oDiv.FCKItemLabel == itemLabel )
|
||||
{
|
||||
oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ;
|
||||
oDiv.Selected = true ;
|
||||
|
||||
if ( setLabel )
|
||||
this.SetLabel( itemLabel ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.DeselectAll = function( clearLabel )
|
||||
{
|
||||
for ( var i in this.Items )
|
||||
{
|
||||
this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ;
|
||||
this.Items[i].Selected = false ;
|
||||
}
|
||||
|
||||
if ( clearLabel )
|
||||
this.SetLabel( '' ) ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.SetLabelById = function( id )
|
||||
{
|
||||
id = id ? id.toString().toLowerCase() : '' ;
|
||||
|
||||
var oDiv = this.Items[ id ] ;
|
||||
this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.SetLabel = function( text )
|
||||
{
|
||||
this.Label = text.length == 0 ? ' ' : text ;
|
||||
|
||||
if ( this._LabelEl )
|
||||
this._LabelEl.innerHTML = this.Label ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.SetEnabled = function( isEnabled )
|
||||
{
|
||||
this.Enabled = isEnabled ;
|
||||
|
||||
this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
|
||||
}
|
||||
|
||||
FCKSpecialCombo.prototype.Create = function( targetElement )
|
||||
{
|
||||
var oDoc = FCKTools.GetElementDocument( targetElement ) ;
|
||||
var eOuterTable = this._OuterTable = targetElement.appendChild( oDoc.createElement( 'TABLE' ) ) ;
|
||||
eOuterTable.cellPadding = 0 ;
|
||||
eOuterTable.cellSpacing = 0 ;
|
||||
|
||||
eOuterTable.insertRow(-1) ;
|
||||
|
||||
var sClass ;
|
||||
var bShowLabel ;
|
||||
|
||||
switch ( this.Style )
|
||||
{
|
||||
case FCK_TOOLBARITEM_ONLYICON :
|
||||
sClass = 'TB_ButtonType_Icon' ;
|
||||
bShowLabel = false;
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ONLYTEXT :
|
||||
sClass = 'TB_ButtonType_Text' ;
|
||||
bShowLabel = false;
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ICONTEXT :
|
||||
bShowLabel = true;
|
||||
break ;
|
||||
}
|
||||
|
||||
if ( this.Caption && this.Caption.length > 0 && bShowLabel )
|
||||
{
|
||||
var oCaptionCell = eOuterTable.rows[0].insertCell(-1) ;
|
||||
oCaptionCell.innerHTML = this.Caption ;
|
||||
oCaptionCell.className = 'SC_FieldCaption' ;
|
||||
}
|
||||
|
||||
// Create the main DIV element.
|
||||
var oField = FCKTools.AppendElement( eOuterTable.rows[0].insertCell(-1), 'div' ) ;
|
||||
if ( bShowLabel )
|
||||
{
|
||||
oField.className = 'SC_Field' ;
|
||||
oField.style.width = this.FieldWidth + 'px' ;
|
||||
oField.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldLabel"><label> </label></td><td class="SC_FieldButton"> </td></tr></tbody></table>' ;
|
||||
|
||||
this._LabelEl = oField.getElementsByTagName('label')[0] ; // Memory Leak
|
||||
this._LabelEl.innerHTML = this.Label ;
|
||||
}
|
||||
else
|
||||
{
|
||||
oField.className = 'TB_Button_Off' ;
|
||||
//oField.innerHTML = '<span className="SC_FieldCaption">' + this.Caption + '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;"> </td></tr></tbody></table>' ;
|
||||
//oField.innerHTML = '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;"> </td></tr></tbody></table>' ;
|
||||
|
||||
// Gets the correct CSS class to use for the specified style (param).
|
||||
oField.innerHTML = '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0">' +
|
||||
'<tr>' +
|
||||
//'<td class="TB_Icon"><img src="' + FCKConfig.SkinPath + 'toolbar/' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21"></td>' +
|
||||
'<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
|
||||
'<td class="TB_Text">' + this.Caption + '</td>' +
|
||||
'<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
|
||||
'<td class="TB_ButtonArrow"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' +
|
||||
'<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' +
|
||||
'</tr>' +
|
||||
'</table>' ;
|
||||
}
|
||||
|
||||
|
||||
// Events Handlers
|
||||
|
||||
oField.SpecialCombo = this ;
|
||||
|
||||
oField.onmouseover = FCKSpecialCombo_OnMouseOver ;
|
||||
oField.onmouseout = FCKSpecialCombo_OnMouseOut ;
|
||||
oField.onclick = FCKSpecialCombo_OnClick ;
|
||||
|
||||
FCKTools.DisableSelection( this._Panel.Document.body ) ;
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_Cleanup()
|
||||
{
|
||||
this._LabelEl = null ;
|
||||
this._OuterTable = null ;
|
||||
this._ItemsHolderEl = null ;
|
||||
this._PanelBox = null ;
|
||||
|
||||
if ( this.Items )
|
||||
{
|
||||
for ( var key in this.Items )
|
||||
this.Items[key] = null ;
|
||||
}
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_OnMouseOver()
|
||||
{
|
||||
if ( this.SpecialCombo.Enabled )
|
||||
{
|
||||
switch ( this.SpecialCombo.Style )
|
||||
{
|
||||
case FCK_TOOLBARITEM_ONLYICON :
|
||||
this.className = 'TB_Button_On_Over';
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ONLYTEXT :
|
||||
this.className = 'TB_Button_On_Over';
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ICONTEXT :
|
||||
this.className = 'SC_Field SC_FieldOver' ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_OnMouseOut()
|
||||
{
|
||||
switch ( this.SpecialCombo.Style )
|
||||
{
|
||||
case FCK_TOOLBARITEM_ONLYICON :
|
||||
this.className = 'TB_Button_Off';
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ONLYTEXT :
|
||||
this.className = 'TB_Button_Off';
|
||||
break ;
|
||||
case FCK_TOOLBARITEM_ICONTEXT :
|
||||
this.className='SC_Field' ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
function FCKSpecialCombo_OnClick( e )
|
||||
{
|
||||
// For Mozilla we must stop the event propagation to avoid it hiding
|
||||
// the panel because of a click outside of it.
|
||||
// if ( e )
|
||||
// {
|
||||
// e.stopPropagation() ;
|
||||
// FCKPanelEventHandlers.OnDocumentClick( e ) ;
|
||||
// }
|
||||
|
||||
var oSpecialCombo = this.SpecialCombo ;
|
||||
|
||||
if ( oSpecialCombo.Enabled )
|
||||
{
|
||||
var oPanel = oSpecialCombo._Panel ;
|
||||
var oPanelBox = oSpecialCombo._PanelBox ;
|
||||
var oItemsHolder = oSpecialCombo._ItemsHolderEl ;
|
||||
var iMaxHeight = oSpecialCombo.PanelMaxHeight ;
|
||||
|
||||
if ( oSpecialCombo.OnBeforeClick )
|
||||
oSpecialCombo.OnBeforeClick( oSpecialCombo ) ;
|
||||
|
||||
// This is a tricky thing. We must call the "Load" function, otherwise
|
||||
// it will not be possible to retrieve "oItemsHolder.offsetHeight" (IE only).
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
oPanel.Preload( 0, this.offsetHeight, this ) ;
|
||||
|
||||
if ( oItemsHolder.offsetHeight > iMaxHeight )
|
||||
// {
|
||||
oPanelBox.style.height = iMaxHeight + 'px' ;
|
||||
|
||||
// if ( FCKBrowserInfo.IsGecko )
|
||||
// oPanelBox.style.overflow = '-moz-scrollbars-vertical' ;
|
||||
// }
|
||||
else
|
||||
oPanelBox.style.height = '' ;
|
||||
|
||||
// oPanel.PanelDiv.style.width = oSpecialCombo.PanelWidth + 'px' ;
|
||||
|
||||
oPanel.Show( 0, this.offsetHeight, this ) ;
|
||||
}
|
||||
|
||||
// return false ;
|
||||
}
|
||||
|
||||
/*
|
||||
Sample Combo Field HTML output:
|
||||
|
||||
<div class="SC_Field" style="width: 80px;">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="SC_FieldLabel"><label> </label></td>
|
||||
<td class="SC_FieldButton"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
*/
|
55
admin/FCKeditor/editor/_source/classes/fckstyledef.js
Normal file
55
admin/FCKeditor/editor/_source/classes/fckstyledef.js
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckstyledef.js
|
||||
* FCKStyleDef Class: represents a single style definition.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKStyleDef = function( name, element )
|
||||
{
|
||||
this.Name = name ;
|
||||
this.Element = element.toUpperCase() ;
|
||||
this.IsObjectElement = FCKRegexLib.ObjectElements.test( this.Element ) ;
|
||||
this.Attributes = new Object() ;
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype.AddAttribute = function( name, value )
|
||||
{
|
||||
this.Attributes[ name ] = value ;
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype.GetOpenerTag = function()
|
||||
{
|
||||
var s = '<' + this.Element ;
|
||||
|
||||
for ( var a in this.Attributes )
|
||||
s += ' ' + a + '="' + this.Attributes[a] + '"' ;
|
||||
|
||||
return s + '>' ;
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype.GetCloserTag = function()
|
||||
{
|
||||
return '</' + this.Element + '>' ;
|
||||
}
|
||||
|
||||
|
||||
FCKStyleDef.prototype.RemoveFromSelection = function()
|
||||
{
|
||||
if ( FCKSelection.GetType() == 'Control' )
|
||||
this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ) ;
|
||||
else
|
||||
this._RemoveMe( FCK.ToolbarSet.CurrentInstance.Selection.GetParentElement() ) ;
|
||||
}
|
116
admin/FCKeditor/editor/_source/classes/fckstyledef_gecko.js
Normal file
116
admin/FCKeditor/editor/_source/classes/fckstyledef_gecko.js
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckstyledef_gecko.js
|
||||
* FCKStyleDef Class: represents a single stylke definition. (Gecko specific)
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
FCKStyleDef.prototype.ApplyToSelection = function()
|
||||
{
|
||||
if ( FCKSelection.GetType() == 'Text' && !this.IsObjectElement )
|
||||
{
|
||||
var oSelection = FCK.ToolbarSet.CurrentInstance.EditorWindow.getSelection() ;
|
||||
|
||||
// Create the main element.
|
||||
var e = FCK.ToolbarSet.CurrentInstance.EditorDocument.createElement( this.Element ) ;
|
||||
|
||||
for ( var i = 0 ; i < oSelection.rangeCount ; i++ )
|
||||
{
|
||||
e.appendChild( oSelection.getRangeAt(i).extractContents() ) ;
|
||||
}
|
||||
|
||||
// Set the attributes.
|
||||
this._AddAttributes( e ) ;
|
||||
|
||||
// Remove the duplicated elements.
|
||||
this._RemoveDuplicates( e ) ;
|
||||
|
||||
var oRange = oSelection.getRangeAt(0) ;
|
||||
oRange.insertNode( e ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
var oControl = FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ;
|
||||
if ( oControl.tagName == this.Element )
|
||||
this._AddAttributes( oControl ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._AddAttributes = function( targetElement )
|
||||
{
|
||||
for ( var a in this.Attributes )
|
||||
{
|
||||
switch ( a.toLowerCase() )
|
||||
{
|
||||
case 'src' :
|
||||
targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
|
||||
|
||||
default :
|
||||
targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._RemoveDuplicates = function( parent )
|
||||
{
|
||||
for ( var i = 0 ; i < parent.childNodes.length ; i++ )
|
||||
{
|
||||
var oChild = parent.childNodes[i] ;
|
||||
|
||||
if ( oChild.nodeType != 1 )
|
||||
continue ;
|
||||
|
||||
this._RemoveDuplicates( oChild ) ;
|
||||
|
||||
if ( this.IsEqual( oChild ) )
|
||||
FCKTools.RemoveOuterTags( oChild ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype.IsEqual = function( e )
|
||||
{
|
||||
if ( e.tagName != this.Element )
|
||||
return false ;
|
||||
|
||||
for ( var a in this.Attributes )
|
||||
{
|
||||
if ( e.getAttribute( a ) != this.Attributes[a] )
|
||||
return false ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
|
||||
{
|
||||
if ( ! elementToCheck )
|
||||
return ;
|
||||
|
||||
var oParent = elementToCheck.parentNode ;
|
||||
|
||||
if ( elementToCheck.nodeType == 1 && this.IsEqual( elementToCheck ) )
|
||||
{
|
||||
if ( this.IsObjectElement )
|
||||
{
|
||||
for ( var a in this.Attributes )
|
||||
elementToCheck.removeAttribute( a, 0 ) ;
|
||||
return ;
|
||||
}
|
||||
else
|
||||
FCKTools.RemoveOuterTags( elementToCheck ) ;
|
||||
}
|
||||
|
||||
this._RemoveMe( oParent ) ;
|
||||
}
|
139
admin/FCKeditor/editor/_source/classes/fckstyledef_ie.js
Normal file
139
admin/FCKeditor/editor/_source/classes/fckstyledef_ie.js
Normal file
@ -0,0 +1,139 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckstyledef_ie.js
|
||||
* FCKStyleDef Class: represents a single stylke definition. (IE specific)
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
FCKStyleDef.prototype.ApplyToSelection = function()
|
||||
{
|
||||
var oSelection = FCK.ToolbarSet.CurrentInstance.EditorDocument.selection ;
|
||||
|
||||
if ( oSelection.type == 'Text' )
|
||||
{
|
||||
var oRange = oSelection.createRange() ;
|
||||
|
||||
// Create the main element.
|
||||
var e = document.createElement( this.Element ) ;
|
||||
e.innerHTML = oRange.htmlText ;
|
||||
|
||||
// Set the attributes.
|
||||
this._AddAttributes( e ) ;
|
||||
|
||||
// Remove the duplicated elements.
|
||||
this._RemoveDuplicates( e ) ;
|
||||
|
||||
// Replace the selection with the resulting HTML.
|
||||
oRange.pasteHTML( e.outerHTML ) ;
|
||||
}
|
||||
else if ( oSelection.type == 'Control' )
|
||||
{
|
||||
var oControl = FCK.ToolbarSet.CurrentInstance.Selection.GetSelectedElement() ;
|
||||
if ( oControl.tagName == this.Element )
|
||||
this._AddAttributes( oControl ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._AddAttributes = function( targetElement )
|
||||
{
|
||||
for ( var a in this.Attributes )
|
||||
{
|
||||
switch ( a.toLowerCase() )
|
||||
{
|
||||
case 'style' :
|
||||
targetElement.style.cssText = this.Attributes[a] ;
|
||||
break ;
|
||||
|
||||
case 'class' :
|
||||
targetElement.setAttribute( 'className', this.Attributes[a], 0 ) ;
|
||||
break ;
|
||||
|
||||
case 'src' :
|
||||
targetElement.setAttribute( '_fcksavedurl', this.Attributes[a], 0 ) ;
|
||||
|
||||
default :
|
||||
targetElement.setAttribute( a, this.Attributes[a], 0 ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._RemoveDuplicates = function( parent )
|
||||
{
|
||||
for ( var i = 0 ; i < parent.children.length ; i++ )
|
||||
{
|
||||
var oChild = parent.children[i] ;
|
||||
this._RemoveDuplicates( oChild ) ;
|
||||
|
||||
if ( this.IsEqual( oChild ) )
|
||||
FCKTools.RemoveOuterTags( oChild ) ;
|
||||
}
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype.IsEqual = function( e )
|
||||
{
|
||||
if ( e.tagName != this.Element )
|
||||
return false ;
|
||||
|
||||
for ( var a in this.Attributes )
|
||||
{
|
||||
switch ( a.toLowerCase() )
|
||||
{
|
||||
case 'style' :
|
||||
if ( e.style.cssText.toLowerCase() != this.Attributes[a].toLowerCase() )
|
||||
return false ;
|
||||
break ;
|
||||
case 'class' :
|
||||
if ( e.getAttribute( 'className', 0 ) != this.Attributes[a] )
|
||||
return false ;
|
||||
break ;
|
||||
default :
|
||||
if ( e.getAttribute( a, 0 ) != this.Attributes[a] )
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
FCKStyleDef.prototype._RemoveMe = function( elementToCheck )
|
||||
{
|
||||
if ( ! elementToCheck )
|
||||
return ;
|
||||
|
||||
var oParent = elementToCheck.parentElement ;
|
||||
|
||||
if ( this.IsEqual( elementToCheck ) )
|
||||
{
|
||||
if ( this.IsObjectElement )
|
||||
{
|
||||
for ( var a in this.Attributes )
|
||||
{
|
||||
switch ( a.toLowerCase() )
|
||||
{
|
||||
case 'class' :
|
||||
elementToCheck.removeAttribute( 'className', 0 ) ;
|
||||
break ;
|
||||
default :
|
||||
elementToCheck.removeAttribute( a, 0 ) ;
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
else
|
||||
FCKTools.RemoveOuterTags( elementToCheck ) ;
|
||||
}
|
||||
|
||||
this._RemoveMe( oParent ) ;
|
||||
}
|
84
admin/FCKeditor/editor/_source/classes/fckstylesloader.js
Normal file
84
admin/FCKeditor/editor/_source/classes/fckstylesloader.js
Normal file
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fckstylesloader.js
|
||||
* FCKStylesLoader Class: this class define objects that are responsible
|
||||
* for loading the styles defined in the XML file.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKStylesLoader = function()
|
||||
{
|
||||
this.Styles = new Object() ;
|
||||
this.StyleGroups = new Object() ;
|
||||
this.Loaded = false ;
|
||||
this.HasObjectElements = false ;
|
||||
}
|
||||
|
||||
FCKStylesLoader.prototype.Load = function( stylesXmlUrl )
|
||||
{
|
||||
// Load the XML file into a FCKXml object.
|
||||
var oXml = new FCKXml() ;
|
||||
oXml.LoadUrl( stylesXmlUrl ) ;
|
||||
|
||||
// Get the "Style" nodes defined in the XML file.
|
||||
var aStyleNodes = oXml.SelectNodes( 'Styles/Style' ) ;
|
||||
|
||||
// Add each style to our "Styles" collection.
|
||||
for ( var i = 0 ; i < aStyleNodes.length ; i++ )
|
||||
{
|
||||
var sElement = aStyleNodes[i].attributes.getNamedItem('element').value.toUpperCase() ;
|
||||
|
||||
// Create the style definition object.
|
||||
var oStyleDef = new FCKStyleDef( aStyleNodes[i].attributes.getNamedItem('name').value, sElement ) ;
|
||||
|
||||
if ( oStyleDef.IsObjectElement )
|
||||
this.HasObjectElements = true ;
|
||||
|
||||
// Get the attributes defined for the style (if any).
|
||||
var aAttNodes = oXml.SelectNodes( 'Attribute', aStyleNodes[i] ) ;
|
||||
|
||||
// Add the attributes to the style definition object.
|
||||
for ( var j = 0 ; j < aAttNodes.length ; j++ )
|
||||
{
|
||||
var sAttName = aAttNodes[j].attributes.getNamedItem('name').value ;
|
||||
var sAttValue = aAttNodes[j].attributes.getNamedItem('value').value ;
|
||||
|
||||
// IE changes the "style" attribute value when applied to an element
|
||||
// so we must get the final resulting value (for comparision issues).
|
||||
if ( sAttName.toLowerCase() == 'style' )
|
||||
{
|
||||
var oTempE = document.createElement( 'SPAN' ) ;
|
||||
oTempE.style.cssText = sAttValue ;
|
||||
sAttValue = oTempE.style.cssText ;
|
||||
}
|
||||
|
||||
oStyleDef.AddAttribute( sAttName, sAttValue ) ;
|
||||
}
|
||||
|
||||
// Add the style to the "Styles" collection using it's name as the key.
|
||||
this.Styles[ oStyleDef.Name ] = oStyleDef ;
|
||||
|
||||
// Add the style to the "StyleGroups" collection.
|
||||
var aGroup = this.StyleGroups[sElement] ;
|
||||
if ( aGroup == null )
|
||||
{
|
||||
this.StyleGroups[sElement] = new Array() ;
|
||||
aGroup = this.StyleGroups[sElement] ;
|
||||
}
|
||||
aGroup[aGroup.length] = oStyleDef ;
|
||||
}
|
||||
|
||||
this.Loaded = true ;
|
||||
}
|
116
admin/FCKeditor/editor/_source/classes/fcktoolbar.js
Normal file
116
admin/FCKeditor/editor/_source/classes/fcktoolbar.js
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbar.js
|
||||
* FCKToolbar Class: represents a toolbar in the toolbarset. It is a group of
|
||||
* toolbar items.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbar = function()
|
||||
{
|
||||
this.Items = new Array() ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKToolbar_Cleanup ) ;
|
||||
}
|
||||
|
||||
FCKToolbar.prototype.AddItem = function( item )
|
||||
{
|
||||
return this.Items[ this.Items.length ] = item ;
|
||||
}
|
||||
|
||||
FCKToolbar.prototype.AddButton = function( name, label, tooltip, iconPathOrStripInfoArrayOrIndex, style, state )
|
||||
{
|
||||
if ( typeof( iconPathOrStripInfoArrayOrIndex ) == 'number' )
|
||||
iconPathOrStripInfoArrayOrIndex = [ this.DefaultIconsStrip, this.DefaultIconSize, iconPathOrStripInfoArrayOrIndex ] ;
|
||||
|
||||
var oButton = new FCKToolbarButtonUI( name, label, tooltip, iconPathOrStripInfoArrayOrIndex, style, state ) ;
|
||||
oButton._FCKToolbar = this ;
|
||||
oButton.OnClick = FCKToolbar_OnItemClick ;
|
||||
|
||||
return this.AddItem( oButton ) ;
|
||||
}
|
||||
|
||||
function FCKToolbar_OnItemClick( item )
|
||||
{
|
||||
var oToolbar = item._FCKToolbar ;
|
||||
|
||||
if ( oToolbar.OnItemClick )
|
||||
oToolbar.OnItemClick( oToolbar, item ) ;
|
||||
}
|
||||
|
||||
FCKToolbar.prototype.AddSeparator = function()
|
||||
{
|
||||
this.AddItem( new FCKToolbarSeparator() ) ;
|
||||
}
|
||||
|
||||
FCKToolbar.prototype.Create = function( parentElement )
|
||||
{
|
||||
if ( this.MainElement )
|
||||
{
|
||||
// this._Cleanup() ;
|
||||
if ( this.MainElement.parentNode )
|
||||
this.MainElement.parentNode.removeChild( this.MainElement ) ;
|
||||
this.MainElement = null ;
|
||||
}
|
||||
|
||||
var oDoc = FCKTools.GetElementDocument( parentElement ) ;
|
||||
|
||||
var e = this.MainElement = oDoc.createElement( 'table' ) ;
|
||||
e.className = 'TB_Toolbar' ;
|
||||
e.style.styleFloat = e.style.cssFloat = ( FCKLang.Dir == 'ltr' ? 'left' : 'right' ) ;
|
||||
e.dir = FCKLang.Dir ;
|
||||
e.cellPadding = 0 ;
|
||||
e.cellSpacing = 0 ;
|
||||
|
||||
this.RowElement = e.insertRow(-1) ;
|
||||
|
||||
// Insert the start cell.
|
||||
var eCell ;
|
||||
|
||||
if ( !this.HideStart )
|
||||
{
|
||||
eCell = this.RowElement.insertCell(-1) ;
|
||||
eCell.appendChild( oDoc.createElement( 'div' ) ).className = 'TB_Start' ;
|
||||
}
|
||||
|
||||
for ( var i = 0 ; i < this.Items.length ; i++ )
|
||||
{
|
||||
this.Items[i].Create( this.RowElement.insertCell(-1) ) ;
|
||||
}
|
||||
|
||||
// Insert the ending cell.
|
||||
if ( !this.HideEnd )
|
||||
{
|
||||
eCell = this.RowElement.insertCell(-1) ;
|
||||
eCell.appendChild( oDoc.createElement( 'div' ) ).className = 'TB_End' ;
|
||||
}
|
||||
|
||||
parentElement.appendChild( e ) ;
|
||||
}
|
||||
|
||||
function FCKToolbar_Cleanup()
|
||||
{
|
||||
this.MainElement = null ;
|
||||
this.RowElement = null ;
|
||||
}
|
||||
|
||||
var FCKToolbarSeparator = function()
|
||||
{}
|
||||
|
||||
FCKToolbarSeparator.prototype.Create = function( parentElement )
|
||||
{
|
||||
FCKTools.AppendElement( parentElement, 'div' ).className = 'TB_Separator' ;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarbreak_gecko.js
|
||||
* FCKToolbarBreak Class: breaks the toolbars.
|
||||
* It makes it possible to force the toolbar to break to a new line.
|
||||
* This is the Gecko specific implementation.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarBreak = function()
|
||||
{}
|
||||
|
||||
FCKToolbarBreak.prototype.Create = function( targetElement )
|
||||
{
|
||||
var oBreakDiv = targetElement.ownerDocument.createElement( 'div' ) ;
|
||||
|
||||
oBreakDiv.style.clear = oBreakDiv.style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ;
|
||||
|
||||
targetElement.appendChild( oBreakDiv ) ;
|
||||
}
|
34
admin/FCKeditor/editor/_source/classes/fcktoolbarbreak_ie.js
Normal file
34
admin/FCKeditor/editor/_source/classes/fcktoolbarbreak_ie.js
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarbreak_ie.js
|
||||
* FCKToolbarBreak Class: breaks the toolbars.
|
||||
* It makes it possible to force the toolbar to brak to a new line.
|
||||
* This is the IE specific implementation.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarBreak = function()
|
||||
{}
|
||||
|
||||
FCKToolbarBreak.prototype.Create = function( targetElement )
|
||||
{
|
||||
var oBreakDiv = FCKTools.GetElementDocument( targetElement ).createElement( 'div' ) ;
|
||||
|
||||
oBreakDiv.className = 'TB_Break' ;
|
||||
|
||||
oBreakDiv.style.clear = FCKLang.Dir == 'rtl' ? 'left' : 'right' ;
|
||||
|
||||
targetElement.appendChild( oBreakDiv ) ;
|
||||
}
|
70
admin/FCKeditor/editor/_source/classes/fcktoolbarbutton.js
Normal file
70
admin/FCKeditor/editor/_source/classes/fcktoolbarbutton.js
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarbutton.js
|
||||
* FCKToolbarButton Class: represents a button in the toolbar.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive, icon )
|
||||
{
|
||||
this.CommandName = commandName ;
|
||||
this.Label = label ;
|
||||
this.Tooltip = tooltip ;
|
||||
this.Style = style ;
|
||||
this.SourceView = sourceView ? true : false ;
|
||||
this.ContextSensitive = contextSensitive ? true : false ;
|
||||
|
||||
if ( icon == null )
|
||||
this.IconPath = FCKConfig.SkinPath + 'toolbar/' + commandName.toLowerCase() + '.gif' ;
|
||||
else if ( typeof( icon ) == 'number' )
|
||||
this.IconPath = [ FCKConfig.SkinPath + 'fck_strip.gif', 16, icon ] ;
|
||||
}
|
||||
|
||||
FCKToolbarButton.prototype.Create = function( targetElement )
|
||||
{
|
||||
this._UIButton = new FCKToolbarButtonUI( this.CommandName, this.Label, this.Tooltip, this.IconPath, this.Style ) ;
|
||||
this._UIButton.OnClick = this.Click ;
|
||||
this._UIButton._ToolbarButton = this ;
|
||||
this._UIButton.Create( targetElement ) ;
|
||||
}
|
||||
|
||||
FCKToolbarButton.prototype.RefreshState = function()
|
||||
{
|
||||
// Gets the actual state.
|
||||
var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ;
|
||||
|
||||
// If there are no state changes than do nothing and return.
|
||||
if ( eState == this._UIButton.State ) return ;
|
||||
|
||||
// Sets the actual state.
|
||||
this._UIButton.ChangeState( eState ) ;
|
||||
}
|
||||
|
||||
FCKToolbarButton.prototype.Click = function()
|
||||
{
|
||||
var oToolbarButton = this._ToolbarButton || this ;
|
||||
FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oToolbarButton.CommandName ).Execute() ;
|
||||
}
|
||||
|
||||
FCKToolbarButton.prototype.Enable = function()
|
||||
{
|
||||
this.RefreshState() ;
|
||||
}
|
||||
|
||||
FCKToolbarButton.prototype.Disable = function()
|
||||
{
|
||||
// Sets the actual state.
|
||||
this._UIButton.ChangeState( FCK_TRISTATE_DISABLED ) ;
|
||||
}
|
218
admin/FCKeditor/editor/_source/classes/fcktoolbarbuttonui.js
Normal file
218
admin/FCKeditor/editor/_source/classes/fcktoolbarbuttonui.js
Normal file
@ -0,0 +1,218 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarbuttonui.js
|
||||
* FCKToolbarButtonUI Class: interface representation of a toolbar button.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarButtonUI = function( name, label, tooltip, iconPathOrStripInfoArray, style, state )
|
||||
{
|
||||
this.Name = name ;
|
||||
this.Label = label || name ;
|
||||
this.Tooltip = tooltip || this.Label ;
|
||||
this.Style = style || FCK_TOOLBARITEM_ONLYICON ;
|
||||
this.State = state || FCK_TRISTATE_OFF ;
|
||||
|
||||
this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ;
|
||||
|
||||
if ( FCK.IECleanup )
|
||||
FCK.IECleanup.AddItem( this, FCKToolbarButtonUI_Cleanup ) ;
|
||||
}
|
||||
|
||||
|
||||
FCKToolbarButtonUI.prototype._CreatePaddingElement = function( document )
|
||||
{
|
||||
var oImg = document.createElement( 'IMG' ) ;
|
||||
oImg.className = 'TB_Button_Padding' ;
|
||||
oImg.src = FCK_SPACER_PATH ;
|
||||
return oImg ;
|
||||
}
|
||||
|
||||
FCKToolbarButtonUI.prototype.Create = function( parentElement )
|
||||
{
|
||||
var oMainElement = this.MainElement ;
|
||||
|
||||
if ( oMainElement )
|
||||
{
|
||||
FCKToolbarButtonUI_Cleanup.call(this) ;
|
||||
|
||||
if ( oMainElement.parentNode )
|
||||
oMainElement.parentNode.removeChild( oMainElement ) ;
|
||||
oMainElement = this.MainElement = null ;
|
||||
}
|
||||
|
||||
var oDoc = FCKTools.GetElementDocument( parentElement ) ;
|
||||
|
||||
// Create the Main Element.
|
||||
oMainElement = this.MainElement = oDoc.createElement( 'DIV' ) ;
|
||||
oMainElement._FCKButton = this ; // IE Memory Leak (Circular reference).
|
||||
oMainElement.title = this.Tooltip ;
|
||||
|
||||
// The following will prevent the button from catching the focus.
|
||||
if ( FCKBrowserInfo.IsGecko )
|
||||
oMainElement.onmousedown = FCKTools.CancelEvent ;
|
||||
|
||||
this.ChangeState( this.State, true ) ;
|
||||
|
||||
if ( this.Style == FCK_TOOLBARITEM_ONLYICON && !this.ShowArrow )
|
||||
{
|
||||
// <td><div class="TB_Button_On" title="Smiley">{Image}</div></td>
|
||||
|
||||
oMainElement.appendChild( this.Icon.CreateIconElement( oDoc ) ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
// <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td>{Image}</td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td>
|
||||
// <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td><img class="TB_Button_Padding"></td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td>
|
||||
|
||||
var oTable = oMainElement.appendChild( oDoc.createElement( 'TABLE' ) ) ;
|
||||
oTable.cellPadding = 0 ;
|
||||
oTable.cellSpacing = 0 ;
|
||||
|
||||
var oRow = oTable.insertRow(-1) ;
|
||||
|
||||
// The Image cell (icon or padding).
|
||||
var oCell = oRow.insertCell(-1) ;
|
||||
|
||||
if ( this.Style == FCK_TOOLBARITEM_ONLYICON || this.Style == FCK_TOOLBARITEM_ICONTEXT )
|
||||
oCell.appendChild( this.Icon.CreateIconElement( oDoc ) ) ;
|
||||
else
|
||||
oCell.appendChild( this._CreatePaddingElement( oDoc ) ) ;
|
||||
|
||||
if ( this.Style == FCK_TOOLBARITEM_ONLYTEXT || this.Style == FCK_TOOLBARITEM_ICONTEXT )
|
||||
{
|
||||
// The Text cell.
|
||||
oCell = oRow.insertCell(-1) ;
|
||||
oCell.className = 'TB_Button_Text' ;
|
||||
oCell.noWrap = true ;
|
||||
oCell.appendChild( oDoc.createTextNode( this.Label ) ) ;
|
||||
}
|
||||
|
||||
if ( this.ShowArrow )
|
||||
{
|
||||
if ( this.Style != FCK_TOOLBARITEM_ONLYICON )
|
||||
{
|
||||
// A padding cell.
|
||||
oRow.insertCell(-1).appendChild( this._CreatePaddingElement( oDoc ) ) ;
|
||||
}
|
||||
|
||||
oCell = oRow.insertCell(-1) ;
|
||||
var eImg = oCell.appendChild( oDoc.createElement( 'IMG' ) ) ;
|
||||
eImg.src = FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ;
|
||||
eImg.width = 5 ;
|
||||
eImg.height = 3 ;
|
||||
}
|
||||
|
||||
// The last padding cell.
|
||||
oCell = oRow.insertCell(-1) ;
|
||||
oCell.appendChild( this._CreatePaddingElement( oDoc ) ) ;
|
||||
}
|
||||
|
||||
parentElement.appendChild( oMainElement ) ;
|
||||
}
|
||||
|
||||
FCKToolbarButtonUI.prototype.ChangeState = function( newState, force )
|
||||
{
|
||||
if ( !force && this.State == newState )
|
||||
return ;
|
||||
|
||||
var e = this.MainElement ;
|
||||
|
||||
switch ( parseInt( newState ) )
|
||||
{
|
||||
case FCK_TRISTATE_OFF :
|
||||
e.className = 'TB_Button_Off' ;
|
||||
e.onmouseover = FCKToolbarButton_OnMouseOverOff ;
|
||||
e.onmouseout = FCKToolbarButton_OnMouseOutOff ;
|
||||
e.onclick = FCKToolbarButton_OnClick ;
|
||||
|
||||
break ;
|
||||
|
||||
case FCK_TRISTATE_ON :
|
||||
e.className = 'TB_Button_On' ;
|
||||
e.onmouseover = FCKToolbarButton_OnMouseOverOn ;
|
||||
e.onmouseout = FCKToolbarButton_OnMouseOutOn ;
|
||||
e.onclick = FCKToolbarButton_OnClick ;
|
||||
|
||||
break ;
|
||||
|
||||
case FCK_TRISTATE_DISABLED :
|
||||
e.className = 'TB_Button_Disabled' ;
|
||||
e.onmouseover = null ;
|
||||
e.onmouseout = null ;
|
||||
e.onclick = null ;
|
||||
bEnableEvents = false ;
|
||||
break ;
|
||||
}
|
||||
|
||||
this.State = newState ;
|
||||
}
|
||||
|
||||
function FCKToolbarButtonUI_Cleanup()
|
||||
{
|
||||
if ( this.MainElement )
|
||||
{
|
||||
this.MainElement._FCKButton = null ;
|
||||
this.MainElement = null ;
|
||||
}
|
||||
}
|
||||
|
||||
// Event Handlers.
|
||||
|
||||
function FCKToolbarButton_OnMouseOverOn()
|
||||
{
|
||||
this.className = 'TB_Button_On_Over' ;
|
||||
}
|
||||
|
||||
function FCKToolbarButton_OnMouseOutOn()
|
||||
{
|
||||
this.className = 'TB_Button_On' ;
|
||||
}
|
||||
|
||||
function FCKToolbarButton_OnMouseOverOff()
|
||||
{
|
||||
this.className = 'TB_Button_Off_Over' ;
|
||||
}
|
||||
|
||||
function FCKToolbarButton_OnMouseOutOff()
|
||||
{
|
||||
this.className = 'TB_Button_Off' ;
|
||||
}
|
||||
|
||||
function FCKToolbarButton_OnClick( e )
|
||||
{
|
||||
if ( this._FCKButton.OnClick )
|
||||
this._FCKButton.OnClick( this._FCKButton ) ;
|
||||
}
|
||||
|
||||
/*
|
||||
Sample outputs:
|
||||
|
||||
This is the base structure. The variation is the image that is marked as {Image}:
|
||||
<td><div class="TB_Button_On" title="Smiley">{Image}</div></td>
|
||||
<td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td>{Image}</td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td>
|
||||
<td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td><img class="TB_Button_Padding"></td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td>
|
||||
|
||||
These are samples of possible {Image} values:
|
||||
|
||||
Strip - IE version:
|
||||
<div class="TB_Button_Image"><img src="strip.gif" style="top:-16px"></div>
|
||||
|
||||
Strip : Firefox, Safari and Opera version
|
||||
<img class="TB_Button_Image" style="background-position: 0px -16px;background-image: url(strip.gif);">
|
||||
|
||||
No-Strip : Browser independent:
|
||||
<img class="TB_Button_Image" src="smiley.gif">
|
||||
*/
|
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarfontformatcombo.js
|
||||
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarFontFormatCombo = function( tooltip, style )
|
||||
{
|
||||
this.CommandName = 'FontFormat' ;
|
||||
this.Label = this.GetLabel() ;
|
||||
this.Tooltip = tooltip ? tooltip : this.Label ;
|
||||
this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
|
||||
|
||||
this.NormalLabel = 'Normal' ;
|
||||
|
||||
this.PanelWidth = 190 ;
|
||||
}
|
||||
|
||||
// Inherit from FCKToolbarSpecialCombo.
|
||||
FCKToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo ;
|
||||
|
||||
|
||||
FCKToolbarFontFormatCombo.prototype.GetLabel = function()
|
||||
{
|
||||
return FCKLang.FontFormat ;
|
||||
}
|
||||
|
||||
FCKToolbarFontFormatCombo.prototype.CreateItems = function( targetSpecialCombo )
|
||||
{
|
||||
// Add the Editor Area CSS to the panel to create a realistic preview.
|
||||
FCKTools.AppendStyleSheet( targetSpecialCombo._Panel.Document, FCKConfig.ToolbarComboPreviewCSS ) ;
|
||||
|
||||
// Get the format names from the language file.
|
||||
var aNames = FCKLang['FontFormats'].split(';') ;
|
||||
var oNames = {
|
||||
p : aNames[0],
|
||||
pre : aNames[1],
|
||||
address : aNames[2],
|
||||
h1 : aNames[3],
|
||||
h2 : aNames[4],
|
||||
h3 : aNames[5],
|
||||
h4 : aNames[6],
|
||||
h5 : aNames[7],
|
||||
h6 : aNames[8],
|
||||
div : aNames[9]
|
||||
} ;
|
||||
|
||||
// Get the available formats from the configuration file.
|
||||
var aTags = FCKConfig.FontFormats.split(';') ;
|
||||
|
||||
for ( var i = 0 ; i < aTags.length ; i++ )
|
||||
{
|
||||
// Support for DIV in Firefox has been reintroduced on version 2.2.
|
||||
// if ( aTags[i] == 'div' && FCKBrowserInfo.IsGecko )
|
||||
// continue ;
|
||||
|
||||
var sTag = aTags[i] ;
|
||||
var sLabel = oNames[sTag] ;
|
||||
|
||||
if ( sTag == 'p' )
|
||||
this.NormalLabel = sLabel ;
|
||||
|
||||
this._Combo.AddItem( sTag, '<div class="BaseFont"><' + sTag + '>' + sLabel + '</' + sTag + '></div>', sLabel ) ;
|
||||
}
|
||||
}
|
||||
|
||||
if ( FCKBrowserInfo.IsIE )
|
||||
{
|
||||
FCKToolbarFontFormatCombo.prototype.RefreshActiveItems = function( combo, value )
|
||||
{
|
||||
// FCKDebug.Output( 'FCKToolbarFontFormatCombo Value: ' + value ) ;
|
||||
|
||||
// IE returns normal for DIV and P, so to avoid confusion, we will not show it if normal.
|
||||
if ( value == this.NormalLabel )
|
||||
{
|
||||
if ( combo.Label != ' ' )
|
||||
combo.DeselectAll(true) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( this._LastValue == value )
|
||||
return ;
|
||||
|
||||
combo.SelectItemByLabel( value, true ) ;
|
||||
}
|
||||
|
||||
this._LastValue = value ;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2006 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* "Support Open Source software. What about a donation today?"
|
||||
*
|
||||
* File Name: fcktoolbarfontscombo.js
|
||||
* FCKToolbarPanelButton Class: Handles the Fonts combo selector.
|
||||
*
|
||||
* File Authors:
|
||||
* Frederico Caldeira Knabben (fredck@fckeditor.net)
|
||||
*/
|
||||
|
||||
var FCKToolbarFontsCombo = function( tooltip, style )
|
||||
{
|
||||
this.CommandName = 'FontName' ;
|
||||
this.Label = this.GetLabel() ;
|
||||
this.Tooltip = tooltip ? tooltip : this.Label ;
|
||||
this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ;
|
||||
}
|
||||
|
||||
// Inherit from FCKToolbarSpecialCombo.
|
||||
FCKToolbarFontsCombo.prototype = new FCKToolbarSpecialCombo ;
|
||||
|
||||
|
||||
FCKToolbarFontsCombo.prototype.GetLabel = function()
|
||||
{
|
||||
return FCKLang.Font ;
|
||||
}
|
||||
|
||||
FCKToolbarFontsCombo.prototype.CreateItems = function( targetSpecialCombo )
|
||||
{
|
||||
var aFonts = FCKConfig.FontNames.split(';') ;
|
||||
|
||||
for ( var i = 0 ; i < aFonts.length ; i++ )
|
||||
this._Combo.AddItem( aFonts[i], '<font face="' + aFonts[i] + '" style="font-size: 12px">' + aFonts[i] + '</font>' ) ;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user