Пример #1
0
}
$var = $_GET['val'];
$query = mysql_query("select * from note_tab WHERE sl='" . $var . "' ");
$sql = mysql_fetch_array($query);
$nt = $sql['note'];
$hd = $sql['head'];
$email = $sql['email'];
function clean_dec($text)
{
    $text = str_replace("&slcn", "\n", $text);
    $text = str_replace("&snglquot", "'", $text);
    $text = str_replace("&snglquot", "'", $text);
    return $text;
}
$hd = clean_dec($hd);
$nt = clean_dec($nt);
function clean($note)
{
    $note = str_replace("&", "&amp", $note);
    $note = str_replace("'", "&snglquot", $note);
    $note = str_replace('"', "&quot", $note);
    $note = str_replace(" ", "&nbsp", $note);
    $note = str_replace("\n", "&slcn", $note);
    $note = str_replace("<", "&lt", $note);
    return $note;
}
if ($email == $_SESSION['luser']) {
    ?>

	<div class="container">
	<form role="form" method="post" action="">
Пример #2
0
<div class="container">
<div class="col-xs-12">
<?php 
function clean_dec($text)
{
    $text = str_replace("&slcn", "<br />", $text);
    $text = str_replace("&snglquot", "'", $text);
    $text = str_replace("&snglquot", "'", $text);
    return $text;
}
include "common/database_connect.php";
$query = mysql_query("select * from note_tab WHERE email='" . $_SESSION['luser'] . "' ");
$i = 1;
while (($sql = mysql_fetch_array($query)) && $i++) {
    $hd = $sql['head'];
    $hd = clean_dec($hd);
    ?>
 <div class="<?php 
    if (!(($i - 1) % 2)) {
        echo "even";
    } else {
        echo "odd";
    }
    ?>
">
	<div class="container">
   		<div class="row">
        	<a href="show.php?val=<?php 
    echo $sql['sl'];
    ?>
">