Author |
Message |
|
i feel stupid but i didnt understand "Just open up your email client and paste it into it", sorry
|
|
|
sorry how do i send it?
here's the code, but i have made no changes to the index page, as it was stated in the rules.
<?php
/**
* ----------------------------------------------
* Advanced Guestbook 2.3.1 (PHP/MySQL)
* ----------------------------------------------
*/
$include_path = dirname(__FILE__);
include_once $include_path."/admin/config.inc.php";
include_once $include_path."/lib/$DB_CLASS";
include_once $include_path."/lib/image.class.php";
include_once $include_path."/lib/template.class.php";
if (IS_MODULE) {
if (!eregi("modules.php", $HTTP_SERVER_VARS['PHP_SELF'])) {
die ("You can't access this file directly...");
}
$ModName = basename(dirname( __FILE__ ));
ob_start();
include("header.php");
$GB_PG["base_url"] .= "/modules/$ModName";
$GB_SELF = basename($HTTP_SERVER_VARS['PHP_SELF']);
$GB_PG["index"] = "$GB_SELF?op=modload&name=$ModName&file=index";
$GB_PG["admin"] = "$GB_SELF?op=modload&name=$ModName&file=index&agbook=admin";
$GB_PG["comment"] = "$GB_SELF?op=modload&name=$ModName&file=index&agbook=comment";
$GB_PG["addentry"] = "$GB_SELF?op=modload&name=$ModName&file=index&agbook=addentry";
if (!isset($agbook)) {
$agbook = '';
}
switch ($agbook) {
case "admin":
include_once $include_path."/lib/session.class.php";
$gb_auth = new gb_session($include_path);
$AUTH = $gb_auth->checkSessionID();
$VARS = $gb_auth->fetch_array($gb_auth->query("SELECT * FROM ".$gb_auth->table['cfg']));
$gb_auth->free_result($gb_auth->result);
$template = new gb_template($include_path);
if (isset($HTTP_COOKIE_VARS['lang']) && !empty($HTTP_COOKIE_VARS['lang'])) {
$template->set_lang($HTTP_COOKIE_VARS['lang']);
} else {
$template->set_lang($VARS['lang']);
}
$LANG = $template->get_content();
$gb_auth->close_db();
if (!$AUTH) {
$message = (isset($username) || isset($password)) ? $LANG["PassMess2"] : $LANG["PassMess1"];
eval("\$enter_html = \"".$template->get_template($GB_TPL['header'])."\";");
eval("\$enter_html .= \"".$template->get_template($GB_TPL['adm_enter'])."\";");
eval("\$enter_html .= \"".$template->get_template($GB_TPL['footer'])."\";");
echo $enter_html;
} else {
$GB_PG["admin"] = $GB_PG["base_url"]."/admin.php?username=$username&password=$password&enter=1";
header("Location: $GB_PG[admin]");
exit();
}
break;
case "comment":
include_once $include_path."/lib/vars.class.php";
include_once $include_path."/lib/comment.class.php";
$gb_com = new gb_comment($include_path);
$gb_com->id = (isset($HTTP_GET_VARS["gb_id"])) ? $HTTP_GET_VARS["gb_id"] : '';
$gb_com->id = (isset($HTTP_POST_VARS["gb_id"])) ? $HTTP_POST_VARS["gb_id"] : $gb_com->id;
$gb_com->comment = (isset($HTTP_POST_VARS["comment"])) ? $HTTP_POST_VARS["comment"] : '';
$gb_com->user = (isset($HTTP_POST_VARS["gb_user"])) ? $HTTP_POST_VARS["gb_user"] : '';
$gb_com->pass_comment = (isset($HTTP_POST_VARS["pass_comment"])) ? $HTTP_POST_VARS["pass_comment"] : '';
$gb_action = (isset($HTTP_POST_VARS["gb_comment"])) ? $HTTP_POST_VARS["gb_comment"] : '';
$gb_com->comment_action($gb_action);
$gb_com->db->close_db();
break;
case "addentry":
include_once $include_path."/lib/vars.class.php";
include_once $include_path."/lib/add.class.php";
$gb_post = new addentry($include_path);
$gb_post->name = (isset($HTTP_POST_VARS["gb_name"])) ? $HTTP_POST_VARS["gb_name"] : '';
$gb_post->email = (isset($HTTP_POST_VARS["gb_email"])) ? $HTTP_POST_VARS["gb_email"] : '';
$gb_post->url = (isset($HTTP_POST_VARS["gb_url"])) ? $HTTP_POST_VARS["gb_url"] : '';
$gb_post->comment = (isset($HTTP_POST_VARS["gb_comment"])) ? $HTTP_POST_VARS["gb_comment"] : '';
$gb_post->location = (isset($HTTP_POST_VARS["gb_location"])) ? $HTTP_POST_VARS["gb_location"] : '';
$gb_post->icq = (isset($HTTP_POST_VARS["gb_icq"])) ? $HTTP_POST_VARS["gb_icq"] : '';
$gb_post->aim = (isset($HTTP_POST_VARS["gb_aim"])) ? $HTTP_POST_VARS["gb_aim"] : '';
$gb_post->gender = (isset($HTTP_POST_VARS["gb_gender"])) ? $HTTP_POST_VARS["gb_gender"] : '';
$gb_post->userfile = (isset($HTTP_POST_FILES["userfile"]["tmp_name"]) && $HTTP_POST_FILES["userfile"]["tmp_name"] != "") ? $HTTP_POST_FILES : '';
$gb_post->user_img = (isset($HTTP_POST_VARS["gb_user_img"])) ? $HTTP_POST_VARS["gb_user_img"] : '';
$gb_post->preview = (isset($HTTP_POST_VARS["gb_preview"])) ? 1 : 0;
$gb_post->private = (isset($HTTP_POST_VARS["gb_private"])) ? 1 : 0;
echo $gb_post->process($HTTP_POST_VARS["gb_action"]);
} else {
echo $gb_post->process();
}
$gb_post->db->close_db();
break;
default:
include_once $include_path."/lib/vars.class.php";
include_once $include_path."/lib/gb.class.php";
$gb = new guestbook($include_path);
$entry = (isset($HTTP_GET_VARS["entry"])) ? $HTTP_GET_VARS["entry"] : 0;
$entry = (isset($HTTP_POST_VARS["entry"])) ? $HTTP_POST_VARS["entry"] : $entry;
echo $gb->show_entries($entry);
$gb->db->close_db();
}
ob_end_flush();
$base_path = dirname(dirname($include_path));
chdir("$base_path");
include("$base_path/footer.php");
} else {
include_once $include_path."/lib/vars.class.php";
include_once $include_path."/lib/gb.class.php";
$gb = new guestbook($include_path);
$entry = (isset($HTTP_GET_VARS["entry"])) ? $HTTP_GET_VARS["entry"] : 0;
$entry = (isset($HTTP_POST_VARS["entry"])) ? $HTTP_POST_VARS["entry"] : $entry;
echo $gb->show_entries($entry);
}
?>
|
|
|
isnt there another way? it will take a lot of time. i think i made a small mistake so that index page or entry page cannot be viewed
|
|
|
hello,
i made the changes to stop spam on version 2.3.1, following the notes on sticky. but i've lost my guestbook. a blank page appears, u can see it on http://www.zeynepadali.com/agb/index.php
i know something i did is wrong, i tried to undo changes and redo them, but still nothing. it may be a silly mistake but pls help me. i hope old messages are still there, since these changes dont erase anything.
i may reinstall a new version but it will take a lot of work, redesigning forms, etc. but it wont be a fast solution.
pls help me
|
|
|
thanx carbonize
|
|
|
I noticed that, but that part seemed a little beyond my experience on html.
Anyway, I'll try that.
On other related topics it seemed to me that upgrading to 2.3.4 will also solve this problem. But upgrading will require more work it seems.
A question, why does advanced tools in geocities install ver. 2.3.1?
|
|
|
I have found the answer, int he picture upload options, there is a max size entry, I thought it was for uploadad pistures, bu it is for thumbnail.
As a feedback, this can be explained better in adm. page
|
|
|
Hi,
(If this topic exists, I am sorry, but I couldn't find it)
I installed AGB2.3.1 correctly and I am testing now.
I added a picture, expecting a thumbnail of it and real size when clicked, but the picture is soo big on the page. I checked thumbnail option on the administrative page but then there is a black curtain on the picture and it is still very big.
While searching in the forum I have seen examples of what I want, on this link.
See mine and pls don't laugh a lot, this is not what I want
http://zeynepadali.com/agb/index.php
Can you help me?
|
|
|
Hi,
I just installed AGB 2.3.1 on my site (through yahoo.geocities advanced tools). That's great, thanks for those creating this.
I don't like those smilies, so I checked the option to disable them on administraiton page, but they still exist in the entry form. It also says smilies closed on the form, but they are still there, smiling at me
Can you help me?
note: I know basics of html, son I diasble some form entries, etc on the php files, but the code including these smilies seemed confusing to me.
|
|
|