$fn) { if (!isset($events[$name])) $events[$name] = array(); $events[$name][] = $fn; } } } } closedir($handle); } $db = mysqli_connect($mysql_server, $mysql_username, $mysql_password); if (!$db) { die('Failed to connect to database server!
'.mysqli_error($db)); } mysqli_select_db($db, $mysql_database) or die('Failed to select database
'.mysqli_error($db)); $id = isset($_REQUEST['page']) ? mysqli_real_escape_string($db, $_REQUEST['page']) : ''; $query = isset($_REQUEST['query']) ? $_REQUEST['query'] : ''; if (!empty($query)) { if (!get_magic_quotes_gpc()) { $query = addslashes($query); } $words = preg_split('/\s+/', $query); foreach ($words as $word) { $word = preg_replace('/\W/', '', $word); if (strlen($word) > 1) { $terms[] = $word; } } if ($terms) { if (count($terms) > 4) { array_splice($terms, 4); } $sql = "SELECT p.id, p.name, p.content FROM " . $mysql_table . "PAGES p, " . $mysql_table . "SEARCH_WORDS w, " . $mysql_table . "SEARCH_WORDMATCH m WHERE("; $where = "w.word LIKE '%" . array_shift($terms) . "%'"; while ($term = array_shift($terms)) { $where .= " OR w.word LIKE '%" . $term . "%'"; } $sql .= $where . ") AND m.word_id = w.id AND m.page_id = p.id GROUP BY p.id ORDER BY p.last_update_date DESC"; $result = mysqli_query($db, $sql) or die(mysqli_error($db)); if ($aantal = mysqli_num_rows($result)) { $cms_content .= "
    \n"; while ($data = mysqli_fetch_array($result)) { $cms_content .= "
  1. " . $data['name'] . "
    "; $contents = substr(strip_tags($data['content']), 0, 200); if (strlen($contents) > 199) { $contents .= "..."; } $cms_content .= $contents; $cms_content .= "
  2. \n"; } $cms_content .= "
\n"; } else { $cms_content = $cms_no_results; } } else { $cms_content = $cms_no_results; } } else { if (!empty($id)) { if (is_numeric($id)) { $sql = "SELECT * FROM " . $mysql_table . "PAGES WHERE id = '$id'"; } else { $sql = "SELECT * FROM " . $mysql_table . "PAGES WHERE seo_friendly_url = '$id'"; } } else { $sql = "SELECT * FROM " . $mysql_table . "PAGES WHERE home = 1"; } $result = mysqli_query($db, $sql); if ($result) { if ($data = mysqli_fetch_array($result)) { $cms_content = ''; $cms_page_id = $data['id']; fireEvent('onBeforeContent', $data['id']); if (!empty($data['url'])) { $cms_content .= "\n"; } else { $cms_content .= $data['content']; } fireEvent('onAfterContent', $data['id']); fireEvent('onOverwriteContent', $data['id']); } if (empty($label)) { if (!empty($cms_page_id)) { if (is_numeric($cms_page_id)) { $sql = "UPDATE " . $mysql_table . "PAGES SET views=views+1 WHERE id = '$cms_page_id'"; } else { $sql = "UPDATE " . $mysql_table . "PAGES SET views=views+1 WHERE seo_friendly_url = '$cms_page_id'"; } } else { $sql = "UPDATE " . $mysql_table . "PAGES SET views=views+1 WHERE home = 1"; } mysqli_query($db, $sql); } } } mysqli_close($db); ?> Web Netkol
 

Zapraszamy do zapoznania się z naszą ofertą !

Sprawdź ofertę

Portfolio

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
 
 
 
 

Services

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.
 

Heading 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio.
 

Heading 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio.
 

Heading 3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio.

Reviews

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Pra
esent libero. Sed cursus ante dapibus diam. Sed nisi.

Tim C.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Pra
esent libero. Sed cursus ante dapibus diam. Sed nisi.

Phil S.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Pra
esent libero. Sed cursus ante dapibus diam. Sed nisi.

Craig F.

Join Our Newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi.