tienviet đã viết:zzconmaizz đã viết:Hic, em gửi file theme lên đây bác xem hộ em chèn vào chỗ nào, tìm sáng mắt mà hok ra, bác cố gắng giúp cho kẻ yếu code này với![]()
![]()
- Mã: Chọn tất cả
/* Thể hiện toàn bộ bài viết */
/************************************************************/
function themearticle ($aid, $time, $title, $hometext, $bodytext, $notes, $story_pic, $source, $counter) {
// quangcaotrang
if (file_exists("".INCLUDE_PATH."themes/minhgiap24/QuangCaoTrang.php")) {
include("".INCLUDE_PATH."themes/minhgiap24/QuangCaoTrang.php");
} else {
echo " ";
}
// quangcaotrang
echo "<br>\n";
Opentable3();
echo"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
. "<tr>\n<td><div class=\"tieubai\" align=justify>$title</div>\n"
. "<div class=\"grey\" align=\"left\">® $time | $counter hits ®</div>\n"
. "<p class=\"articlehometext\" align=\"justify\">$story_pic$hometext\n"
. "<p class=\"indexhometext\" align=\"justify\">\n<div id=\"VietAd\">\n$bodytext\n</div><br>\n";
if($notes!="") {
echo "<br>";
echo $notes;
}
echo "<p align=\"right\"><b><font color=\"#CC0000\">$aid</font></b><font color=\"#0066CC\"> $source</font></td>\n"
. "</tr>\n"
. "</table>\n<br>\n";
}
//////////////////////////////Phan nay TIENVIET them vao/////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
function themenewsst() {
global $ThemeSel;
OpenTable();
if (file_exists("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php")) {
include("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php");
}
CloseTable();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/* Chu y : */
///////////////////////////////////////////////////////////////////////////////////////////////////
//// Neu muon dung nhu cu thi xoa toan bo doan co gach ////////////////// di nhe/////////
//// va sua o dong phia duoi nhu sau: Chuyen: themenewsst0 thành: themenewsst/////
//// Tuc la bo so 0 di///////////////////////////////////////////////////////////////////////////
function themenewsst0($title,$image,$hometext, $story_link) {
if(strlen($hometext) > 250){
$hometext = substr($hometext,0,250);
$hometext = "<div class=indexhometext>".substr($hometext,0,strrpos($hometext," "))."..."."</div>";
}
// quangcaotrang
if (file_exists("".INCLUDE_PATH."themes/minhgiap24/QuangCaoTrang.php")) {
include("".INCLUDE_PATH."themes/minhgiap24/QuangCaoTrang.php");
} else {
echo " ";
}
// quangcaotrang
echo " <br> \n";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\" align=\"top\">\n";
echo " <tr> \n";
echo " <td valign=\"top\"> \n";
echo" <TR>"
. " <TD>"
. " <TABLE style=\"BORDER-COLLAPSE: collapse\" "
. " borderColor=#bbbbbb cellSpacing=10 cellPadding=10 "
. " width=\"100%\" bgColor=#ffffff border=1>"
. " <TBODY>"
. " <TR>"
. " <TD>"
. " <TABLE cellSpacing=0 cellPadding=0 width=\"100%\">"
. " <TBODY>"
. " <TR>"
. " <TD vAlign=top width=\"50%\">"
. " <TABLE cellSpacing=0 cellPadding=0 width=\"100%\" "
. " border=0>"
. " <TBODY>"
. " <TR>"
. " <TD><B><div align=justify>$title</div></B><BR></TD></TR>"
. " <TR>"
. " <TD align=middle>"
. " <TABLE cellSpacing=3 cellPadding=0 width=250 "
. " align=left border=0>"
. " <TBODY>"
. " <TR>"
. " <TD>$image</TD></TR></TBODY></TABLE></TD></TR>"
. " <TR>"
. " <TD><div align=justify>$hometext</div></TD></TR></TBODY></TABLE></TD>"
. " <TD width=\"5%\"> </TD>"
. " <TD><IMG src=\"".INCLUDE_PATH."themes/minhgiap24/images/tinmoinhan.jpg\">";
$limit = 7; //Bao nhiêu b?n tin s? hi?n ra
$Scroll = 0;//Có cho n?i dung c?a block ch?y t? du?i lên trên hay không. 0 - không, 1 - d?ng ý
$path = "".INCLUDE_PATH."uploads/News/pic"; //Noi ch?a thu vi?n hình ?nh cho bài vi?t
/*H?t ph?n khai báo*/
global $datafold, $nvcat, $nvcat2, $prefix, $multilingual, $currentlang, $datetime, $db;
if (file_exists("".$datafold."/ncatlist.php")) {
@require_once ("".$datafold."/ncatlist.php");
}
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
echo "<tr><td valign=\"top\" >";
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td style=\"padding:5px;\" valign=\"top\">";
if ($Scroll) {
echo "<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"234\" scrollamount= \"2\" scrolldelay= \"100\" onmouseover='this.stop()' onmouseout='this.start()'>";
}
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" width=\"100%\" cellpadding=\"5\">";
$result2 = $db->sql_query("SELECT * FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 0,$limit");
while ($row2 = $db->sql_fetchrow($result2)){
$sid_st = intval($row2['sid']);
//code hero
$str_a = array('"', "'");
$str_b = array('"', "'");
$title_st = str_replace($str_a, $str_b, stripslashes(check_html($row2['title'], "nohtml")));
$hometext = str_replace($str_a, $str_b, stripslashes($row2['hometext']));
// end code
if (strlen($title_st)>90)
{
$rest = substr($title_st, 0,90);
$rest = substr($rest,0,strrpos($rest," "))."...";
}
else
{
$rest = $title_st;
}
//$cham = "...";
// Gioi han Tooltiptext
if (strlen($hometext)>250)
{
$hometext = substr($hometext, 0,250);
$hometext = substr($hometext,0,strrpos($hometext," "))."...";
}
else
{
$hometext = $hometext;
}
// Gioi han Tooltiptext
$images = $row2['images'];
if ($images != "" AND file_exists("".$path."/".$images.""))
{
// echo "<tr><td style=\"padding-bottom: 4px; border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: #c0c0c0 1px dotted\" vAlign=\"top\"><img src=\"".INCLUDE_PATH."themes/minhgiap24/images/arrow.gif\" width=\"5\" height=\"5\"> <a onmouseover=\"\" TITLE='header=[<span class=toolTipTitle>$title_st</span>] body=[<div align=justify> <img border=0 src=$path/$images width=70 border=0 align=left> $hometext</div>]' href='".INCLUDE_PATH."modules.php?name=News&op=viewst&sid=$sid_st' class=indexlink>$rest</a></td></tr>";
echo "<tr><td style=\"padding-bottom: 4px; border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: #c0c0c0 1px dotted\" vAlign=\"top\"><div align=justify><img src=\"".INCLUDE_PATH."themes/minhgiap24/images/Dot.gif\" width=\"7\" height=\"7\"><A onmouseover=\"\" TITLE='header=[<span class=toolTipTitle><div align=justify>$title_st</div></span>] body=[<table><tr><td valign=top><img border=0 src=$path/$images width=100 border=0></td><td style=padding-left:5px valign=top><span class=toolTipBody><div align=justify>$hometext</div></span>]</td></tr></table>' href=\"modules.php?name=News&op=viewst&sid=$sid_st\">$rest</A></div></td></tr>";
}
else
{
// echo "<tr><td valign=\"top\" style=\"border-bottom: 1px #C0C0C0 dotted; border-top: 0px; border-left: 0px; border-right: 0px\"><img src=\"".INCLUDE_PATH."themes/minhgiap24/images/arrow.gif\"> <a onmouseover=\"\" TITLE='header=[<span class=toolTipTitle>$title_st</span>] body=[<div align=justify>$hometext</div>]' href='".INCLUDE_PATH."modules.php?name=News&op=viewst&sid=$sid_st' class=indexlink>$rest</a></td></tr>";
echo "<tr><td style=\"padding-bottom: 4px; border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: #c0c0c0 1px dotted\" vAlign=\"top\"><div align=justify><img src=\"".INCLUDE_PATH."themes/minhgiap24/images/Dot.gif\" width=\"7\" height=\"7\"><A onmouseover=\"\" TITLE='header=[<span class=toolTipTitle><div align=justify>$title_st</div></span>] body=[<table><tr><td style=padding-left:5px valign=top><span class=toolTipBody><div align=justify>$hometext</div></span>]</td></tr></table>' href=\"modules.php?name=News&op=viewst&sid=$sid_st\">$rest</A></div></td></tr>";
}
//echo "<tr><td valign=\"top\" style=\"border-bottom: 1px #C0C0C0 dotted; border-top: 0px; border-left: 0px; border-right: 0px;\"><img src=\"".INCLUDE_PATH."themes/news/images/arrow_red.gif\"><a href=\"".INCLUDE_PATH."modules.php?name=News&op=viewst&sid=$sid_st\">$title_st</b></a></td></tr>";
}
echo "</table>";
if ($Scroll) {
echo "</marquee>";
}
echo "</td></tr></table>";
echo "</td></tr>";
echo "</table>";
echo " </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>"
."</TD></TABLE>\n";
CloseTable3();
}
Mình sửa lại cách chen đó. Nọi dung chen nằm trong:
/////////////////////
////////////////////
Sao lại có 2 lần gọi đến QuangCaoTrang.php nhỉ







