Witam używam skryptu księgi gości - mbook. Problem mam taki że chciałbym by wpisy były wyswietlane w sposob następujacy:
data
tekst
podpis
czyli jedno pod drugim niestety w oryginalne wstawiana jest pusta linia miedzy kazdym z elementow a nie mam pojecia jak ja usunac ;/ ktos wie moze jak? błagam o pomoc - oto treść:
book.php
<?php
// TABLICA ZNAKÓW EMOTIKON I ZAMIENNIKÓW
$emots_img[0] = 'smile.gif';
$emots_txt[0] = ':)';
$emots_img[1] = 'wink.gif';
$emots_txt[1] = ';)';
$emots_img[2] = 'tongue.gif';
$emots_txt[2] = '
'; $emots_img[3] = 'sad.gif';
$emots_txt[3] = ':(';
$emots_img[4] = 'happy.gif';
$emots_txt[4] = '
'; $emots_img[5] = 'cool.gif';
$emots_txt[5] = '8)';
$emots_img[6] = 'ohmy.gif';
$emots_txt[6] = '
'; $emots_img[7] = 'mellow.gif';
$emots_txt[7] = ':|';
$emots_img[8] = 'mad.gif';
$emots_txt[8] = ':?';
$emots_img[9] = 'bad.gif';
$emots_txt[9] = ';[';
// OBRÓBKA DANYCH EMOTIKON ;)
foreach($emots_img as $n=>$dat)
{
$emoty_zamienniki[$n] = '<img src="'.$book[katalog].$book[katalog_emotikon].$dat.'" alt="" />';
}
$emoty_znaki = $emots_txt;
if($_GET[f]!='login' && $_GET[f]!='edit' && $_GET[f]!='delete' && $book[pokaz] == 1) {
$min_num = (intval($_GET[num
])*$book[wpisow_na_stronie
])-($book[wpisow_na_stronie
]-1
); $max_num = intval($_GET[num
])*$book[wpisow_na_stronie
]; $id = 0;
$id2 = 0;
$pages = 1;
foreach($dane as $linia)
{
$idki = explode($book[separator
], $linia); {
$id++;
$id2++;
if($min_num<=$id && $id<=$max_num && $idki[0]!='')
if($id2>$book[wpisow_na_stronie])
{
$id2=1;
$pages++;
}
}
}
echo'<span class="lista"><a href="'.act
().xget
().'num=1">«</a>'; $n = 1;
while($n<=$pages)
{
if($n!=$_GET[num])
echo'<a href="'.act
().xget
().'num='.$n.'">'.$n.'</a>'; else
echo'<span class="actual">'.$n.'</span>'; $n++;
}
$n--;
echo'<a href="'.act
().xget
().'num='.$n.'">»</a></span> <span class="lista">Wpisów: '.$id.'</span>';
foreach($dane_red as $linia)
if($linia!='')
{
$dana = explode($book[separator
], $linia); {
if($book[emotikony]==1)
$dana[5
] = str_replace($emoty_znaki, $emoty_zamienniki, $dana[5
]); <div class="wpis">';
if($book[numerowanie_wpisow]==1)
echo'<span class="numer">'.$dana[0].'</span>'; echo'<span class="data">'.date($book[format_daty
], $dana[1]).'</span>'; if($book[logged] == true)
echo'<span class="admin"><a href="'.act
().xget
().'f=edit&id='.$dana[0].'&ref='.ref
().'">[Edytuj]</a> <a href="'.act().xget().'f=delete&id='.$dana[0].'&ref='.ref().'">[Usuń]</a></span>';
<p class="tresc">'.$dana[5].'</p>
<span class="podpis">'.$dana[2];
if($book[logged] == true)
echo' [IP: '.$dana[6].' ]'; if($dana[3]!='' && $book[dodaj_mail] == 1)
echo' <a href="mailto:'.$dana[3].'">[mail]</a>'; if($dana[4]!='' && $book[dodaj_www] == 1)
echo' <a target="_'.$book[cel_linkow
].'" href="'.$dana[4].'">[www]</a>'; </span></div>';
}
}
}
?>
kernel.php
<?php
include'config.php';
$book[pokaz] = 1;
foreach($_POST as $index => $content)
if($_SESSION[book_logged] == true)
$book[logged] = true;
if($_GET['num'] == '' || $_GET['num'] == '0')
$_GET['num'] = 1;
if(!strpos($_SERVER[REQUEST_URI
], 'script.php')) { if(touch($book[katalog
].$book[plik
])){} }
function ref() {
$uri = str_replace('&', '|amp|', $_SERVER[HTTP_HOST
].$_SERVER[REQUEST_URI
]); return $uri ;
}
function deref($uri) {
$url = 'http://'.$uri;
return $url;
}
function act() {
$uri = explode('/', $_SERVER['REQUEST_URI']); $uri = $uri[count($uri)-1
]; return $uri;
}
function xget() {
if(strpos($_SERVER[REQUEST_URI
], '?')) $tag = '&';
else
$tag = '?';
return $tag;
}
function clear($ent) {
return $ent;
}
?>
stad mozna zassac:
http://marcim.info/mbook/mar_bookv.2.0.rar prosze pomóżcie