db->VARS['base_url']; $GB_PG['index'] = $gb->db->VARS['laz_url'].'&op=modload&file=index'; $GB_PG['admin'] = $gb->db->VARS['base_url'].'/admin.php'; $GB_PG['comment'] = $gb->db->VARS['laz_url'].'&op=modload&file=index&agbook=comment'; $GB_PG['addentry'] = $gb->db->VARS['laz_url'].'&op=modload&file=index&agbook=addentry'; $entry = (isset($_GET['entry'])) ? $_GET['entry'] : 0; $entry = (isset($_POST['entry'])) ? $_POST['entry'] : $entry; $entry = (intval($entry) < 0) ? 0 : intval($entry); $gb->searchfield = (isset($_GET['searchfield'])) ? trim($_GET['searchfield']) : ''; $gb->searchtext = (isset($_GET['searchtext'])) ? trim(urldecode($_GET['searchtext'])) : ''; $gb->searchfield = (isset($_POST['searchfield'])) ? trim($_POST['searchfield']) : $gb->searchfield; $gb->searchtext = (isset($_POST['searchtext'])) ? trim(urldecode($_POST['searchtext'])) : $gb->searchtext; echo $gb->show_entries($entry); $gb->db->close_db(); } switch ($agbook) { case 'comment': include_once LAZ_INCLUDE_PATH.'/lib/vars.class.php'; include_once LAZ_INCLUDE_PATH.'/lib/comment.class.php'; $gb_com = new gb_comment(LAZ_INCLUDE_PATH); if ($gb_com->db->VARS['disablecomments'] > 0) { display_entries(); break; } $GB_PG['base_url'] = $gb_com->db->VARS['base_url']; $GB_PG['index'] = $gb_com->db->VARS['laz_url'].'&op=modload&file=index'; $GB_PG['admin'] = $gb_com->db->VARS['base_url'].'/admin.php'; $GB_PG['comment'] = $gb_com->db->VARS['laz_url'].'&op=modload&file=index&agbook=comment'; $GB_PG['addentry'] = $gb_com->db->VARS['laz_url'].'&op=modload&file=index&agbook=addentry'; $antispam = $gb_com->db->VARS['antispam_word']; $gb_com->id = (isset($_GET['gb_id'])) ? $_GET['gb_id'] : ''; $gb_com->id = (isset($_POST['gb_id'])) ? $_POST['gb_id'] : $gb_com->id; $gb_com->id = intval($gb_com->id); $gb_com->comment = (isset($_POST['gb_comment'])) ? $_POST['gb_comment'] : ''; $gb_com->timehash = (isset($_POST['gb_timehash'])) ? $_POST['gb_timehash'] : ''; $gb_com->bottest = (isset($_POST['gb_bottest'])) ? $_POST['gb_bottest'] : ''; $gb_com->user = (isset($_POST['gb_user'])) ? $_POST['gb_user'] : ''; $gb_com->pass_comment = (isset($_POST['pass_comment'])) ? $_POST['pass_comment'] : ''; $gb_action = (isset($_POST['gb_action'.$antispam])) ? $_POST['gb_action'.$antispam] : ''; $gb_com->comment_action($gb_action); $gb_com->db->close_db(); break; case 'addentry': include_once LAZ_INCLUDE_PATH.'/lib/vars.class.php'; include_once LAZ_INCLUDE_PATH.'/lib/add.class.php'; $gb_post = new addentry(LAZ_INCLUDE_PATH); $GB_PG['base_url'] = $gb_post->db->VARS['base_url']; $GB_PG['index'] = $gb_post->db->VARS['laz_url'].'&op=modload&file=index'; $GB_PG['admin'] = $gb_post->db->VARS['base_url'].'/admin.php'; $GB_PG['comment'] = $gb_post->db->VARS['laz_url'].'&op=modload&file=index&agbook=comment'; $GB_PG['addentry'] = $gb_post->db->VARS['laz_url'].'&op=modload&file=index&agbook=addentry'; $antispam = $gb_post->db->VARS['antispam_word']; if (isset($_POST['agb_submit_'.$antispam]) || isset($_POST['agb_preview_'.$antispam])) { $gb_post->name = (isset($_POST['gb_name'])) ? $_POST['gb_name'] : ''; $gb_post->email = (isset($_POST['gb_email'])) ? $_POST['gb_email'] : ''; $gb_post->url = (isset($_POST['gb_url'])) ? $_POST['gb_url'] : ''; $gb_post->comment = (isset($_POST['gb_comment'])) ? $_POST['gb_comment'] : ''; $gb_post->location = (isset($_POST['gb_location'])) ? $_POST['gb_location'] : ''; $gb_post->icq = (isset($_POST['gb_icq'])) ? $_POST['gb_icq'] : ''; $gb_post->aim = (isset($_POST['gb_aim'])) ? $_POST['gb_aim'] : ''; $gb_post->msn = (isset($_POST['gb_msn'])) ? $_POST['gb_msn'] : ''; $gb_post->yahoo = (isset($_POST['gb_yahoo'])) ? $_POST['gb_yahoo'] : ''; $gb_post->skype = (isset($_POST['gb_skype'])) ? $_POST['gb_skype'] : ''; $gb_post->timehash = (isset($_POST['gb_timehash'])) ? $_POST['gb_timehash'] : ''; $gb_post->bottest = (isset($_POST['gb_bottest'])) ? $_POST['gb_bottest'] : ''; $gb_post->gender = (isset($_POST['gb_gender'])) ? $_POST['gb_gender'] : ''; $gb_post->keep_pic = (isset($_POST['keep_pic'])) ? 1 : 0; $gb_post->userfile = (isset($_FILES['userfile']['tmp_name']) && $_FILES['userfile']['tmp_name'] != "") ? $_FILES : ''; $gb_post->user_img = ((isset($_POST['gb_user_img'])) && ($gb_post->keep_pic == 1) && (empty($gb_post->userfile))) ? $_POST['gb_user_img'] : ''; $gb_post->preview = (isset($_POST['gb_preview'])) ? 1 : 0; $gb_post->private = (isset($_POST['gb_private'])) ? 1 : 0; $gb_action = (isset($_POST['agb_preview_'.$antispam])) ? 'preview' : 'submit'; echo $gb_post->process($gb_action); } else { echo $gb_post->process(); } $gb_post->db->close_db(); break; default: include_once LAZ_INCLUDE_PATH.'/lib/vars.class.php'; display_entries(); } ob_end_flush(); $base_path = dirname(dirname(LAZ_INCLUDE_PATH)); //chdir("$base_path"); include($base_path.'/footer.php'); } else { include_once LAZ_INCLUDE_PATH.'/lib/vars.class.php'; include_once LAZ_INCLUDE_PATH.'/lib/gb.class.php'; $gb = new guestbook(LAZ_INCLUDE_PATH); $GB_PG['base_url'] = $gb->db->VARS['base_url']; $GB_PG['index'] = $gb->db->VARS['base_url'].'/index.php'; $GB_PG['admin'] = $gb->db->VARS['base_url'].'/admin.php'; $GB_PG['comment'] = $gb->db->VARS['base_url'].'/comment.php'; $GB_PG['addentry'] = $gb->db->VARS['base_url'].'/addentry.php'; $entry = (isset($_GET['entry'])) ? $_GET['entry'] : 0; $entry = (isset($_POST['entry'])) ? $_POST['entry'] : $entry; $entry = intval($entry); $gb->searchfield = (isset($_GET['searchfield'])) ? trim($_GET['searchfield']) : ''; $gb->searchtext = (isset($_GET['searchtext'])) ? trim(urldecode($_GET['searchtext'])) : ''; $gb->searchfield = (isset($_POST['searchfield'])) ? trim($_POST['searchfield']) : $gb->searchfield; $gb->searchtext = (isset($_POST['searchtext'])) ? trim(urldecode($_POST['searchtext'])) : $gb->searchtext; echo $gb->show_entries($entry); } ?>