Domanda Errore News

@RadioBart
/housekeeping/news_compose.php
<?php
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright © 2008 Meth0d. All rights reserved.
|| #
Perfavore, Entra oppure Registrati per vedere i Link!

|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|+===================================================*/

require_once('../core.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }

$pagename = "Componi una news";

if($do == "save" && isset($_POST['topstory'])){

$num = $key;

$title = addslashes($_POST['title']);
$category = addslashes($_POST['category']);
$topstory = addslashes($_POST['topstory']);
$short_story = addslashes($_POST['short_story']);
$story = addslashes($_POST['story']);
$name = addslashes($_POST['author']);

mysql_query("INSERT INTO cms_news (title,category,topstory,short_story,story,author,date) VALUES ('".$title."','".$category."','".$topstory."','".$short_story."','".$story."','".$name."','".$date_reversed."')") or die(mysql_error());

header("Location: index.php?p=news_manage&do=bounce");

}

@include('subheader.php');
@include('header.php');
?>
<table cellpadding='0' cellspacing='8' width='100%' id='tablewrap'>
<tr> <td width='22%' valign='top' id='leftblock'>
<div>
<!-- LEFT CONTEXT SENSITIVE MENU -->
<?php @include('sitemenu.php'); ?>
<!-- / LEFT CONTEXT SENSITIVE MENU -->
</div>
</td>
<td width='78%' valign='top' id='rightblock'>
<div><!-- RIGHT CONTENT BLOCK -->


<form action='index.php?p=news_compose&do=save' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'>Componi nuova news</div>

<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Titolo</b><div class='graytext'>Titolo della tua News</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>Categoria News</b></td>
<td class='tablerow2' width='60%' valign='middle'><select name='category' class='dropdown'><option value='MomoCMS' <?php if($article['category'] == "MomoCMS"){ echo 'selected'; } ?>>MomoCMS</option> <option value='News' <?php if($article['category'] == "News"){ echo 'selected'; } ?>>News</option> <option value='Furniture' <?php if($article['category'] == "Furniture"){ echo 'selected'; } ?>>Furniture</option> <option value='Aggiornamenti' <?php if($article['category'] == "Aggiornamenti"){ echo 'selected'; } ?>>Aggiornamenti</option> <option value='Server' <?php if($article['category'] == "Server"){ echo 'selected'; } ?>>Server</option> <option value='Crediti' <?php if($article['category'] == "Crediti"){ echo 'selected'; } ?>>Crediti</option> <option value='<?php echo $shortname; ?> Club' <?php if($article['category'] == "".$shortname." Club"){ echo 'selected'; } ?>><?php echo $shortname; ?> Club</option> <option value='Manutenzione' <?php if($article['category'] == "Manutenzione"){ echo 'selected'; } ?>>Manutenzione</option> <option value='Tecnica' <?php if($article['category'] == "Tecnica"){ echo 'selected'; } ?>>Tecnica</option> <option value='Inattività' <?php if($article['category'] == "Inattività"){ echo 'selected'; } ?>>Inattività</option> <option value='Website' <?php if($article['category'] == "Website"){ echo 'selected'; } ?>>Website</option> <option value='Speciali Offerte' <?php if($article['category'] == "Speciali Offerte"){ echo 'selected'; } ?>>Speciali Offerte</option> <option value='Sponsor' <?php if($article['category'] == "Sponsor"){ echo 'selected'; } ?>>Sponsor</option> <option value='Eventi & Competizioni' <?php if($article['category'] == "Sicurezza"){ echo 'selected'; } ?>>Eventi & Competizioni</option> <option value='Sicurezza' <?php if($article['category'] == "Sicurezza"){ echo 'selected'; } ?>>Sicurezza</option> <option value='Staff' <?php if($article['category'] == "Staff"){ echo 'selected'; } ?>>Staff</option> <option value='Annunci' <?php if($article['category'] == "Annunci"){ echo 'selected'; } ?>>Annunci</option> <option value='Suggerimenti' <?php if($article['category'] == "Suggerimenti"){ echo 'selected'; } ?>>Suggerimenti</option> <option value='Momo Emulator' <?php if($article['category'] == "Momo Emulator"){ echo 'selected'; } ?>>Momo Emulator</option> <option value='Altro'>Altro</option> </select>
</td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Immagine News</b><div class='graytext'><a href="/housekeeping/tools/images/index.html"><font color="red">Immagini News</font></A></div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='topstory' value="<?php echo $article['topstory']; ?>" size='30' class='textinput'></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Anteprima</b><div class='graytext'>Inserire Anteprima!<br /></div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea name='short_story' cols='60' rows='5' wrap='soft' id='sub_desc' class='multitext'><?php echo stripslashes($article['short_story']); ?></textarea></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>News completa</b><div class='graytext'>Inserisci la news Intera.<br />L'HTML &egrave Abilitato.</div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea name='story' cols='60' rows='5' wrap='soft' id='sub_desc' class='multitext'><?php echo stripslashes($article['story']); ?></textarea></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Autore</b><div class='graytext'>Immettere il tuo nickname</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>
<tr><td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='Pubblica News' class='realbutton' accesskey='s'></td></tr>
</form></table></div><br />
</div><!-- / RIGHT CONTENT BLOCK -->
</td></tr>
</table>
</div><!-- / OUTERDIV -->
<div align='center'><br />
<?php
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
</div>

/news.php
<?php



$allow_guests = true;

include('core.php');
include('includes/session.php');
include('includes/news_headlines.php');

$body_id = "news";
$pageid = "4";
//$id = FilterText($_GET['id']);
//yaya

if(FilterText($_GET['id'])){
$news_id = FilterText($_GET['id']);
$main_sql = mysql_query("SELECT * FROM cms_news WHERE num = '".$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 - " . stripslashes($news['title']);
$archive = "0";
} else {
$pagename = "Articolo inesistente!";
$archive = "1";
}


} else {
$pagename = "News";
$archive = "1";
}

include('templates/community/subheader.php');
include('templates/community/header.php');

?>


<?php
function FilterNew($str, $news_id)
{
$str = str_replace("à", "&agrave;",($str));
$str = str_replace('\r\n', '', ($str));
$str = str_replace('\"', '', ($str));
$str = str_replace("è", "&egrave;",($str));
$str = str_replace("ì", "&igrave;",($str));
$str = str_replace("ò", "&ograve;",($str));
$str = str_replace("ù", "&ugrave;",($str));


return $str;
}
?>

<title>News di <?php echo $shortname; ?></title>

<div class="content">
<div>
<div class="c_box tabs">
<div class="heading tabs purple">
<div class="tab static">Archivio</div>
<div style="float: right;" class="tab selected" id="tab_close">&times;</div>
<?php
$a = mysql_query("select * from cms_news where num = (select max(num) from cms_news)")or die (mysql_error());
$b = mysql_fetch_assoc($a);
?>
<div style="float: right;" class="tab" id="tab_none" onclick="Pixel.View.Go('/news_vis.php?id=<?php echo $b['num']; ?>');">Ultima Notizia</div>
</div>
<div class="inner tabs show" id="close" style="padding: 0px;"></div>
<div class="inner tabs hide" id="news_last">Hier word aan gewerkt</div>
</div>
</div>
<div class="left">
<div class="c_box">
<div class="inner" style="font-size: 11px; word-wrap: break-word;">
<div class="heading red">Archivio</div><div class="inner" style="padding: 10px 6px;">



<?php

$a = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC limit 20")or die (mysql_error());

while($b = mysql_fetch_assoc($a)){

?>


<a class="mi" href="/news_vis.php?id=<?php echo $b['num']; ?>">
<div class="menuitem">
<?php echo $b['title']; ?><br>
<span style="font-weight: normal; font-size: 11px;"><?php echo $b['short_story']; ?></span>
</div>
</a>

<?php } ?>

</div></div> </div>
</div>
<div class="right">

<?php
include('news_piccole.php');
?>


</div>
<div style="clear: both;"></div>
</div>



</body>
</html>

<?php

include('templates/community/footer.php');

?>
<center><script type="text/javascript">
/* <![CDATA[ */
document.write('<s'+'cript type="text/javascript" src="http://ad.altervista.org/js.ad/size=728X90/r='+new Date().getTime()+'"><\/s'+'cript>');
/* ]]> */
</script>
</center>
 
@RadioBart
/housekeeping/news_compose.php
<?php
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright © 2008 Meth0d. All rights reserved.
|| #
Perfavore, Entra oppure Registrati per vedere i Link!

|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|+===================================================*/

require_once('../core.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }

$pagename = "Componi una news";

if($do == "save" && isset($_POST['topstory'])){

$num = $key;

$title = addslashes($_POST['title']);
$category = addslashes($_POST['category']);
$topstory = addslashes($_POST['topstory']);
$short_story = addslashes($_POST['short_story']);
$story = addslashes($_POST['story']);
$name = addslashes($_POST['author']);

mysql_query("INSERT INTO cms_news (title,category,topstory,short_story,story,author,date) VALUES ('".$title."','".$category."','".$topstory."','".$short_story."','".$story."','".$name."','".$date_reversed."')") or die(mysql_error());

header("Location: index.php?p=news_manage&do=bounce");

}

@include('subheader.php');
@include('header.php');
?>
<table cellpadding='0' cellspacing='8' width='100%' id='tablewrap'>
<tr> <td width='22%' valign='top' id='leftblock'>
<div>
<!-- LEFT CONTEXT SENSITIVE MENU -->
<?php @include('sitemenu.php'); ?>
<!-- / LEFT CONTEXT SENSITIVE MENU -->
</div>
</td>
<td width='78%' valign='top' id='rightblock'>
<div><!-- RIGHT CONTENT BLOCK -->


<form action='index.php?p=news_compose&do=save' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'>Componi nuova news</div>

<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Titolo</b><div class='graytext'>Titolo della tua News</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>Categoria News</b></td>
<td class='tablerow2' width='60%' valign='middle'><select name='category' class='dropdown'><option value='MomoCMS' <?php if($article['category'] == "MomoCMS"){ echo 'selected'; } ?>>MomoCMS</option> <option value='News' <?php if($article['category'] == "News"){ echo 'selected'; } ?>>News</option> <option value='Furniture' <?php if($article['category'] == "Furniture"){ echo 'selected'; } ?>>Furniture</option> <option value='Aggiornamenti' <?php if($article['category'] == "Aggiornamenti"){ echo 'selected'; } ?>>Aggiornamenti</option> <option value='Server' <?php if($article['category'] == "Server"){ echo 'selected'; } ?>>Server</option> <option value='Crediti' <?php if($article['category'] == "Crediti"){ echo 'selected'; } ?>>Crediti</option> <option value='<?php echo $shortname; ?> Club' <?php if($article['category'] == "".$shortname." Club"){ echo 'selected'; } ?>><?php echo $shortname; ?> Club</option> <option value='Manutenzione' <?php if($article['category'] == "Manutenzione"){ echo 'selected'; } ?>>Manutenzione</option> <option value='Tecnica' <?php if($article['category'] == "Tecnica"){ echo 'selected'; } ?>>Tecnica</option> <option value='Inattività' <?php if($article['category'] == "Inattività"){ echo 'selected'; } ?>>Inattività</option> <option value='Website' <?php if($article['category'] == "Website"){ echo 'selected'; } ?>>Website</option> <option value='Speciali Offerte' <?php if($article['category'] == "Speciali Offerte"){ echo 'selected'; } ?>>Speciali Offerte</option> <option value='Sponsor' <?php if($article['category'] == "Sponsor"){ echo 'selected'; } ?>>Sponsor</option> <option value='Eventi & Competizioni' <?php if($article['category'] == "Sicurezza"){ echo 'selected'; } ?>>Eventi & Competizioni</option> <option value='Sicurezza' <?php if($article['category'] == "Sicurezza"){ echo 'selected'; } ?>>Sicurezza</option> <option value='Staff' <?php if($article['category'] == "Staff"){ echo 'selected'; } ?>>Staff</option> <option value='Annunci' <?php if($article['category'] == "Annunci"){ echo 'selected'; } ?>>Annunci</option> <option value='Suggerimenti' <?php if($article['category'] == "Suggerimenti"){ echo 'selected'; } ?>>Suggerimenti</option> <option value='Momo Emulator' <?php if($article['category'] == "Momo Emulator"){ echo 'selected'; } ?>>Momo Emulator</option> <option value='Altro'>Altro</option> </select>
</td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Immagine News</b><div class='graytext'><a href="/housekeeping/tools/images/index.html"><font color="red">Immagini News</font></A></div></td>
<td class='tablerow2' width='60%' valign='middle'><input type='text' name='topstory' value="<?php echo $article['topstory']; ?>" size='30' class='textinput'></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Anteprima</b><div class='graytext'>Inserire Anteprima!<br /></div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea name='short_story' cols='60' rows='5' wrap='soft' id='sub_desc' class='multitext'><?php echo stripslashes($article['short_story']); ?></textarea></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>News completa</b><div class='graytext'>Inserisci la news Intera.<br />L'HTML è Abilitato.</div></td>
<td class='tablerow2' width='60%' valign='middle'><textarea name='story' cols='60' rows='5' wrap='soft' id='sub_desc' class='multitext'><?php echo stripslashes($article['story']); ?></textarea></td>
</tr>

<tr>
<td class='tablerow1' width='40%' valign='middle'><b>Autore</b><div class='graytext'>Immettere il tuo nickname</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>
<tr><td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='Pubblica News' class='realbutton' accesskey='s'></td></tr>
</form></table></div><br />
</div><!-- / RIGHT CONTENT BLOCK -->
</td></tr>
</table>
</div><!-- / OUTERDIV -->
<div align='center'><br />
<?php
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
</div>

/news.php
<?php



$allow_guests = true;

include('core.php');
include('includes/session.php');
include('includes/news_headlines.php');

$body_id = "news";
$pageid = "4";
//$id = FilterText($_GET['id']);
//yaya

if(FilterText($_GET['id'])){
$news_id = FilterText($_GET['id']);
$main_sql = mysql_query("SELECT * FROM cms_news WHERE num = '".$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 - " . stripslashes($news['title']);
$archive = "0";
} else {
$pagename = "Articolo inesistente!";
$archive = "1";
}


} else {
$pagename = "News";
$archive = "1";
}

include('templates/community/subheader.php');
include('templates/community/header.php');

?>


<?php
function FilterNew($str, $news_id)
{
$str = str_replace("à", "à",($str));
$str = str_replace('\r\n', '', ($str));
$str = str_replace('\"', '', ($str));
$str = str_replace("è", "è",($str));
$str = str_replace("ì", "ì",($str));
$str = str_replace("ò", "ò",($str));
$str = str_replace("ù", "ù",($str));


return $str;
}
?>

<title>News di <?php echo $shortname; ?></title>

<div class="content">
<div>
<div class="c_box tabs">
<div class="heading tabs purple">
<div class="tab static">Archivio</div>
<div style="float: right;" class="tab selected" id="tab_close">×</div>
<?php
$a = mysql_query("select * from cms_news where num = (select max(num) from cms_news)")or die (mysql_error());
$b = mysql_fetch_assoc($a);
?>
<div style="float: right;" class="tab" id="tab_none" onclick="Pixel.View.Go('/news_vis.php?id=<?php echo $b['num']; ?>');">Ultima Notizia</div>
</div>
<div class="inner tabs show" id="close" style="padding: 0px;"></div>
<div class="inner tabs hide" id="news_last">Hier word aan gewerkt</div>
</div>
</div>
<div class="left">
<div class="c_box">
<div class="inner" style="font-size: 11px; word-wrap: break-word;">
<div class="heading red">Archivio</div><div class="inner" style="padding: 10px 6px;">



<?php

$a = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC limit 20")or die (mysql_error());

while($b = mysql_fetch_assoc($a)){

?>


<a rel="nofollow" class="mi" href="/news_vis.php?id=<?php echo $b['num']; ?>">
<div class="menuitem">
<?php echo $b['title']; ?><br>
<span style="font-weight: normal; font-size: 11px;"><?php echo $b['short_story']; ?></span>
</div>
</a>

<?php } ?>

</div></div> </div>
</div>
<div class="right">

<?php
include('news_piccole.php');
?>


</div>
<div style="clear: both;"></div>
</div>



</body>
</html>

<?php

include('templates/community/footer.php');

?>
<center><script type="text/javascript">
/* <=!=[=C=D=A=T=A=[ */
document.write('<s'+'cript type="text/javascript" src="http://ad.altervista.org/js.ad/size=728X90/r='+new Date().getTime()+'"><\/s'+'cript>');
/* ]=]=> */
</script>
</center>

Sostituisci il news.php con questo
PHP:
Perfavore, Entra oppure Registrati per vedere i codici!
 
Al posto degli "addslashes" qui:

$title = addslashes($_POST['title']);
$category = addslashes($_POST['category']);
$topstory = addslashes($_POST['topstory']);
$short_story = addslashes($_POST['short_story']);
$story = addslashes($_POST['story']);
$name = addslashes($_POST['author']);

Prova a mettere stripslashes, dopodiché cancella la news e creala di nuovo.

@BoyFederico1