/r/n New Problem

Status
Not open for further replies.

Kristopher

Photographer
Dec 25, 2010
803
68
Here's my test news

Code:
TEST
\r\n
 
\r\n
 
\r\n
 
\r\n
TEST
\r\n
 
\r\n
 
\r\n
TEST
\r\n
 
\r\n
 
\r\n
TEST
What's wrong: when my staff or I press enter to start a new paragraph on our news it always has /r/n on every enter or w.e..
It's really annoying my staff member's cause it makes their new's look like shit.. Anyway how to fix.. besides going into my db n removing myself..
 

brsy

nah mang
May 12, 2011
1,530
272
Most likely something you edited in a file in the housekeeping. If you mind telling me, what CMS are you using? Also, what is your hotel link?
 

brsy

nah mang
May 12, 2011
1,530
272
...
\r and \n are escape sequences in programming.
He means.... When he publishes the article it looks like this:
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text, about to do new paragraph:

/r/n text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
 

Spartak

Member
Sep 24, 2011
225
33
PHP:
        <?php
 
if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 6)
{
    if(isset($_GET["done"]))
    {
        $get = filter($_GET["done"]);
        if($get == true)
        {
            echo '<h3>Article Ajouter.</h3>';
            exit;
        }
    }
    if(isset($_POST["step1"]))
    {
        if($_POST["title"] == NULL || $_POST["shortstory"] == NULL || $_POST["longstory"] == NULL)
        {
            echo "<h2>Merci de remplire toutes les cases!</h2>";
        }
        else
        {
            $_SESSION["title"] = filter($_POST["title"]);
            $_SESSION["shortstory"] = filter($_POST["shortstory"]);
            $_SESSION["longstory"] = mysql_real_escape_string($_POST["longstory"]);
         
            header("Location: ".$_CONFIG['hotel']['url']."/ase/news2");
            exit;
        }
         
    }
    else
    { ?>

Change your by mine. if work "thank's" me
 

Spartak

Member
Sep 24, 2011
225
33
Exploit free? cuz i cant be adding exploits..

still the same
Soz it was in "news2.php"

PHP:
<?php
 
if(!isset($_SESSION["longstory"]))
{
    header("Location: ".$_CONFIG['hotel']['url']."/ase/news");
    exit;
}
 
if(isset($_POST["proceed"]))
{
    $author = mysql_result(mysql_query("SELECT username FROM users WHERE id = '".$_SESSION['user']['id']."' LIMIT 1"), 0);
    mysql_query("INSERT INTO cms_news (title,shortstory,longstory,published,image,author, campaign, campaignimg) VALUES ('" . filter($_SESSION["title"]) . "', '" . filter($_SESSION["shortstory"]) . "', '" . $_SESSION["longstory"] . "', '" . time() . "', '" . filter($_POST["topstory"]) . "', '" . filter($author) . "', 0, 'default')") or die(mysql_error());
    unset($_SESSION["title"], $_SESSION["shortstory"], $_SESSION["longstory"]);
    header("Location: ".$_CONFIG['hotel']['url']."/ase/");
    exit;
}
    echo '<center><b>Il est temps de choisir une image. choisir une image, et cliquer sur "Voir"';
    echo '<form method="post">';
    echo '<br />';
    echo '<select name="topstory" id="topstory" style="font-size: 14px;"';
   
    if ($handle = opendir('ts/'))
    {   
        while (false !== ($file = readdir($handle)))
        {
            if ($file == '.' || $file == '..')
            {
                continue;
            }   
   
            echo '<option value="' . $file . '"';
   
            if (isset($_POST['topstory']) && $_POST['topstory'] == $file)
            {
                echo ' selected';
            }
           
            echo '>' . $file . '</option>';
        }
    }
 
    echo '</select>';
   
    if(isset($_POST["check"]))
    {
        echo '<br /> <br /> <input type="submit" value="  Voir  " name="check" /> <br /><br />';
        echo '<font size="3">Topstory image<br /></font><img src="ts/' . $_POST["topstory"] . '" align="right />';
        echo '</center> <align="right"> <br /> <br /> <input type="submit" value="  Etape suivante  " name="proceed" /> <br />';
        echo '</form>';
    }
    else
    {
        echo '<br /> <br /> <input type="submit" value="  Voir  " name="check" /> <br />';
        echo "</form>";
    }
 
?>
 
Status
Not open for further replies.

Users who are viewing this thread

Top