Jump to content
Forumu Destekleyenlere Katılın ×
Paticik Forumları
2000 lerden beri faal olan, çok şukela bir paylaşım platformuyuz. Hoşgeldiniz.

Paste edin [su anki clipboardunuzu yapistirin :)]


Giovanni

Öne çıkan mesajlar


/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright � 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."search.php";

$news_per_page = 11; $posts_per_page = 20;

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if (isset($stype)) $stype = $stype;
if (isset($stext)) $stext = stripinput($stext);

if (!isset($stype)) $stype = isset($_POST['stype']) ? $_POST['stype'] : "a";
if (!isset($stext)) $stext = isset($_POST['stext']) ? $_POST['stext'] : "";

opentable($locale['400']);
echo "



".$locale['401']."
."' class='button'>

".$locale['402']."
".$locale['403']."
".$locale['404']."
".$locale['405']."
".$locale['406']."
".$locale['407']."

n";
closetable();

if ($stext != "" && strlen($stext) >= "3") {
tablebreak();
opentable($locale['409']);
if ($stype == "a") {
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." AND (article_subject LIKE '%$stext%' || article_article LIKE '%$stext%')"
);
$rows = dbrows($result);
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['410'] : $locale['411']).$locale['422'].":

n";
$result = dbquery(
"SELECT ta.*,tac.*, tu.user_id,user_name FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
LEFT JOIN ".$db_prefix."users tu ON ta.article_name=tu.user_id
WHERE ".groupaccess('article_cat_access')." AND (article_subject LIKE '%$stext%' || article_article LIKE '%$stext%')
ORDER BY article_datestamp DESC LIMIT $rowstart,10"
);
while ($data = dbarray($result)) {
if (eregi($stext, $data['article_subject']) && eregi($stext, $data['article_article'])) {
$subj_c = substr_count(strtolower($data['article_subject']), strtolower($stext));
$text_c = substr_count(strtolower($data['article_article']), strtolower($stext));
echo "."'>".$data['article_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['article_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['433'].", ";
echo $text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['434']."

";
} elseif (eregi($stext, $data['article_article'])) {
$text_c = substr_count(strtolower($data['article_article']), strtolower($stext));
echo "."'>".$data['article_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['article_datestamp'])."
n";
echo "".$text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['434']."

";
} elseif (eregi($stext, $data['article_subject'])) {
$subj_c = substr_count(strtolower($data['article_subject']), strtolower($stext));
echo "."'>".$data['article_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['article_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['433']."
";
}
}
} else {
echo "
0 ".$locale['411'].$locale['422'].".
n";
}
closetable();
if ($rows > 10) echo "
n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?stype=a&stext=$stext&")."n
n";
} else if ($stype == "n") {
$rows = dbcount("(news_id)", "news", groupaccess('news_visibility')."AND (news_subject LIKE '%$stext%' || news_news LIKE '%$stext%' || news_extended LIKE '%$stext%')");
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['412'] : $locale['413']).$locale['422'].":

