widnet
Banned User
Witam mam problem z php chodzi o to aby zamienic nastepujace tagi na tagi
News system test
Kolor
[size=x-large]Rozmiar[/size]
czcionka
[/PHP]
html
Problem mam z skryptem bo nie dziala nie mmogl by ktos moj skrypt dokonczyc??
Jak bys chcial szybszy kontakt prosze pisac na gg 867803
News system test
PHP:
[b]Grube[/b]
[i]pochylone[/i]
[u]podkreslenie[/u]
[align=left]do lewej[/align]
[align=center]do srodka[/align]
[align=right]do prawej[/align]
[IMG]http://layouts.4za.pl/button.png[/IMG]
[url=http://layouts.4za.pl/]Url[/url]
[[email protected]]MAail[/email]
[quote]Cytat[/quote]
[code]KOD[/code]
[php]php
[size=x-large]Rozmiar[/size]
czcionka
[/PHP]
html
Problem mam z skryptem bo nie dziala nie mmogl by ktos moj skrypt dokonczyc??
PHP:
<?php
/*------------------------------*/
define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
define("NO_ONLINE", 1);
/*------------------------------*/
include("forum/inc/init.php");
/*------------------------------*/
$forumpath = $mybb->settings['bburl'];
require_once MYBB_ROOT."/inc/class_parser.php";
$parser = new postParser();
/*------------------------------*/
$connect = @mysql_connect("localhost", "adrian", "noe interesoj sie") or die ("Brak łączności z serwerem.");
mysql_query('SET CHARSET utf8');
mysql_select_db("adrian_forum") or die ("Brak łączności z Bazą Danych.");
$show_news = ("SELECT tid, replyto, fid, subject, uid, username, dateline, message, visible FROM posts WHERE (fid = '3') AND (replyto = '0') ORDER BY tid DESC LIMIT 0,4");
$show_news_query = mysql_query($show_news) or die("Błąd w zapytaniu nr 1");
while($news = mysql_fetch_array($show_news_query))
{
$subjectOLD = $news[subject];
$subiect = str_replace('[align=center]', '<center>', $subjectOLD);
$subject = $news[subject];
str_replace('[align=center]', '<center>', $subject);
$message = $news[message];
str_replace('[align=center]', '<center>', $message);
$date_day = date("j", $news[dateline]);
$date_mounth = date("m", $news[dateline]);
$date_year = date("Y", $news[dateline]);
$time = date("H:i", $news['dateline']);
switch ($date_mounth) {
case '01': $date_mounth = 'Stycznia'; break;
case '02': $date_mounth = 'Lutego'; break;
case '03': $date_mounth = 'Marca'; break;
case '04': $date_mounth = 'Kwietnia'; break;
case '05': $date_mounth = 'Maja'; break;
case '06': $date_mounth = 'Czerwca'; break;
case '07': $date_mounth = 'Lipca'; break;
case '08': $date_mounth = 'Sierpnia'; break;
case '09': $date_mounth = 'Września'; break;
case '10': $date_mounth = 'Października'; break;
case '11': $date_mounth = 'Listopada'; break;
case '12': $date_mounth = 'Grudnia'; break;
default: $date_mounth = 'Błąd!!!'; break;
}
$main_content .= "<div class='post'>";
$main_content .= "<strong><img border='0' src='<?PHP echo $layout_name; ?>/images/newscomer.png' width='100' height='30' ALIGN=right hspace='6' vspace='7'><a href='forum/showthread.php?tid=$news[tid]'><h3>".$parser->parse_message($subject)."</h3></a></strong>";
$main_content .= "<p>".$parser->parse_message($message)."</p>";
$main_content .= "<p style='text-align:right'><small>Napisane ".$date_day." ".$date_mounth." ".$date_year." r. o godz. ".$time.", przez <a href='forum/member.php?action=profile&uid=$news[uid]'><b>".$news[username]."</b></a>.</small></p>";
$main_content .= "</div>";
}
?>