ok ich versuch es. dann das sind ja nur teile eines ganzen großen...
PHP-Code:
<?php
$count = 0;
$sql_ab = mysql_query('SELECT * FROM ab
WHERE pt_pv = "'.$pt_choice.'"
ORDER BY ABname');
$sel_ab = mysql_fetch_array($sql_ab,MYSQL_BOTH);
while($sel_ab != 0)
{
$ab = $sel_ab['ABname'];
echo '<br><br><div class="ueber">'.$ab.'</div><br><br>';
$sql = mysql_query('SELECT * FROM antrag, a_gliederung
WHERE ((PV_A = 1) OR (a_gliederung.a_UGL = "Parteivorstand"))
AND antrag.AntragID = a_gliederung.AntragID
AND ABName = "'.$ab.'"
AND NOT SBName = ""
AND AK = 1
AND deleted = 0
AND antrag.pt_pv = "'.$pt_choice.'"
GROUP BY a_gliederung.AntragID
ORDER BY AB_Nr');
$sel = mysql_fetch_array($sql,MYSQL_BOTH);
while($sel != 0)
{
if($count == 0)
{
$color = "";
$count = 1;
}
else
{
$color = "#CCCCCC";
$count = 0;
}
$text = $sel['text'];
$text = str_replace("'",'"',$text);
$text = html_entity_decode($text);
$lock = $sel['locked'];
echo '<hr>
<table width="800">
<tr>
<td bgcolor="'.$color.'">
<b class="text">
<a name="'.$sel['AntragID'].'">
'.$sel_ab['ABshort'].' '.$sel['AB_Nr'].' '.$sel['Ueber'].'
</a>
</b>
<br>';
if(($lock == 0) || ($lock == $UserID_akt))
{
echo '<a href="table.php?id='.$sel['AntragID'].'&text=Antragstext#'.$sel['AntragID'].'">Text Bearbeiten</a> ¦
<a href="table.php?id='.$sel['AntragID'].'&text=Empfehlung#'.$sel['AntragID'].'">Empf. Bearbeiten</a> ¦
<a href="table.php?id='.$sel['AntragID'].'&text=Beschluss#'.$sel['AntragID'].'">Beschl. Bearbeiten</a>';
}
else
{
$vebResult=mysql_query('SELECT * FROM users
WHERE UserID = "'.$lock.'"');
$bResult=mysql_fetch_array($vebResult,MYSQL_BOTH);
//---------Hinweis wenn Antrag gerade in Bearbeitung----------
echo '<div class="hinweis3">Der Antrag wird gerade bearbeitet von:</div>
<div class="hinweis3">"'.$bResult['Name'].'" </div>';
}
echo '</td>';
if($_GET['id'] == $sel['AntragID'])
{
$update = mysql_query('UPDATE antrag SET locked = 0
WHERE UserID = "'.$UserID_akt.'"');
$update = mysql_query('UPDATE antrag SET locked = "'.$UserID_akt.'"
WHERE AntragID = "'.$_GET['id'].'"');
echo '<td align="right" bgcolor="'.$color.'">';
if($_GET['save'])
{
echo '<div class="hinweis">Gespeichert</div>';
}
else
{
echo '<div class="hinweis">Noch nicht gespeichert</div>';
}
echo '<form action="table.php" method="post" class="form">
<input type="hidden" value="'.$sel['AntragID'].'" name="id">
<input type="submit" class="ibutton" value="Speichern">
<input type="hidden" name="typ" value="'.$_GET['text'].'">
</td>
</tr>
</table>';
echo '<table width="800" border="1">
<tr>
<td class="ueber">
<br>
Antragstext
<br><br>
</td>
<td width="65">
</td>
<td class="ueber">';
if($_GET['text'] == "Empfehlung")
{
echo '<br>Empfehlung<br><br>';
}
else
{
if(($datepvBis >= 0) || ($pvBis == "") && ($_GET['text'] != "Beschluss"))
{
echo '<br>Empfehlung<br><br>';
}
}
if($_GET['text'] == "Beschluss")
{
echo '<br>Beschluss<br><br>';
}
else
{
if(($datepvBis < 0) && ($pvBis != "") && ($_GET['text'] != "Empfehlung"))
{
echo '<br>Beschluss<br><br>';
}
}
echo '</td>
</tr>
<tr>';
if($_GET['text'] == "Antragstext")
{
echo '<td valign="top">';
$text = $sel['text'];
$text = str_replace("'",'"',$text);
$content = html_entity_decode($text);
function freeRTE_Preload($content)
{
// Strip newline characters.
$content = str_replace(chr(10), " ", $content);
$content = str_replace(chr(13), " ", $content);
// Replace single quotes.
$content = str_replace(chr(145), chr(39), $content);
$content = str_replace(chr(146), chr(39), $content);
// Return the result.
return $content;
}
// Send the preloaded content to the function.
$content = freeRTE_Preload($content);
?>
<!-- Include the Free Rich Text Editor Runtime -->
<script src="../js/richtext_ak.js" type="text/javascript" language="javascript"></script>
<!-- Include the Free Rich Text Editor Variables Page -->
<script src="../js/config_ak.js" type="text/javascript" language="javascript"></script>
<!-- Initialise the editor -->
<script>
initRTE('<?php echo $content ?>', '../styles/style.css');
</script>
<?php
echo '</form>
<br>
</td>
<td >
</td>';
}
else
{
$text = $sel['text'];
$text = str_replace("'",'"',$text);
$text = html_entity_decode($text);
echo '<td id="ex1" width="330" class="atext3" valign="top">
<table height="70">
<tr>
<td height="70">
</td>
</tr>
</table>
'.$text.'
<br>
</td>
<td >
</td>';
}
if($_GET['text'] == "Empfehlung")
{
echo '<td valign="top">';
$text_ak = $sel['text_ak'];
$text_ak = str_replace("'",'"',$text_ak);
$content = html_entity_decode($text_ak);
function freeRTE_Preload($content)
{
// Strip newline characters.
$content = str_replace(chr(10), " ", $content);
$content = str_replace(chr(13), " ", $content);
// Replace single quotes.
$content = str_replace(chr(145), chr(39), $content);
$content = str_replace(chr(146), chr(39), $content);
// Return the result.
return $content;
}
// Send the preloaded content to the function.
$content = freeRTE_Preload($content);
?>
<body onload="getHeight()">
<!-- Include the Free Rich Text Editor Runtime -->
<script src="../js/richtext_ak.js" type="text/javascript" language="javascript"></script>
<!-- Include the Free Rich Text Editor Variables Page -->
<script src="../js/config_ak.js" type="text/javascript" language="javascript"></script>
<!-- Initialise the editor -->
<script>
initRTE('<?php echo $content ?>', '../styles/style.css');
</script>
<?php
echo '</form>
<br>
</td>';
}
else
{
if(($datepvBis >= 0) || ($pvBis == "") && ($_GET['text'] != "Beschluss"))
{
$text_ak = $sel['text_ak'];
$text_ak = str_replace("'",'"',$text_ak);
$text_ak = html_entity_decode($text_ak);
echo '<td id="ex2" width="330" class="atext3" valign="top">
<table height="70">
<tr>
<td height="70">
</td>
</tr>
</table>
'.$text_ak.'
<br>
</td>';
}
}
if($_GET['text'] == "Beschluss")
{
echo '<td valign="top">';
$text_beschl = $sel['text_beschl'];
$text_beschl = str_replace("'",'"',$text_beschl);
$content = html_entity_decode($text_beschl);
function freeRTE_Preload($content)
{
// Strip newline characters.
$content = str_replace(chr(10), " ", $content);
$content = str_replace(chr(13), " ", $content);
// Replace single quotes.
$content = str_replace(chr(145), chr(39), $content);
$content = str_replace(chr(146), chr(39), $content);
// Return the result.
return $content;
}
// Send the preloaded content to the function.
$content = freeRTE_Preload($content);
?>
<body onload="getHeight()">
<!-- Include the Free Rich Text Editor Runtime -->
<script src="../js/richtext_ak.js" type="text/javascript" language="javascript"></script>
<!-- Include the Free Rich Text Editor Variables Page -->
<script src="../js/config_ak.js" type="text/javascript" language="javascript"></script>
<!-- Initialise the editor -->
<script>
initRTE('<?php echo $content ?>', '../styles/style.css');
</script>
<?php
echo '</form>
<br>
</td>';
}
else
{
if(($datepvBis < 0) && ($pvBis != "") && ($_GET['text'] != "Empfehlung"))
{
$text_beschl = $sel['text_beschl'];
$text_beschl = str_replace("'",'"',$text_beschl);
$text_beschl = html_entity_decode($text_beschl);
echo '<td id="ex3" width="330" class="atext3" valign="top">
<table height="70">
<tr>
<td height="70">
</td>
</tr>
</table>
'.$text_beschl.'
<br>
</td>';
}
}
echo '</tr>';
echo '</table>';
}
else
{
echo '</tr>
</table>';
}
$sel = mysql_fetch_array($sql,MYSQL_BOTH);
}
$sel_ab = mysql_fetch_array($sql_ab,MYSQL_BOTH);
}
?>
SO das is die eigentliche seite.
http://sushi.liebaetz.de/richtig.html
wenn ich nun in der config_ak.js folgendes benutze
HTML-Code:
// Width of the rich text editor.
rteWidth = "378px";
// Name of the IFRAME (content editor).
rteName = "freeRTE";
// Name of the hidden form field.
rteFormName = "freeRTE_content";
// Height of the rich text editor.
...
function getHeight()
{
rteHeight = (document.getElementById('ex1').offsetHeight);
}
...
sieht das ganze so aus.
http://sushi.liebaetz.de/falsch.html
es verschwindet praktisch ne ganze spalte der tabelle und die nachfolgenden zeilen rücken alle in die rechte spalte.
wenn ich nun in der config_ak.js etwas anderes probieren
HTML-Code:
// Width of the rich text editor.
rteWidth = "378px";
// Name of the IFRAME (content editor).
rteName = "freeRTE";
// Name of the hidden form field.
rteFormName = "freeRTE_content";
// Height of the rich text editor.
...
function getHeight()
{
height_text = (document.getElementById('ex1').offsetHeight);
}
rteHeight = height_text;
...
passiert das
http://sushi.liebaetz.de/falsch2.html
kurz beschrieben wie es funktionieren soll.
die linke spalte "Antragstext" hat eine bestimmt höhe. die wird wie im ersten beitrag beschrieben mit
<body onload="">
und
(document.getElementById('ex1').offsetHeight);
ermittelt. leider hab ich keine andere möglichkeit gefunden außer es im body aufzurufen.
diese höhe soll dann dem rich-text-editor in der rechten spalte zugewiesen werden.
im ersten beitrag sieht man die entsprechende code-zeile dafür. (letzter codeauszug)