n";
$result = dbquery(
"SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
AND (news_end='0'||news_end>=".time().") AND (news_subject LIKE '%$stext%' || news_news LIKE '%$stext%' || news_extended LIKE '%$stext%')
ORDER BY news_datestamp DESC LIMIT $rowstart,10"
);
while ($data = dbarray($result)) {
$numrows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND news_id>='".$data['news_id']."'");
if ($numrows > $news_per_page) {
$rstart = ceil($numrows / $news_per_page);
$rstart = "?rowstart=".(($rstart-1)*$news_per_page);
} else {
$rstart = "";
}
if (eregi($stext, $data['news_subject']) && eregi($stext, $data['news_news']) && eregi($stext, $data['news_extended'])) {
$subj_c = substr_count(strtolower($data['news_subject']), strtolower($stext));
$text_c = substr_count(strtolower($data['news_news']), strtolower($stext));
$text_c2 = substr_count(strtolower($data['news_extended']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['435'].", ";
echo $text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['436'].", ";
echo $text_c2." ".($text_c2 == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['437']."

";
} elseif (eregi($stext, $data['news_subject']) && eregi($stext, $data['news_news'])) {
$subj_c = substr_count(strtolower($data['news_subject']), strtolower($stext));
$text_c = substr_count(strtolower($data['news_news']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['435'].", ";
echo $text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['436']."

";
} elseif (eregi($stext, $data['news_subject']) && eregi($stext, $data['news_extended'])) {
$subj_c = substr_count(strtolower($data['news_subject']), strtolower($stext));
$text_c = substr_count(strtolower($data['news_extended']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['435'].", ";
echo $text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['437']."

";
} elseif (eregi($stext, $data['news_news']) && eregi($stext, $data['news_extended'])) {
$text_c = substr_count(strtolower($data['news_news']), strtolower($stext));
$text_c2 = substr_count(strtolower($data['news_extended']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['436'].", ";
echo $text_c2." ".($text_c2 == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['437']."

";
} elseif (eregi($stext, $data['news_news'])) {
$text_c = substr_count(strtolower($data['news_news']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['436']."

";
} elseif (eregi($stext, $data['news_extended'])) {
$text_c = substr_count(strtolower($data['news_extended']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['437']."

";
} elseif (eregi($stext, $data['news_subject'])) {
$subj_c = substr_count(strtolower($data['news_subject']), strtolower($stext));
echo "."'>".$data['news_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['news_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['437']."

";
}
}
} else {
echo "
0 ".$locale['413'].$locale['422'].".
n";
}
closetable();
if ($rows > 10) echo "
n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?stype=n&stext=$stext&")."n
n";
} elseif ($stype == "f") {
$result = dbquery(
"SELECT tp.*, tf.* FROM ".$db_prefix."posts tp
INNER JOIN ".$db_prefix."forums tf USING(forum_id)
WHERE ".groupaccess('forum_access')." AND (post_subject LIKE '%$stext%' || post_message LIKE '%$stext%')"
);
$rows = dbrows($result);
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['414'] : $locale['415']).$locale['422'].":

n";
$result = dbquery(
"SELECT tp.*, tf.*, tu.user_id,user_name FROM ".$db_prefix."posts tp
INNER JOIN ".$db_prefix."forums tf USING(forum_id)
INNER JOIN ".$db_prefix."users tu ON tp.post_author=tu.user_id
WHERE ".groupaccess('forum_access')." AND (post_subject LIKE '%$stext%' || post_message LIKE '%$stext%')
ORDER BY post_datestamp DESC LIMIT $rowstart,10"
);
while ($data = dbarray($result)) {
if (eregi($stext, $data['post_subject']) && eregi($stext, $data['post_message'])) {
$subj_c = substr_count(strtolower($data['post_subject']), strtolower($stext));
$text_c = substr_count(strtolower($data['post_message']), strtolower($stext));
echo "."&thread_id=".$data['thread_id']."&pid=".$data['post_id']."#post_".$data['post_id']."'>".$data['post_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['post_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['438'].", ";
echo $text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['439']."

";
} elseif (eregi($stext, $data['post_message'])) {
$text_c = substr_count(strtolower($data['post_message']), strtolower($stext));
echo "."&thread_id=".$data['thread_id']."&pid=".$data['post_id']."#post_".$data['post_id']."'>".$data['post_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['post_datestamp'])."
n";
echo "".$text_c." ".($text_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['439']."

";
} elseif (eregi($stext, $data['post_subject'])) {
$subj_c = substr_count(strtolower($data['post_subject']), strtolower($stext));
echo "."&thread_id=".$data['thread_id']."&pid=".$data['post_id']."#post_".$data['post_id']."'>".$data['post_subject']."
n";
echo "".$locale['040']."."'>".$data['user_name']."n";
echo $locale['041'].showdate("longdate", $data['post_datestamp'])."
n";
echo "".$subj_c." ".($subj_c == 1 ? $locale['430'] : $locale['431']).$locale['432'].$locale['438']."

";
}
}
} else {
echo "
0 ".$locale['415'].$locale['422'].".
n";
}
closetable();
if ($rows > 10) echo "
n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?stype=f&stext=$stext&")."n
n";
} elseif ($stype == "d") {
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." AND (download_title LIKE '%$stext%' || download_description LIKE '%$stext%')"
);
$rows = dbrows($result);
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['416'] : $locale['417']).$locale['422'].":

n";
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." AND (download_title LIKE '%$stext%' || download_description LIKE '%$stext%')
ORDER BY download_title LIMIT $rowstart,10"
);
$i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " ".$locale['450']."";
} else {
$new = "";
}
echo "."&download_id=".$data['download_id']."' target='_blank'>".$data['download_title']." - ".$data['download_filesize']." $new
n";
if ($data['download_description'] != "") echo stripslashes($data['download_description'])."
n";
echo "".$locale['451']." ".$data['download_license']." |
".$locale['452']." ".$data['download_os']." |
".$locale['453']." ".$data['download_version']."

".$locale['454']." ".showdate("%d.%m.%y", $data['download_datestamp'])." |
".$locale['455']." ".$data['download_count']."n";
if ($i != $numrows) { echo "

n"; } else { echo "n"; }
$i++;
}
} else {
echo "
0 ".$locale['417'].$locale['422'].".
n";
}
closetable();
if ($rows > 10) echo "
n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?stype=d&stext=$stext&")."n
n";
} elseif ($stype == "w") {
$result = dbquery(
"SELECT tw.*,twc.* FROM ".$db_prefix."weblinks tw
INNER JOIN ".$db_prefix."weblink_cats twc ON tw.weblink_cat=twc.weblink_cat_id
WHERE ".groupaccess('weblink_cat_access')." AND (weblink_name LIKE '%$stext%' || weblink_description LIKE '%$stext%')"
);
$rows = dbrows($result);
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['418'] : $locale['419']).$locale['422'].":

n";
$result = dbquery(
"SELECT tw.*,twc.* FROM ".$db_prefix."weblinks tw
INNER JOIN ".$db_prefix."weblink_cats twc ON tw.weblink_cat=twc.weblink_cat_id
WHERE ".groupaccess('weblink_cat_access')." AND (weblink_name LIKE '%$stext%' || weblink_description LIKE '%$stext%')
ORDER BY weblink_name LIMIT $rowstart,10"
);
$i = 1;
while ($data = dbarray($result)) {
if ($data['weblink_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " ".$locale['450']."";
} else {
$new = "";
}
echo "."&weblink_id=".$data['weblink_id']."' target='_blank'>".$data['weblink_name']."$new
n";
if ($data['weblink_description'] != "") echo $data['weblink_description']."
n";
echo "".$locale['451']." ".showdate("%d.%m.%y", $data['weblink_datestamp'])." |
".$locale['456']." ".$data['weblink_count']."";
echo ($i != $numrows ? "

n" : "n"); $i++;
}
} else {
echo "
0 ".$locale['419'].$locale['422'].".
n";
}
closetable();
if ($rows > 10) echo "
n".makePageNav($rowstart,10,$rows,3,FUSION_SELF."?stype=w&stext=$stext&")."n
n";
} elseif ($stype == "m") {
$rows = dbcount("(user_id)", "users", "user_name LIKE '%$stext%'");
if ($rows != 0) {
echo $rows." ".($rows == 1 ? $locale['420'] : $locale['421']).$locale['422'].":

n";
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name LIKE '%$stext%' ORDER BY user_name");
while ($data = dbarray($result)) {
echo "."'>".$data['user_name']."
n";
}
} else {
echo "
0 ".$locale['421'].$locale['422'].".
n";
}
closetable();
}
}

require_once "side_right.php";
require_once "footer.php";
?>

Link to comment
Sosyal ağlarda paylaş

×
×
  • Yeni Oluştur...