function ktz_get_AGC_single() { if (ot_get_option('ktz_agc_activated') == "yes") { $orititle = get_the_title(); $orititle = trim($orititle); $termstring = $orititle; if ($orititle != '') { echo '<div class="box-post single relpost">'; echo '<h4 class="ktz-agc-title"><span class="ktz-blocktitle">' . __('Related Search', ktz_theme_textdomain) . '</span></h4>'; echo '<ul class="ktz-agc-single">'; $googleresults = perform_google_web_search_single($termstring); if (is_array($googleresults)) { $i = 0; foreach ($googleresults as $result) { $link = urldecode(CleanFileNameBan(strip_tags($result['Oriurl']))); $i++; if ($i < 5) { echo '<li class="clearfix">'; echo '<div class="content-related">'; echo '<a title="' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '" href="' . get_search_link(CleanFileNameBan(hilangkan_spesial_karakter($result['title']))) . '">' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '</a>'; echo '</div></li>'; } } } echo '</ul>'; echo '</div>'; } } }
<?php //ktz_navigation(); ?> </nav> <?php } else { $termstring = $s; if (ot_get_option('ktz_agc_activated') == "yes") { if ($s != '') { $googleresults = perform_google_web_search($termstring); if (is_array($googleresults)) { foreach ($googleresults as $result) { $link = urldecode(CleanFileNameBan(strip_tags($result['Oriurl']))); print '<div class="box-post ktz-agc-search">'; print '<h2><a href="' . get_search_link(CleanFileNameBan(hilangkan_spesial_karakter($result['title']))) . '">' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '</a></h2>'; print '<p>' . CleanFileNameBan(hilangkan_spesial_karakter($result['abstract'])) . '</p>'; print '<p>Sumber: ' . $result['Oriurl'] . '</p>'; print '</div>'; } } } } else { //ktz_post_notfound(); } } ?> </section> </div> <?php get_sidebar(); ?>