in lib/add.class.php
Find
function form_addguest() {
global $GB_PG, $HTTP_COOKIE_VARS;
for 2.2 find
function form_addguest() {
global $HTTP_SERVER_VARS;
2.3.1 replace it with
function form_addguest() {
global $GB_PG, $HTTP_COOKIE_VARS, $Vrand;
2.2 replace it with
function form_addguest() {
global $HTTP_SERVER_VARS, $Vrand;
Find
function preview_entry() {
global $GB_PG;
2.2 users find
function preview_entry() {
if (get_magic_quotes_gpc()==1) {
2.3.1 replace it with
function preview_entry() {
global $GB_PG, $Vrand;
2.2 replace it with
function preview_entry() {
global $Vrand;
if (get_magic_quotes_gpc()==1) {
the statement was more for people that already use footer files. I use the same footer file for my guestbook as for every other page I just made the footer.php file that comes with the guestbook blank. This way the guestbook fits in with my site.
There is a problem with the image verification mod in guestbook 2.2 but I am working on it.
As for PHP includes I'll give a quick explanation.
The PHP function include() is used to add the contents of one file into the current file. For example <?php include("data.txt"); ?> would add the content of data.txt into the output of the current file at the point the code is at.
I'll simplify further. Every page on my site is actually made up for three seperate files, a header, the content and a footer. Every page uses the include code to add the header file to the start of the content and the footer file to the end of it. This makes updating navigation and the like easy as it's only a single file. The layout of a page is like this:
You then save the file with the .php extension and when the page is requested your server passes the page to PHP which then sends the file but with the content of header.txt at the start of the file and footer.txt's contents the end.
The reason for all the /mnt/htdocs is because my pages are spread over several directories (folders) and so I use the absolute path for the file names.
On the next line put the following (rembering to put this between that line and the next line, DO NOT OVERWIRTE THE CURRENT NEXT LINE!)
Very crude but effective. Just change the YOUR PASSWORD to whatever your password is. I assume with this code that your actual password is not NOTYOURPASSWORD but if it is change this bit. Also you will need to change this if you ever change your password.
The other option is to change the name of admin.php to stop them finding it and also remove the link from the guestbook if you do this.
Hassle your hosts and tell them to
1 - Update the version of PHP they use
2 - Turn on Magic_quotes
I actually started going through the guestbook code to try and make a new version with the Yahoo/MSN mods as well as my image verification as options in the admin but it's not an easy script to follow. It jumps all over the pcae as it uses objects
Actually it looks like they just got admin access then put in a post directly thereby bypassing anti html script. If you want you can contact me and I can log in and delete the entry for you.
All entries and settings are stored in SQL so simply reupload the complete lib and template folders
also reupload index.php. I'm guessing you had write access granted on the files and they changed them by logging into your admin.
Feel free. I may have messed something up in the instruction file so what I will do is make a new zip file that not only contains verify.php and verifyimage.php but also has the three files (addentry.php, add.class.php and form.php) with the changes already in place. I will comment the modified sections in these files so people can see the changes made. I will still include the read me file as well.