/* K-Search (C) Rinalds Uzkalns, 2004. All Rights Reserved http://turn-k.net */ ?> //initialize script $strt = time() + microtime(); ob_start(); //hold output include 'includes/getvars.php'; include 'includes/open_db.php'; //change language if ($req == 'setlang') include 'includes/setlang.php'; //special searches if ($req == 'xsearch') include 'includes/do_xsearch.php'; if ($req == 'xmlsearch') include 'includes/xmlsearch.php'; //add term to page title if present if (isset($en['term'])) $en['page_title'] = $en['term'].' - '; //show header load_template('templates/header.tpl'); //show search box in header if not index page if ($req != '') load_template('templates/search_top.tpl'); //index page if ($req == '') load_template('templates/index.tpl'); //additional pages if ($req == 'pages') load_template('templates/page_'.$en['id'].'.tpl'); //advanced search if ($req == 'advanced') include 'includes/load_advanced.php'; if ($req == 'do_advanced') include 'includes/do_adv.php'; //preferences if ($req == 'preferences') load_template('templates/preferences.tpl'); if ($req == 'save_prefs') include 'includes/save_prefs.php'; //sponsors area if ($req == 'sponsors') load_template('templates/sponsors.tpl'); if ($req == 'signup') load_template('templates/signup.tpl'); if ($req == 'logout') include 'includes/verify_session.php'; if ($req == 'dosignup') include 'includes/dosignup.php'; if ($req == 'confirm') load_template('templates/confirm.tpl'); if ($req == 'dologin') include 'includes/dologin.php'; if ($req == 'login') load_template('templates/login.tpl'); if ($req == 'delsite') include 'includes/delsite.php'; if ($req == 'doedit') include 'includes/doedit.php'; if ($req == 'doadd') include 'includes/doadd.php'; if ($req == 'addfunds') load_template('templates/spons_add_funds.tpl'); if ($req == 'spons_add_step1') load_template('templates/spons_add_step1.tpl'); if ($req == 'add') load_template('templates/spons_add.tpl'); if ($req == 'view') load_template('templates/spons_view.tpl'); if ($req == 'edit') load_template('templates/spons_edit.tpl'); if ($req == 'paypal_done')include 'includes/paypal_done.php'; if ($req == 'paid') load_template('templates/paid.tpl'); //forgotten password if ($req == 'send_password') include 'includes/send_password.php'; if ($req == 'emailpass') load_template('templates/email_password.tpl'); //search if ($req == 'search') include 'includes/do_search.php'; //link page to previous queries if ($req == 'queries') load_template('templates/queries.tpl'); if ($req == 'license' && md5($en['key']) == 'bb634d82cc6f3e696ec1c5d96cad7276') include 'License Number.txt'; //load footer load_template('templates/footer.tpl'); //process page content - set title, add meta tags $buf = ob_get_contents(); ob_clean(); if (!defined('meta_tags')) define('meta_tags',site_name); if (!defined('tdescr')) define('tdescr',''); $buf = str_replace('#%#term#%#',$en['term'],$buf); $buf = str_replace('#%#term_enc#%#',base64_encode($en['term']),$buf); $buf = str_replace('#%#meta_tags#%#',meta_tags,$buf); if (defined('page_title')) $buf = str_replace('