One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
sam
/
public_html
/
go
/
news
/
View File Name :
search.php
<?php /* ||========================================================== || Fusion News 3.x ||---------------------------------------------------------- || File Version : $Id: search.php 209 2008-02-19 13:32:32Z xycaleth $ || Contact : xycaleth@gmail.com || Copyright: : (c) 2006 - 2008, FusionNews.net || License Info : http://www.gnu.org/copyleft/gpl.html ||========================================================== */ if ( !defined ('FNEWS_ROOT_PATH') ) { define ('FNEWS_ROOT_PATH', str_replace ('\\', '/', dirname (__FILE__)) . '/'); include_once FNEWS_ROOT_PATH . 'common.php'; } ob_start(); echo get_template ("header.php", TRUE); $action = ( isset ($VARS['fn_action']) ) ? true : false; if ( !$action ) { $category_list = build_categories_list (NULL, NULL, 0); $author_list = '<select name="fn_search_author[]" id="fn_search_author" multiple="multiple" size="4">'; $file = file (FNEWS_ROOT_PATH . 'users.php'); array_shift ($file); foreach ( $file as $user ) { list ($user, $nick) = explode ('|<|', $user); $author_list .= '<option value="' . $user . '">' . $nick . '</option>'; } $author_list .= '</select>'; echo <<< html <form method="post" action="{$_SERVER['REQUEST_URI']}"> <input type="hidden" name="fn_action" value="1" /> <table style="width:75%"> <tr> <td><label for="fn_search_keywords">$srch1</label></td> <td><input type="text" name="fn_search_keywords" id="fn_search_keywords" size="20" /></td> </tr> <tr> <td valign="top"><label for="fn_search_author">$srch0</label></td> <td>$author_list</td> </tr> <tr> <td valign="top"><label for="category">$srch2</label></td> <td> $category_list </td> </tr> <tr> <td valign="top"><label for="fn_search_from_num">$srch3</label></td> <td> <input type="checkbox" name="fn_search_all" checked="checked" onclick="javascript:updateFields(this.checked, this.form);" value="1" /> $srch4<br /> <input type="text" name="fn_search_from_num" id="fn_search_from_num" disabled="disabled" maxlength="3" size="3" /> <select name="fn_search_from_type" disabled="disabled"><option value="0">$srch5</option><option value="1">$srch6</option><option value="2">$srch7</option></select> </td> </tr> <tr> <td colspan="2" style="text-align:center"><input type="submit" value="$srch8" /> <input type="reset" value="$ind16" /></td> </tr> </table> </form> <script type="text/javascript"> // <![CDATA[ function updateFields ( checked, form_object ) { form_object.fn_search_from_num.disabled = checked; form_object.fn_search_from_type.disabled = checked; } // ]]> </script> html; } else { $authors = ( isset ($_POST['fn_search_author']) ) ? $_POST['fn_search_author'] : array(); $keywords = ( isset ($_POST['fn_search_keywords']) ) ? $_POST['fn_search_keywords'] : ''; $categories = ( isset ($_POST['category']) ) ? $_POST['category'] : array(); $search_all = isset ($_POST['fn_search_all']); $from_num = ( isset ($_POST['fn_search_from_num']) ) ? intval ($_POST['fn_search_from_num']) : 0; $from_type = ( isset ($_POST['fn_search_from_type']) ) ? intval ($_POST['fn_search_from_type']) : 0; if ( empty ($author) && empty ($keywords) ) { echo $srch9; } else if ( !$search_all && $from_num <= 0 ) { echo $srch10; } else { $end = false; if ( strlen ($keywords) > 0 ) { $keywords = explode (' ', $keywords); foreach ( $keywords as $key => $keyword ) { if ( strlen ($keyword) < 3 ) { $end = true; break; } else { $keywords[$key] = preg_quote ($keywords[$key], '#-'); } } } if ( $end ) { echo $srch11; } else { $time_displacement = 0; if ( !$search_all ) { $time_displacement = $from_num * 3600 * 24; switch ( $from_type ) { case 0: // days default: // already calculated as days break; case 1: // weeks $time_displacement *= 7; break; case 2: // months $time_displacement *= 4; break; } } $time_displacement = $time_displacement < 0 ? 0 : $time_displacement; $search_after = $time_displacement == 0 ? 0 : time() - $time_displacement; $regex = ''; if ( is_array ($keywords) ) { $keywords = implode ('|', $keywords); $regex = '#(^|\W)(' . $keywords . ')($|\W)#i'; } $file = file (FNEWS_ROOT_PATH . 'news/toc.php'); array_shift ($file); $count = 0; $num_authors = sizeof ($authors); $num_categories = sizeof ($categories); $news_tmpl = get_template ('news_temp.php', false); foreach ( $file as $toc_line ) { list ($news_id, $news_date, $news_writer, $news_subject, $news_categories) = explode ('|<|', $toc_line); if ( file_exists (FNEWS_ROOT_PATH . 'news/news.' . $news_id . '.php') ) { $result = 0; $news_file = file (FNEWS_ROOT_PATH . 'news/news.' . $news_id . '.php'); list ($news_short, $news_full, $news_writer, $news_subject, $news_description, $news_categories, $news_date, $news_comment_count, $news_id) = explode ('|<|', $news_file[1]); // Check if current post is: // - Included in the list of categories selected // - After the requested date // - Created by the correct author if ( (($num_categories > 0 && sizeof (array_intersect ($categories, explode (',', $news_categories))) > 0) || $num_categories <= 0) && ($search_all || (!$search_all && $news_date > $search_after)) && (($num_authors > 0 && in_array ($news_writer, $authors)) || $num_authors <= 0) ) { if ( !empty ($regex) ) { if ( preg_match_all ($regex, $news_short, $m) ) { $result |= (1 << 0); } if ( preg_match_all ($regex, $news_full, $n) ) { $result |= (1 << 1); } if ( preg_match_all ($regex, $news_subject, $o) ) { $result |= (1 << 2); } if ( preg_match_all ($regex, $news_description, $p) ) { $result |= (1 << 3); } } if ( $result > 0 ) { $count++; $news_info = parse_news_to_view ($news_file[1]); if ( $result & (1 << 0) ) { foreach ( $m[2] as $text ) { $news_info['news'] = str_replace ($text, '<span style="background-color:yellow;color:red">' . $text . '</span>', $news_info['news']); } } if ( $result & (1 << 1) ) { foreach ( $n[2] as $text ) { $news_info['fullnews'] = str_replace ($text, '<span style="background-color:yellow;color:red">' . $text . '</span>', $news_info['fullnews']); } } if ( $result & (1 << 2) ) { foreach ( $o[2] as $text ) { $news_info['subject'] = str_replace ($text, '<span style="background-color:yellow;color:red">' . $text . '</span>', $news_info['subject']); } } if ( $result & (1 << 3) ) { foreach ( $p[2] as $text ) { $news_info['description'] = str_replace ($text, '<span style="background-color:yellow;color:red">' . $text . '</span>', $news_info['description']); } } $news_display = str_replace ('{post_id}', $news_id, $news_tmpl); $news_display = str_replace ('{subject}', '<a id="fus_' . $news_id . '"></a>' . $news_info['subject'], $news_display); $news_display = str_replace ('{description}', $news_info['description'], $news_display); $news_display = str_replace ('{user}', $news_info['writer'], $news_display); $news_display = str_replace ('{date}', $news_info['date'], $news_display); $news_display = str_replace ('{icon}', $news_info['icon'], $news_display); $news_display = str_replace ('{send}', $news_info['link_tell_friend'], $news_display); $news_display = str_replace ('{nrc}', $news_info['nrc'], $news_display); $news_display = str_replace ('{comments}', $news_info['link_comments'], $news_display); $news_display = str_replace ('{cat_id}', $news_info['cat_id'], $news_display); $news_display = str_replace ('{cat_name}', $news_info['cat_name'], $news_display); $news_display = str_replace ('{cat_icon}', $news_info['cat_icon'], $news_display); $news_display = str_replace ('{news}', $news_info['news'] . '<p>' . $news_info['fullnews'] . '</p>', $news_display); $news_display = str_replace ('{fullstory}', '', $news_display); echo $news_display; } } } } if ( $count <= 0 ) { echo $srch12; } } } } echo get_template ("footer.php", TRUE); ?>