Hallo,
ich habe ein Problem mit den News. Unswar kommt folgendes wenn ich die News schreibe:
Nun ist meine Frage, wie bekomme ich das <p> </p> weg?
Hoffe ihr könnt mir helfen
Hallo,
ich habe ein Problem mit den News. Unswar kommt folgendes wenn ich die News schreibe:
Nun ist meine Frage, wie bekomme ich das <p> </p> weg?
Hoffe ihr könnt mir helfen
Geh mal in die article.php Rein und schick den Code mir per PN oder so, oder Schreib mir in Skype cola,heyho
mfg Nico-Cola
da c: danke dir
<?php
/*=======================================================================
| RECMS - BASED ON HOLOCMS
| #######################################################################
| 2011 (c) Copyright by TheGamerX Use of this product without a
| license is against our terms.
\======================================================================*/
require_once('./data_classes/server-data.php_data_classes-core.php.php');
require_once('./data_classes/server-data.php_data_classes-session.php.php');
$body_id = "news";
$pageid = "11";
$news_id = FilterText($_GET['web-articles-id']);
$main_sql = mysql_query("SELECT * FROM cms_news WHERE id = '".$news_id."'") or die(mysql_error());
$article_exists = mysql_num_rows($main_sql);
if($article_exists == "1"){
$news = mysql_fetch_assoc($main_sql);
$pagename = "News - ".HoloText($news['title'])."";
} else {
$main_sql = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC") or die(mysql_error());
$news = mysql_fetch_assoc($main_sql);
$news_id = $news['id'];
$pagename = "News - ".HoloText($news['title'])."";
}
///////////////////////////////////////////////////////////
//// Voting:
///////////////////////////////////////////////////////////
if(mysql_num_rows(mysql_query("SELECT * FROM cms_ratings WHERE user_id = '".$my_id."' AND news_id = '".$news_id."'")) < 1){
$vote = FilterText($_GET['vote']);
if(isset($_GET['vote']))
{
if($vote == "like")
{
mysql_query("UPDATE cms_news SET upvote = upvote+1, votes = votes+1 WHERE id = '".$news_id."'") or die(mysql_error());
mysql_query("INSERT INTO cms_ratings SET user_id = '".$my_id."', news_id = '".$news_id."'") or die(mysql_error());
header("Location: /articles/".$news_id."");
}
else if($vote == "dislike")
{
mysql_query("UPDATE cms_news SET downvote = downvote+1, votes = votes+1 WHERE id = '".$news_id."'") or die(mysql_error());
mysql_query("INSERT INTO cms_ratings SET user_id = '".$my_id."', news_id = '".$news_id."'") or die(mysql_error());
header("Location: /articles/".$news_id."");
}
else
{
header("location: $path/articles/".$news_id."");
}
}
}
setlocale(LC_TIME, "de_DE");
$monate = array("January"=>"Januar",
"February"=>"Februar",
"March"=>"März",
"April"=>"April",
"May"=>"Mai",
"June"=>"Juni",
"July"=>"Juli",
"August"=>"August",
"September"=>"September",
"October"=>"Oktober",
"November"=>"November",
"December"=>"Dezember");
require_once('./templates/community_subheader.php');
require_once('./templates/community_header.php');
?>
<style>
.watch-sparkbars {
width: 250px;
height:4px;
margin:2px 0;
border:1px solid #ccc;
overflow:hidden;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px
}
.watch-sparkbar-likes{
float:left;
height:4px;
border-right:1px solid #fff;
background:#060
}
.watch-sparkbar-dislikes{
float:right;
height:4px;
margin-right:-1px;
background:#c00
}
#news-habblet-container {
width: 397px;
margin: 0;
}
#news-habblet-container .title {
height: 90px;
background:url(../../v2/images/news/news_top.png) no-repeat;
}
#news-habblet-container .title div {
position: relative;
width: 250px;
top: 48px;
left: 78px;
text-align: center;
font-weight: bold;
}
#news-habblet-container .title .habblet-close {
position: relative;
top: 24px;
left: 365px;
cursor: pointer;
width: 15px;
height: 15px;
background: url(../../v2/images/news/close_0.png) no-repeat;
}
#news-habblet-container .title .habblet-close:hover {
background: url(../../v2/images/news/close_1.png) no-repeat;
}
#news-habblet-container #news-ad {
padding: 10px 0 10px 42px;
}
#news-habblet-container .content-container {
background: url(../../v2/images/news/news_mid.png) repeat-y;
}
#news-habblet-container #news-articles {
width: 383px;
max-height: 410px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 11px;
padding-left: 12px;
overflow: auto;
}
#news-habblet-container .news-footer {
height: 7px;
width: 397px;
background:url(../../v2/images/news/news_btm.png) no-repeat;
}
#news-habblet-container #news-articles .newsitem-date {
color: #888;
font-size: 10px;
margin-top: 2px;
}
#news-articles .news-title {
font-size: 14px;
font-weight: bold;
}
#news-articles p {
padding-top: 5px;
}
#news-ad .ad-message {
text-align: left;
font-size: 9px;
font-style: italic;
font-weight: bold;
padding-top: 8px;
}
#news-articles ul.articlelist li {
padding: 8px 20px;
}
#news-articles ul.articlelist li.even {
background-color: #ecece6;
}
</style>
<div id="content" style="position: relative" class="clearfix">
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix orange">
<h2 class="title">» News Archiv</h2>
<div id="article-archive">
<?php
$sql = mysql_query("SELECT * FROM cms_news ORDER BY id DESC LIMIT 55");
if(mysql_num_rows($sql) > 0) {
$act = "t";
$act_date = time();
$i = 1;
?>
<?php while($row = mysql_fetch_assoc($sql)){ ?>
<?php
if($act == "t") {
if(date("d.m.Y", $row['published']) != date("d.m.Y", time())) {
if($i > 1) {
echo "</ul>";
}
if(date("d.m.Y", $row['published']) == date("d.m.Y", time() - 86400)) {
echo "<h2>Gestern</h2><ul>";
}
$i = 1;
$act = "m";
$act_date = $row['published'];
} else {
if($i == 1) {
echo "<h2>Heute</h2><ul>";
}
}
}
if(date("m.Y", $row['published']) != date("m.Y", $act_date)) {
echo "</ul>";
$act = "nm";
$i = 1;
$monat = strftime("%B", $row['published']);
$text = $monate[$monat]." ". date("Y", $row['published']);
$act_date = $row['published'];
if($i == 1) {
echo "<h2>".$text."</h2><ul>";
}
} else {
if(date("d.m.Y", $row['published']) != date("d.m.Y", $act_date) && $act == "m") {
echo "</ul>";
$i = 1;
$act = "nm";
$monat = strftime("%B", $row['published']);
$text = $monate[$monat]." ". date("Y", $row['published']);
$act_date = $row['published'];
if($i == 1) {
echo "<h2>".$text."</h2><ul>";
}
}
}
?>
<li><?php if($news_id !== $row['id']){ echo"<a href="".$path."/articles/".$row['id']."">"; } ?>
<?php echo $row['title']; ?></a> »
<?php if($news_id !== $row['id']){ echo"</a>"; } ?></li>
<?php $i++; } ?>
<style type="text/css">
<!--
.test{
width: 200px;
font-family: verdana;
font-size: 12px;
}
.button11 {
-moz-box-shadow: inset 1px 1px 6px 0px #ffffff;
-webkit-box-shadow: inset 1px 1px 6px 0px white;
box-shadow: inset 1px 1px 6px 0px white;
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #EDEDED), color-stop(1, #DFDFDF) );
background: -moz-linear-gradient( center top, #EDEDED 5%, #DFDFDF 100% );
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color: #EDEDED;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
border: 1px solid #B0B0B0;
display: inline-block;
color: #777;
font-family: verdana;
font-size: 12px;
padding: 6px 20px;
text-decoration: none;
text-shadow: 0px 0px 0px white;
}
</style>
</ul>
<?php } ?>
<h2>Mehr News?</h2>
<ul>
<li>
<a href="<?php echo $path; ?>/articles" class="article">Alle News anzeigen</a> »
</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper">
<h2><?php echo HoloText($news['title']); ?></h2>
<big>
<div class="article-meta">Geschrieben am <?php echo date('d.m.Y', $news['published']); ?>
<a href="news.php?category=<?php echo $news['category']; ?>"><?php echo $news['category']; ?></a></div>
<p class="summary"><?php echo nl2br(HoloText($news['longstory'])); ?></p>
<p>Hallo liebe/r <?php echo $name; ?>,
<div class="article-body">
<p><?php echo nl2br(HoloText($news['shortstory'], true)); ?></p>
<div class="article-body"><img src="../web-gallery/album1/users_online.PNG"> <b><?php echo $news['author']; ?></b><br><br></div>
<?php
$like_percent = $news['upvote'] * 100 / $news['votes'];
$dislike_percent = $news['downvote'] * 100 / $news['votes'];
?>
</div>
<?php
if(mysql_num_rows(mysql_query("SELECT * FROM cms_ratings WHERE user_id = '".$my_id."' AND news_id = '".$news_id."'")) < 1){
?>
<?php
}
?>
<div class="article-meta"><h2>Neuigkeiten bewerten:</h2>Wie gefallen dir diese News?</div> <div class="watch-sparkbars"> <div class="watch-sparkbar-likes" style="width: <?php echo $like_percent; ?>%"></div> <div class="watch-sparkbar-dislikes" style="width: <?php echo $dislike_percent; ?>%"></div> </div> <span class="watch-likes-dislikes">Gefällt <font color="green"><?php echo $news['upvote']; ?></font>, gefällt <font color="red"><?php echo $news['downvote']; ?></font> Kuggo´s nicht </span> <div class="article-body"><li> <?php
if(mysql_num_rows(mysql_query("SELECT * FROM cms_ratings WHERE user_id = '".$my_id."' AND news_id = '".$news_id."'")) < 1){
?>
<div style="float: right"><a href="./articles/<?php echo $news_id; ?>&vote=like"><img src="./web-gallery/v2/images/news/like.png"></a> <a href="./articles/<?php echo $news_id; ?>&vote=dislike"><img src="./web-gallery/v2/images/news/unlike.png"></a></div>
<?php
}
?></div></div></div>
</div><style type="text/css">
input[type="text"], input[type="password"] {
background-color: #F1F1F1;
border: 1px solid #999999;
width: 175px;
padding: 5px;
font-family: verdana;
font-size: 10px;
color: #666666;
}
input[type="submit"] {
background-color: #F1F1F1;
border: 1px solid #999999;
padding: 5px;
font-family: verdana;
font-size: 10px;
color: #666666;
}
textarea {
background-color: #F1F1F1;
border: 1px solid #999999;
padding: 5px;
width: 500px;
height: 60px;
font-family: verdana;
font-size: 10px;
color: #666666;
}
select {
background-color: #F1F1F1;
border: 1px solid #999999;
padding: 5px;
font-family: verdana;
font-size: 10px;
color: #666666;
}
</style>
<?php
if(isset($_GET['commentsite']) && is_numeric($_GET['commentsite'])) {
$site = intval($_GET['commentsite']);
} else {
$site = 1;
}
$per_page = 5;
$count = mysql_num_rows(mysql_query("SELECT * FROM `cms_news_comments` WHERE `article` = '".$news_id."'"));
$aSites = ceil($count / $per_page);
if($aSites == 0) {
$aSites = 1;
}
if($site > $aSites) {
$site = 1;
}
if($site == 1) {
$start = 0;
} else {
$start = $per_page * $site - $per_page;
}
if(isset($_POST['post_comment'])){
$selLastUser = mysql_fetch_assoc(mysql_query("SELECT * FROM `cms_news_comments` WHERE `userid` = '".$my_id."' AND `article` = '" . $news_id . "' ORDER BY `id` DESC"));
$posted_on = time();
$comment = $_POST['comment'];
if($posted_on - 60 > $selLastUser['posted_on']) {
if($comment == NULL){
$error_message = 'Netter Versuch aber ne ;)<br /><br />';
}else{
mysql_query("INSERT INTO `cms_news_comments` (`article`, `userid`, `comment`, `posted_on`) VALUES ('".$news_id."', '".$my_id."', '".$comment."', '".$posted_on."')");
header("Location: /articles/".$news_id."#comments");
}
} else {
$error_message = "<font size='red'>Du kannst nur jede Minute ein Kommentar schreiben!</font><br />";
}
}
$uIn = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$my_id."'"));
if(isset($_GET['delete']) && is_numeric($_GET['delete'])) {
$delete = intval($_GET['delete']);
$num = mysql_num_rows(mysql_query("SELECT * FROM `cms_news_comments` WHERE `id` = '".$delete."'"));
if($num > 0) {
if($delete && $uIn['rank'] >= 7) {
mysql_query("DELETE FROM `cms_news_comments` WHERE `id` = '".$delete."'");
}
}
header("Location: /articles/".$news_id."#comments");
}
?>
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper">
<h2>Kommentare</h2><div class="article-meta"></div>
<div class="article-body">
<?php
if($user->name != 'Guest'){
echo $error_message; ?>
<br>
<form action="./articles/<?php echo $news_id; ?>#comments" method="post">
<textarea name="comment" cols="70" rows="8" maxlength="500"></textarea></center><br> <br>
<input type="submit" name="post_comment" value="Absenden" class="button11">
</form>
<?php
}else{
echo 'Du musst eingeloggt sein um zu posten!';
}
?> <br>
</div>
</div>
</div>
</div>
<?php
$getComments = mysql_query("SELECT * FROM `cms_news_comments` WHERE `article` = '".$news_id."' ORDER BY `id` DESC LIMIT $start, $per_page");
?>
<a name="comments"></a>
<div class="habblet-container ">
<div class="cbb clearfix notitle ">
<div id="article-wrapper"><h2>Kommentare</h2>
<div class="article-meta"></div>
<div class="article-body">
<?php
if(mysql_num_rows($getComments) == 0){
echo 'Kein Kommentar vorhanden, sei der Erste! :)';
}else{
echo "Seite: ";
for($i = 1; $i <= $aSites; $i++) {
if($i == $site) {
echo "<b>".$i."</b> ";
} else {
echo "<a href='./articles/".$news_id."&commentsite=".$i."#comments'>".$i."</a> ";
}
}
echo '<table width="530px">';
while($Comments = mysql_fetch_assoc($getComments)){
$getUserInfo = mysql_query("SELECT * FROM `users` WHERE `id` = '".$Comments['userid']."'");
$getUserRank = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_ranklist` WHERE `userid` = '".$Comments['userid']."'"));
$userInfo = mysql_fetch_assoc($getUserInfo);
echo "
<tr>
<td width='90px' valign='top'>
<div style='float:left'><img src='http://www.habbo.de/habbo-imaging/avatarimage?figure=".$userInfo['look']."&head_direction=3&direction=4&gesture=sml'></div>
";
if($getUserRank['rank'] == 6){
echo '<br /><br /><br /><br /><br /><div align="right" style="padding-left: 35px;position: absolute; z-index:1"><img src="http://swf.Kuggo.re/r63/c_images/album1584/STAFF.gif"></div>';
} elseif($getUserRank['rank'] == 6 OR $getUserRank['rank'] == 5 OR $userInfo['rank'] == 8 OR $userInfo['rank'] == 9) {
echo '<br /><br /><br /><br /><br /><div align="right" style="padding-left: 35px; position: absolute; z-index:1"><img src="http://swf.Kuggo.re/r63/c_images/album1584/STAFF.gif"></div>';
}
echo "
</td>
<td width='530px' valign='top'>
<strong>"; if($uIn['rank'] >= 7) { echo "<a href='./articles/".$news_id."&delete=".$Comments['id']."#comments' >X (LÖSCHEN)</a> "; } echo "Kommentar: ".$news_row['title']."</strong><br /><br />";
echo nl2br($Comments['comment']);
echo "
</td>
</tr>
<tr>
<td width='90px' valign='top'>
</td>
<td width='427px' align='right'>
<i>geschrieben von <strong><a href='#'>".$userInfo['username']."</a></strong></i><br />
</td>
</tr>
<tr><td colspan='2'><hr></td></tr>";
}
echo "</table>";
}
?>
</div>
</div>
</div>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
<?php require_once('./templates/community_footer.php'); ?>
Alles anzeigen
isch brauche hilfe leute.
Hau mal deine Teamviewer daten her. (PN!)
Such nach:
<?php echo nl2br(HoloText($news['longstory'])); ?>
Ersetzen mit:
<?php echo nl2br($news['longstory']); ?></p>
<?php echo nl2br($news['longstory']); ?></p>
jetzt ist das problem.
das mann den text nicht sieht...
jetzt erscheint der text nicht mehr..
jetzt ist das problem.
das mann den text nicht sieht...
jetzt erscheint der text nicht mehr..
Das kann ich mir garnicht vorstellen, dann hast du etwas falsch gemacht.
@Edit: Du hast recht, mach das rückgängig und mach folgendes:
<?php echo nl2br(HoloText($news['shortstory'], true)); ?>
in:
<?php echo nl2br(HoloText($news['shortstory'])); ?>
jetzt ist das problem.
das mann den text nicht sieht...
jetzt erscheint der text nicht mehr..
geht immer noch nicht
geht immer noch nicht
Ich würde mal sagen, dass im Housekeeping selbst der Fehler liegt. Schick uns mal von dort news.php
Vielen dank für die hilfe
da wäre die news.php
<?php
if($user_rank > 5){
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }
$pagename = "News bearbeiten";
$pageid = "news";
$page = FilterText($_GET['page']);
$posts = mysql_evaluate("SELECT COUNT(*) FROM cms_news");
$pages = ceil(($posts + 0) / 50);
if($page > $pages || $page < 1){
$page = 1;
}
if($_POST['site']){
header("location: ".$adminpath."/index/p/news&page=".$_POST['page']."");
}
if($_POST['site2']){
header("location: ".$adminpath."/index/p/news&page=".$_POST['page2']."");
}
if($do == "delete" && is_numeric($key)){
$check = mysql_query("SELECT id FROM cms_news WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
mysql_query("DELETE FROM cms_news WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','News gelöscht','news.php','".$my_id."','0','".$date_full."')") or die(mysql_error());
$msg = "<div class='rounded rounded-green'><center>News wurde erfolgreich gelöscht. <img src="./images/check.gif"></center></div>";
} else {
$msg = "<div class='rounded rounded-red'><center>Error - No puedes eliminar noticias <img src="./images/del.gif"></center></div>";
}
} elseif($do == "edit" && is_numeric($key)){
$check = mysql_query("SELECT * FROM cms_news WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
$article = mysql_fetch_assoc($check);
$editor_mode = true;
} else {
$msg = "<div class='rounded rounded-red'><center>Error - No puedes editar noticias <img src="./images/del.gif"></center></div>";
}
} elseif($do == "save" && is_numeric($key) && isset($_POST['image'])){
$check = mysql_query("SELECT id FROM cms_news WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($check) > 0){
$newsdata = mysql_fetch_assoc($check);
if($_POST['comments'] == true){ $checked = '1'; }else{ $checked = '0'; }
mysql_query("UPDATE cms_news SET title = '".$_POST['title']."', image = '".$_POST['image']."', shortstory = '".$_POST['shortstory']."', longstory = '".$_POST['longstory']."', author = '".$_POST['author']."' WHERE id = '".$key."' LIMIT 1") or die(mysql_error());
mysql_query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','News wurde Bearbeitet','news.php','".$my_id."','0','".$date_full."')") or die(mysql_error());
$msg = "<div class='rounded rounded-green'><center>News wurde erfolgreich bearbeitet. <img src="./images/check.gif"></center></div>";
$editor_mode = false;
} else {
$msg = "<div class='rounded rounded-red'><center>Error - ¡La noticia no existe! <img src="./images/check.gif"></center></div>";
}
} elseif($do == "add"){
$editor_mode = true;
if($_POST['submit']){
mysql_query("INSERT INTO stafflogs (action,message,note,userid,targetid,timestamp) VALUES ('Housekeeping','News wurde hinzugefügt','news_add.php','".$my_id."','0','".$date_full."')") or die(mysql_error());
mysql_query("INSERT INTO cms_news (title,longstory,shortstory,published,image,campaign,campaignimg,author) VALUES ('".$_POST['title']."','".$_POST['shortstory']."','".$_POST['longstory']."','".time()."','".$_POST['image']."','0','0','".$_POST['author']."')") or die(mysql_error());
$msg = "<div class='rounded rounded-green'><center>Noticia a&nitlde;adida correctamente</center></div>";
$editor_mode = false;
}
}
@include('subheader.php');
if(isset($msg)){ ?>
<style type="text/css">
#theAdminForm .tableborder table tr .tablerow2 #story {
width: 250px;
overflow: auto;
}
</style>
<p><strong><?php echo $msg; ?></strong></p><?php } ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php if($editor_mode !== true){ ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<form action='<?php echo $adminpath; ?>/index/p/news&do=save' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'><center>News - Übersicht
<select name="page">
<?php for ($i = 1; $i <= $pages; $i++){ ?>
<option value="<?php echo $i; ?>"<?php if($i == $page){ echo' selected="selected"'; } ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<input type="submit" name="site" value="Weiter »"> <span class='fauxbutton'><a href='./index/p/news&do=add'>News hinzufügen</a></span>
</div>
</center>
<table cellpadding='4' cellspacing='0' width='100%'>
<tr>
<td class='tablesubheader' width='1%' align='center'>ID</td>
<td class='tablesubheader' width='20%'>Überschrift</td>
<td class='tablesubheader' width='12%' align='left'>Fecha</td>
<td class='tablesubheader' width='10%' align='left'>Autor</td>
<td class='tablesubheader' width='1%' align='center'>EDitar</td>
<td class='tablesubheader' width='1%' align='center'>Borrar</td>
</tr>
<?php
$query_min = ($page * 50) - 50;
if($query_min < 0){ // Page 1
$query_min = 0;
}
$get_articles = mysql_query("SELECT * FROM cms_news ORDER BY id DESC LIMIT ".$query_min.", 50") or die(mysql_error());
while($row = mysql_fetch_assoc($get_articles)){
?>
<tr>
<td class='tablerow1' align='center'><?php echo $row['id']; ?></td>
<td class='tablerow2'><strong><?php echo HoloText($row['title']); ?></strong><div class='desctext'><?php echo $row['longstory']; ?></div></td>
<td class='tablerow2' align='left'><?php echo date('d.m.Y, H:i', $row['published']); ?></td>
<td class='tablerow2' align='left'><?php echo $row['author']; ?></td>
<td class='tablerow2' align='center'><a href='<?php echo $adminpath; ?>/index/p/news&do=edit&key=<?php echo $row['id']; ?>'><img src='./images/edit.gif' alt='Editar'></a></td>
<td class='tablerow2' align='center'><a href='<?php echo $adminpath; ?>/index/p/news&do=delete&key=<?php echo $row['id']; ?>'><img src='./images/del.gif' alt='Eliminar'></a></td>
</tr>
<?php } ?>
</table>
<div class='tableborder'>
<div class='tableheaderalt'><center>News - Übersicht
<select name="page2">
<?php for ($i = 1; $i <= $pages; $i++){ ?>
<option value="<?php echo $i; ?>"<?php if($i == $page){ echo' selected="selected"'; } ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<input type="submit" name="site2" value="Weiter »"> <span class='fauxbutton'><a href='./index/p/news&do=add'>News hinzufügen</a></span>
</div>
</div>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php }elseif($do == "add"){ ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<form action='<?php echo $adminpath; ?>/index/p/news&do=add' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'><center>erstellen Nachrichten</center></div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Überschrift</b><div class='graytext'>So werden deine News heißen!</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='title' value="" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Text Unterschrift</b><div class='graytext'>Beschreibe deine News in ein paar Wörtern!</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='shortstory' value="" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Dein Bericht!</b><div class='graytext'>Deine neusten News !<br /><font color="green"><a href="http://Xeppo.de">Xeppo.de.</a></font></div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea id="story" name="longstory" cols='60' rows='8' style="width: 8%"></textarea></td>
</tr>
<script type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
language : "es",
// General options
mode : "exact",
elements : "story",
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,|,insertdate,inserttime,preview",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
width: "750px",
// Example content CSS (should be your site CSS)
content_css : "./tiny_mce/css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "./tiny_mce/lists/template_list.js",
external_link_list_url : "./>tiny_mce/lists/link_list.js",
external_image_list_url : "./tiny_mce/lists/image_list.js",
media_external_list_url : "./tiny_mce/lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Newsbild</b><div class='graytext'>Um Newsbilder zu finden, klicke <a href="http://Habbotimes.net/pixel/news" target="_new">hier</a> !</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='image' value="" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Autor</b><div class='graytext'>Wer hat die News geschrieben?</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='author' value="" size='30' class='textinput'></td>
</tr>
<tr>
<tr><td align='center' class='tablesubheader' colspan='2' ><input type='submit' name='submit' value='News Speichern' class='realbutton' accesskey='s'></td></tr>
</table>
</div>
</div>
</form>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php } elseif($do == "edit" && is_numeric($key)) { ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<form action='<?php echo $adminpath; ?>/index/p/news&do=save&key=<?php echo $article['id']; ?>' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'><center>Noticia <u><?php echo $articlen['title']; ?></u> (ID: <?php echo $article['id']; ?>) <img src="./images/edit.gif"></center></div>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Überschrift</b><div class='graytext'>So werden deine News heißen!</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='title' value="<?php echo $article['title']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Unter-Überschrift</b><div class='graytext'>Beschreibung in 3 - 5 Wörtern</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='longstory' value="<?php echo $article['longstory']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Dein Bericht</b><div class='graytext'>Was soll drinne stehen??<br /><font color="green"><a href="http://HabboTimes.net/pixel/img">Hier findets du ein paar Bilder!.</a></font></div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea id="story" name="shortstory" cols='60' rows='8' style="width: 8%"><?php echo $article['shortstory']; ?></textarea></td>
</tr>
<script type="text/javascript" src="./tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
language : "es",
// General options
mode : "exact",
elements : "story",
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,|,insertdate,inserttime,preview",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
width: "750px",
// Example content CSS (should be your site CSS)
content_css : "./tiny_mce/css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "./tiny_mce/lists/template_list.js",
external_link_list_url : "./>tiny_mce/lists/link_list.js",
external_image_list_url : "./tiny_mce/lists/image_list.js",
media_external_list_url : "./tiny_mce/lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Newsbild</b><div class='graytext'>Such dir <a href="http://habbotimes.net/pixel/news" target="_new">hier</a> ein passendes Newsbild aus!.</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='image' value="<?php echo $article['image']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Autor</b><div class='graytext'>Wer hat den Bericht geschrieben?</div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='author' value="<?php echo $article['author']; ?>" size='30' class='textinput'></td>
</tr>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Comentarios</b><div class='graytext'>Clic en la casilla si deseas activarlo</div></td>
<td class='tablerow2' width='60%' valign='middle'><input tabindex="6" type="checkbox" name="comments" id="comments" <?php if($article['comments'] == 1){ ?>checked="checked" <?php } ?>value="true"/></td>
</tr>
<tr><td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='Actualizar Noticia' class='realbutton' accesskey='s'></td></tr>
</form></table></div><br />
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?php } ?>
<?php //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
</div><!-- / RIGHT CONTENT BLOCK -->
</td></tr>
</table>
</div><!-- / OUTERDIV -->
<?php require_once('footer.php'); } else { require_once('error.php'); exit; } ?>
Alles anzeigen
Hmm.. daran liegt es nicht. Die posts werden nicht gefiltert.. trotzdem nicht so toll..
<?php echo nl2br(HoloText($news['shortstory'])); ?>
Ersetz das einfach durch das:
<?php echo $news['shortstory']; ?>
Dann sollte es normalerweise funktionieren.
Alles anzeigenHmm.. daran liegt es nicht. Die posts werden nicht gefiltert.. trotzdem nicht so toll..
<?php echo nl2br(HoloText($news['shortstory'])); ?>
Ersetz das einfach durch das:
<?php echo $news['shortstory']; ?>
Dann sollte es normalerweise funktionieren.
nl2br ist aber wichtig, damit der Text Zeilenumbrücke akzeptiert und nicht alles nebeneinander schreibt. Daher müssten meine Varianten funktionieren...
nl2br ist aber wichtig, damit der Text Zeilenumbrücke akzeptiert und nicht alles nebeneinander schreibt. Daher müssten meine Varianten funktionieren...
Unwichtig. Möchte nur sehen, ob er etwas anzeigt. Dadurch sollte er theoretisch den HTML-Scheiß wieder anzeigen.
Unwichtig. Möchte nur sehen, ob er etwas anzeigt. Dadurch sollte er theoretisch den HTML-Scheiß wieder anzeigen.
hat leider nicht gefunkt.
echt komisches problem ._.
Unwichtig. Möchte nur sehen, ob er etwas anzeigt. Dadurch sollte er theoretisch den HTML-Scheiß wieder anzeigen.
hat leider nicht gefunkt.
echt komisches problem ._.
Es ist nicht komisch, sondern du machst etwas falsch und kommst mit der Außrede, dass dein TeamViewer sich nicht öffnet, wenn du keine vollständige Hilfe annehmen möchtest, musst du es alleine schaffen oder lassen.
Es ist nicht komisch, sondern du machst etwas falsch und kommst mit der Außrede, dass dein TeamViewer sich nicht öffnet, wenn du keine vollständige Hilfe annehmen möchtest, musst du es alleine schaffen oder lassen.
danke schön
dann versuch ichs selbst
Flasho: habe deinen Schritt befolgt, jetzt sieht das ganze so aus:
Flasho: habe deinen Schritt befolgt, jetzt sieht das ganze so aus:
Wieso macht Ihr ihn alles so schwer?
Erzetze: <?php echo nl2br(HoloText($news['longstory'])); ?>
Durch: <?php echo htmlentities($news['longstory']); ?>
@Other: Wieso achtet keiner von euch auf XSS?
Wieso macht Ihr ihn alles so schwer?
Erzetze: <?php echo nl2br(HoloText($news['longstory'])); ?>
Durch: <?php echo htmlentities($news['longstory']); ?>
@Other: Wieso achtet keiner von euch auf XSS?
Danke Jetzt gehts.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!