Script execution time: $elapsedtime seconds\n"; If ( $availabletime != "" AND $availabletime != "0" ) { # If known, display available time. $timeremaining = $availabletime - $elapsedtime; print " • Time remaining: $timeremaining seconds"; } print "
\n"; } # End If - Now make certain they are numeric. } # End If - If times are available, display the elapsed time. } # End of function - Display Script Execution Time /* * * Function: Validate e-mail address * */ function checkmail ($email) { if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) { return true; } else { return false; } # End If } # End of function - Validate e-mail address /* * * Function: Word Break * */ function wordbreak($text, $wordsize) { if (strlen($text) <= $wordsize) { return $text; } # No breaking necessary, return original text. $text = str_replace("\n", "", $text); # Strip linefeeds $done = "false"; $newtext = ""; $start = 0; # Initialize starting position $segment = substr($text, $start, $wordsize + 1); # Initialize first segment while ($done == "false") { # Parse text $lastspace = strrpos($segment, " "); $lastbreak = strrpos($segment, "\r"); if ( $lastspace == "" AND $lastbreak == "" ) { # Break segment $newtext .= substr($text, $start, $wordsize) . " "; $start = $start + $wordsize; } else { # Move start to last space or break $last = max($lastspace, $lastbreak); $newtext .= substr($segment, 0, $last + 1); $start = $start + $last + 1; } # End If - Break segment $segment = substr($text, $start, $wordsize + 1); if ( strlen($segment) <= $wordsize ) { # Final segment is smaller than word size. $newtext .= $segment; $done = "true"; } # End If - Final segment is smaller than word size. } # End While - Parse text $newtext = str_replace("\r", "\r\n", $newtext); # Replace linefeeds return $newtext; } # End of function - Word Break /* * * Function: Display Confirmation Message * */ function confirmmsg($confirm) { global $bodycolor, $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor; ?>
Confirmation


<? echo $title ?>
\n"; } } # End of function - Display Header /* * * Function: Display Footer Menu * */ function displayfootermenu() { global $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor; ?>
Main Menu •  Admin Log Out •  Display/Edit/Delete Posts •  Guestbook Configuration
Database Manager •  Color/Graphics Selection •  Change Password •  Reset IP Log

HyperBook Guestbook Copyright © 2001-6 by Thomas R. Pasawicz. All rights reserved. • Click here for more info.



Guestbook Administrator Log-in
Please enter your password. For proper function, you must have cookies enabled in your browser.
Password:

Guestbook Administrator Log-out
You have been successfully logged-out.
View Guestbook Homepage Log-in Again


\n\nFilename: $filename

\n\n"; } # End If - File opened for writing } # End of function - Update Guestbook Configuration File /* * * Function: Load Guestbook Configuration File * */ function load_gbconfiguration() { global $perpage, $ipcheck, $addquestion1, $displayadd1, $addquestion2, $displayadd2, $addquestion3, $displayadd3, $displayuin, $displayemail, $foundoptions, $bodycolor, $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor, $linkcolor, $vlinkcolor, $alinkcolor, $hovercolor, $homepage_title, $homepage_url, $guestbookname, $guestbookbannerurl, $signguestbookurl1, $signguestbookurl2, $backgroundimageurl, $webmaster_email, $notifications, $notification_email, $welcome_msg, $thankyou_msg, $adminurl, $adminpass, $cookieexpiration, $datapath, $bannedwords, $headertag, $data_version, $time_hour_offset, $use_captcha, $no_urls, $hide_email; $filename = "data/gbconfiguration.dat"; if ($fp = fopen($filename, 'r')) { # File opened for reading $lock = flock($fp, LOCK_SH); if ($lock) { # Lock achived $data_version = chop(fgets($fp, 5000)); if ($data_version != "v1.20" AND $data_version != "v1.21" AND $data_version != "v1.30") { # pre v1.20 Update required $perpage = $data_version; $data_version = "v1.00"; } else { $perpage = chop(fgets($fp, 5000)); } $ipcheck = chop(fgets($fp, 5000)); $addquestion1 = chop(fgets($fp, 5000)); $displayadd1 = chop(fgets($fp, 5000)); $addquestion2 = chop(fgets($fp, 5000)); $displayadd2 = chop(fgets($fp, 5000)); $addquestion3 = chop(fgets($fp, 5000)); $displayadd3 = chop(fgets($fp, 5000)); $displayuin = chop(fgets($fp, 5000)); $displayemail = chop(fgets($fp, 5000)); $bodycolor = chop(fgets($fp, 5000)); $bordercolor = chop(fgets($fp, 5000)); $tablecolor = chop(fgets($fp, 5000)); $barcolor = chop(fgets($fp, 5000)); $textcolor = chop(fgets($fp, 5000)); $bartextcolor = chop(fgets($fp, 5000)); $linkcolor = chop(fgets($fp, 5000)); $vlinkcolor = chop(fgets($fp, 5000)); $alinkcolor = chop(fgets($fp, 5000)); $hovercolor = chop(fgets($fp, 5000)); $homepage_title = chop(fgets($fp, 5000)); $homepage_url = chop(fgets($fp, 5000)); $guestbookname = chop(fgets($fp, 5000)); $guestbookbannerurl = chop(fgets($fp, 5000)); $signguestbookurl1 = chop(fgets($fp, 5000)); $signguestbookurl2 = chop(fgets($fp, 5000)); $backgroundimageurl = chop(fgets($fp, 5000)); $webmaster_email = chop(fgets($fp, 5000)); $notifications = chop(fgets($fp, 5000)); $notification_email = chop(fgets($fp, 5000)); $welcome_msg = chop(fgets($fp, 5000)); $thankyou_msg = chop(fgets($fp, 5000)); $adminurl = chop(fgets($fp, 5000)); $adminpass = chop(fgets($fp, 5000)); $cookieexpiration = chop(fgets($fp, 5000)); $howfound = chop(fgets($fp, 5000)); $bannedwords = chop(fgets($fp, 5000)); $headertag = chop(fgets($fp, 5000)); if ($data_version == "v1.00") { $time_hour_offset = "0"; $data_version = "v1.20"; } else { $time_hour_offset = chop(fgets($fp, 5000)); } if ($data_version == "v1.00" OR $data_version == "v1.20" OR $data_version == "v1.21") { # Set default v1.30 values $use_captcha = "false"; $no_urls = "false"; $hide_email = "false"; } else { # Read in v1.30 values $use_captcha = chop(fgets($fp, 5000)); $no_urls = chop(fgets($fp, 5000)); $hide_email = chop(fgets($fp, 5000)); } # End If - Set default v1.30 values $lock = flock($fp, LOCK_UN); } # End If - Lock achived fclose($fp); $foundoptions = explode("|", $howfound); $linebreak = chr(13) . "\n"; # Linebreak & line feed characters. $headertag = str_replace("|", $linebreak, $headertag); # Convert pipes to linebreaks. $headertag = str_replace("|", "|", $headertag); # Convert HTML elements to pipes. $welcome_msg = str_replace("|", $linebreak, $welcome_msg); # Convert pipes to linebreaks. $welcome_msg = str_replace("|", "|", $welcome_msg); # Convert HTML elements to pipes. $thankyou_msg = str_replace("|", $linebreak, $thankyou_msg); # Convert pipes to linebreaks. $thankyou_msg = str_replace("|", "|", $thankyou_msg); # Convert HTML elements to pipes. if ($data_version != "v1.30") { $data_version = "v1.30"; update_gbconfiguration(); } } # End If - File opened for reading } # End of function - Load Guestbook Configuration File /* * * Function: Load Language Configuration File * */ function load_language($filename) { if ($fp = fopen($filename, 'r')) { # File opened for reading $lock = flock($fp, LOCK_SH); if ($lock) { # Lock achived $lang = file($filename); $lock = flock($fp, LOCK_UN); } # End If - Lock achived fclose($fp); } # End If - File opened for reading $number_lines = sizeof($lang); for ($i = 0;$i < $number_lines;$i++) { # Initialize text $lang[$i] = trim($lang[$i]); # Trim string (removes CR from end of line). } # End For Loop - Initialize text return $lang; } # End of function - Load Language Configuration File /* * * Function: Change Administrative Password * */ function changepassword() { global $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor; displayheader("Change Administrative Password"); ?>
Change Administrative Password
This is the password used to access the Guestbook Administration section. It must be at least 6 characters long and may consist of upper and lower case letters and numbers (punctuation characters should not be used).
 
Password: Enter Again:

Database Integrity Check
These are the results of the database diagnostic test.

Guestbook Configuration
The following functions will allow you to control the way your guestbook will be displayed.
Guestbook Name
Your guestbook name will be displayed in the page title and in place of a banner graphic if you decide not to use one.



Website Title
Your Website/Homepage title will be displayed on links back to your homepage URL.
If you don't have a name for your website, you may simply use "Homepage".
May also be a short message such as "Click here to return to homepage."



Homepage URL
This is the full URL back to your homepage beginning with "http://".
If not entered, a link back to your homepage will not be displayed.
Examples: "http://mydomain.com" or "http://www.myhost.com/~mywebsite/index.html"



Webmaster E-mail
Please enter your e-mail address.



Admin Program URL
This is the complete URL to the admin program. The admin program will attempt to determine this URL for you. If a URL is shown below, use it unless you know for certain that a different URL is required.
Possible URL:


E-mail Notifications
E-mail notifications will allow you to receive each post to your guestbook via e-mail, this way you will not have to continuously visit your guestbook to check for new posts. In addition, a link will be provided in each notification to take you directly to the editor page for that post. From the editor page you may change, delete or add a personal comment to the guestbook post. Notifications can be sent to more than one person by entering multiple e-mail addresses, separated by commas, in the notification list box.

> Send E-mail Notifications
E-mail Notification List:


Time Zone Offset
Depending on where your website is hosted, the time stamp returned by the server may be different than your local time. Using the Time Zone Offset you may adjust the time displayed on guestbook posts by adding or subtracting a number of hours. For example, if you make a post at 3pm local time and it is displayed as 1pm, then enter a "2" for the offset and all subsequent posts will have the displayed time increased by two hours. Likewise, if the displayed time were 5pm, enter a "-2" to decrease the displayed time by two hours.

Time Zone Offset:

IP Check
The IP Check is used to prevent guestbook "flooding," where a malicious visitor attempts to post a large number of nonsense posts to your guestbook. It works by recording a log of each poster's IP address and will only allow additional posts up to the number specified in the IP Check box. For example, if you enter "2" in the box, then a visitor will only be allowed to post twice before being blocked. A "1" would allow only a single post, a "3" would allow up to three posts. If you enter a zero (0), then IP Checking will be disabled and visitors may post as often as they wish. Note that only the most recent 25 IP addresses are logged, after 25 posts a return visitor will be allowed to post again since their IP address will no longer be in the log. Recommended value is 5 or higher, since some some ISPs use cache servers which may report the same IP address for every user of the cache server.

IP Check:

Posts Per Page
This setting will control how many posts are displayed on each page of your guestbook and may be changed at any time. By default, your guestbook will always display the most recent posts first, with each following page displaying eariler posts. A good value for this setting is 10.

Posts Per Page:

Banned Words
You may screen out banned words from your guestbook post by checking the box below. The list of banned words may be changed by editing the "bannedwords.txt" file in your guestbook directory.

> Screen Banned Words

CAPTCHA
CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart) is a graphical test designed to prevented automated (ie. spambot) posts from being accepted by the guestbook. Note that this function requires the GD library module and the use of sessions. WARNING: GD library module has not been detected on this server."; } ?>

> Use CAPTCHA screening

No URLs
Since most guestbook spammers are attempting to post URLs for search engines to find, checking the No URLs box will remove the Homepage URL link and attempt to detect URLs in the body of the main guestbook message.

> No URLs

Hide E-mail Addresses
If checked, this will prevent guestbook signers' e-mail addresses from being publicly displayed. Note that the administrator will still be able to view an e-mail address when using the Admin.php script to review posts.

> Hide E-mail Addresses

Password Cookie Expiration
The Administrator's password is saved in a cookie after successfully logging into the admin program. You may use this setting to determine how long a cookie will be stored before it expires and the Admin is required to enter the password again. If you share your computer with other people, it is recommended that you set the expiration low, such as one hour. If you are the only one to have access to your computer, you may wish to set the expiration to a month or even a year (just be sure you don't forget your password after such a long period of time). Note: you can clear the password from your cookie at any time by clicking on the "Admin Log Out" link.

Password Cookie Expiration: > Hour   > Day   > Month   > Year

Additional Questions
Along with the usual Name/Location/Comments fields in the guestbook, you may include up to three additional questions of your choice. It is recommended that you keep your questions short and simple since visitors will only have one line (100 characters) to enter each answer (they could use the "comments" section for more detailed answers). Your questions may pertain to your website's theme, for example a music site could ask visitors what their favorite band, CD or concert are. Or you may ask if a visitor wishes to be contacted regarding a product or service. Be sure to click the "Displayed" box for each question you enter.


Additional Question 1:   > Displayed


Additional Question 2:   > Displayed


Additional Question 3:   > Displayed


Found Options
Vistors can be presented with a list of ways they found your website. You may enter additional options to this list, one per line. It is recommended that each line be no more than 35 characters in lenght to ensure proper display.



Display UIN (ICQ Number) Field
The UIN (ICQ Number) is an optional field. If your guests use ICQ you may wish to include it as a way of contacting them.

> Display UIN (ICQ Number) Field

Display Webmaster E-mail Address
You may display the Webmaster's e-mail address along with a note to send "private messages" via e-mail (since guestbooks are intended for public viewing, it doesn't make sense to post private messages when an e-mail will accomplish the same thing).

> Display Webmaster E-mail Address

Welcome Message
This is the message displayed to visitors who are about to sign your guestbook. It may contain additional information about the guestbook form or simply invite them to share their thoughts.



Thank You Message
The thank you message is displayed to visitors who have just signed your guestbook. It never hurts to be polite and let your visitors know you appreciate the time they took to leave you a message.



Header Tag HTML
The HTML entered in this box will be included at the top of each page of your guestbook. It is typically used for displaying an ad banner, particularly if you are using a "free" hosting service which requires you to include their banner code in exchange for hosting your site. You should exercise caution when entering code in this box, any errors such as an unclosed tag could adversely affect the display of your guestbook. Note that the actual "HEAD" and "BODY" tags are generated by HyperBook and should not be included here. If you wish to change your Guestbook's colors, please use the Color/Graphics Selection area.




Database Manager
The following functions will allow you to control the way your database operates. It is advisable to read the HyperBook Documentation before using any of the functions in this section.
Data Directory Pathway
This is the pathway on your server to the data directory. Note: this is NOT a URL. The admin program will attempt to determine this path for you. If a path is shown below, use it unless you know for certain that a different path is required.
Possible path:


Number of Records Per File
This controls how many files will be stored in each of the flat text database files. It is NOT the number of records displayed on each page, that may be modified from the Guestbook Configuration menu. You should NOT change this setting unless you know what you are doing! Once a multi-file database has been created, the number of records stored in each file cannot be changed without severely corrupting the database. If for some reason this value must be changed, you should first export your current database, then delete all the data files, change this setting and then import the database so that all the files will have the correct number of records.
WARNING: Should not be arbitrarily altered! Normally set to 25.


Clear Database
WARNING: This function will remove all posts from your guestbook and reset it to zero entries. "Data" files in the data directory will then be deleted. Once cleared, you will not be able to recover these files unless you have made a back-up or used the Export function (below).
Export Database
This function is used to dump all records in the multi-file database to a single file called "records.dat" located in the data directory. It may be used for archiving your data or in conjunction with the Import Database function for importing records from other guestbooks or changing the number of records stored in each file.
Import Database
This function is used to load records from a single file called "records.dat" located in the data directory into the multi-file database. It may be used for importing records from other guestbooks or changing the number of records stored in each file. Imported records will be added to the current records in the order they found. Therefore, the last record in the imported file will appear as the most recent post. Note: the imported records must be in the proper format or the guestbook database could become corrupted. It is advisable to back-up any existing records before attempting to import new records.
Database Integrity Check
This function is used to confirm that all files in the database exist, contain the expected number of records and that each record contains the expected number of fields. It can be used to test an imported database or to diagnose error messages generated by PHP.
Record Format
Shown below is the format used for each record in the flat text database files. Each record is a single line terminated by a line break (character 13 and a linefeed). Records are divided into fields using "pipes": | chr(124). If a pipe is to appear as part of a field, it should first be converted into an HTML entity (&#124;) so it will not be mistaken for a field delimiter. Likewise, all line breaks should be converted to "<br>" tags so that a record will not be prematurely terminated. URLs are stored with the "http://" prefix and will not work properly without it. The only expected fields are name, date and comments, the rest may be left blank (the pipes will still be required to hold their place, eg. a missing e-mail would be || ). UID is a "unique identifier" used when searching for a particular record, it is only used for identifying posts in e-mail notifications and should be left blank in imported records. Note that there are 23 fields in total (counting starts at "0").


00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 20| 21| 22

  Field   Description   Field   Description
00 Name or Handle 12 Question 2
01 Date of Post 13 Question 3
02 E-mail Address 14 Answer 1
03 Homepage Address 15 Answer 2
04 Homepage Title 16 Answer 3
05 ICQ Number/UIN 17 Admin Comments
06 How Found 18 UID
07 Location 19 Future Expansion
08 Comments 20 Future Expansion
09 IP Address 21 Future Expansion
10 Remote Host 22 Future Expansion
11 Question 1    

Color/Graphics Selection
\n"; } ?>
Color/Graphics Selection
Select the colors and graphics you would like your guestbook displayed with.
Guestbook Banner URL
This is an optional field to display a title banner graphic above the posts in your guestbook. If you leave this field blank, the name of your guestbook will be displayed in a bar in place of the graphic. You may specify a graphic anywhere on the Web by supplying a fully qualified URL such as "http://www.somedomain.com/graphicsfolder/bannergraphic.gif". You may also upload a graphic to the directory you created for your guestbook, in which case only the file name of the graphic is required (eg. "guestbookbanner.gif"). For best appearance, your banner graphic should be no wider than 600 pixels and in GIF or JPG format.


Sign Guestbook Button URL
This is an optional field to display a "Sign the Guestbook" graphic button. If you leave this field blank, a text link inside a table will be displayed in it's place. You may specify a graphic anywhere on the Web by supplying a fully qualified URL such as "http://www.somedomain.com/graphicsfolder/buttongraphic.gif". You may also upload a graphic to the directory you created for your guestbook, in which case only the file name of the graphic is required (eg. "signguestbook.gif"). For best appearance, your button graphic should be about 200 pixels wide and in GIF or JPG format.


Sign Guestbook Button URL 2 (Mouseover)
If a second "Sign the Guestbook" graphic button is assigned, it will be used for the mouseover effect with the first button, ie. the first button will be displayed until the mouse pointer passes over it, at which time the second button will be displayed.


Guestbook Background Image URL
Similar to the Banner URL, this is a link to an optional background image. If no link is specified, the background color chosen below will be displayed.


Color Selection
This section will allow you to select the colors your guestbook will be displayed with. Below the submit button is a preview of how a typical display box will appear. The body color is the background color, unless a background image was specified (see above). All text boxes have a thin border with a "title bar" at the top. The "table color" is the color of the text box beneath the bar. Table text color is used to specify the color of the text appearing inside the table, which includes all the text posted in the guestbook entries. The "bar text color" is displayed in the bar at the top of the text box. The remaining selections are for the four link states (unvisited, visited, active and hover). Note that the hover color is only used by MS Internet Explorer, it will have no effect with Netscape. Try to choose background and text colors that contrast, this will improve the look of your guestbook and make it easier to read. A color chart is provided in a pop-up window to aid in your color selection, see the link below the preview box. Note: only the colors of the preview box and background image will change on this page. This was done so an accidental color change would not render this page unreadable.

 
Body Color
 
Bar Color
 
Table Color
 
Border Color
 
Bar Text Color
 
Table Text Color
 
Link Color
 
Visited Link Color
 
Active Link Color
   
 
Hover Color
   

      Preview Box
Bar Text
Table Text Bold Text Unvisted Link Color Visited Link Color
Active Link Color Mouse over for Hover Color (MSIE only)

Pop-up Color Chart

Main Menu •  Admin Log Out •  Display/Edit/Delete Posts •  Guestbook Configuration
Database Manager •  Color/Graphics Selection •  Change Password •  Reset IP Log

HyperBook Guestbook Copyright © 2001-6 by Thomas R. Pasawicz. All rights reserved. • Click here for more info.
Hyperbook Initial Set-up
Welcome to HyperBook. In a few minutes your guestbook will be set-up and ready to use.
The following information is required for proper function, please fill in all fields.

Data Directory Pathway
This is the pathway on your server to the data directory. Note: this is NOT a URL. The admin program will attempt to determine this path for you. If a path is shown below, use it unless you know for certain that a different path is required.
Possible path:


Admin Program URL
This is the complete URL to the admin program. The admin program will attempt to determine this URL for you. If a URL is shown below, use it unless you know for certain that a different URL is required.
Possible URL:


Admin Password
This is the password you will use to access your guestbook administration program, be sure to choose a password you can remember but won't be easy for anyone else to guess.
Note: To function properly, you must have your browser configured to accept cookies.

Admin password (min. 6 characters)
Enter again for confirmation

Guestbook Name
Your guestbook name will be displayed in the page title and in place of a banner graphic if you decide not to use one.



Homepage Title
Your Homepage title will be displayed on links back to your main page.
If you don't have a name for your website, you may simply use "Homepage".



Homepage URL
This is the full URL back to your homepage beginning with "http://".
Examples: "http://mydomain.com" or "http://www.myhost.com/~mywebsite/index.html"



Webmaster E-mail
Please enter your e-mail address.



By clicking on the "Set-up Guestbook" button, I hereby agree to all terms
and conditions of the HyperBook Guestbook License Agreement.


HyperBook Registration
There is no requirement to register this program, but there are some advantages. By registering, you will be eligible to receive timely update notifications via e-mail and have your website linked from the HyperBook website. Your information will be kept confidential and you will only receive e-mails concerning this program. In the event of a serious bug or security breach being discovered, a critical update notification will be sent to all registered users advising them of the problem. While every effort has been made to test this software, changes to PHP, Apache or UNIX could introduce bugs that did not exist during development and testing. So please take a moment to register for this free service.

Note: After sending this form, please check your e-mail for a list subscription confirmation e-mail. You must respond to the confirmation e-mail to complete the registration process. You may also unsubscribe from the update notification list at any time by visiting this page:

http://diamond-back.com/software/guestbook/notifications.php

Along with your form data, the registration e-mail will also send your HyperBook version number and server software version numbers (from the Apache "SERVER_SOFTWARE" Environment Variable, if present). This information is used so we can determine which version your are using and track the servers under which HyperBook has been successfully installed.

Note: If your e-mail or URL change, please resubmit this form and include the former e-mail/URL in the comments section so our records can be updated.

Webmaster's E-mail (required - this is where notifications will be sent):


Webmaster's Name (optional):


Homepage Title (optional):


Homepage URL (optional):


Guestbook URL (optional):


I would like to be linked from the Hyperbook website (requires guestbook URL link).

Comments (optional):



Please click the back button and enter an e-mail address to complete your registration."); } else { if (checkmail($email) != 1) { errormsg("Registration Submission Error","The e-mail address you entered does not appear to be valid.
Please click the back button and check your e-mail address for errors. Note: Spaces cannot be used in an e-mail address."); } } # End If - Check for e-mail if ( $link == "true" AND $url == "") { # Check for link errormsg("Registration Submission Error","You have indicated that you would like to be linked from the HyperBook website but did not enter a URL. Please click the back button and enter a link URL."); } # End If - Check for link $name = stripslashes($name); $title = stripslashes($title); $comments = stripslashes($comments); $message = "HyperBook Registration E-mail: $email Name: $name Title: $title Homepage URL: $url Guestbook URL: $gburl Link: $link Version: $version Server Info: $serverinfo Comments: $comments "; # Send e-mail mail ("hyperbookregistration@diamond-back.com", "HyperBook Registration",$message,"From: $email"); # Send self subscription to Hyperbook Mailing List $subemail = str_replace ("@", "=", $email); mail ("hyperbook-subscribe-$subemail@mlm.diamond-back.com", "HyperBook Subscription","empty","From: $email"); } # End of function - Send Registration E-mail /* * * Function: Feedback Form * */ function feedbackform() { global $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor, $webmaster_email, $homepage_title, $homepage_url; displayheader("HyperBook Feedback Form"); ?>
HyperBook Feedback Form
You are welcome to use this form to submit bug reports, offer suggestions or make general comments about the HyperBook software. Your opinions and reports are important to us... all feedback will be read and filed. We regret that personal tech support cannot be guaranteed, please read the included documentation before contacting us with your support questions. All questions will be answered as time permits. We hope you enjoy using this software and we will continue to develop it as long as there are webmasters interested in using it.

Note: Along with your form data, the feedback e-mail will also send your HyperBook version number and server software version numbers (from the Apache "SERVER_SOFTWARE" Environment Variable, if present). This information is helpful when responding to tech support requests. It is also helpful if you have uploaded the "phpinfo.php" file to your guestbook directory so we can determine if there may be a configuration setting on your server which could cause problems with HyperBook.

If for any reason you cannot contact us using this form, you may write directly to hyperbookfeedback@diamond-back.com.

Webmaster's E-mail (required for replies):


Webmaster's Name (optional):


Homepage Title (optional):


Homepage URL (optional):


Questions, reports or comments:



Please click the back button and enter an e-mail address to complete your feedback."); } else { if (checkmail($email) != 1) { errormsg("Feedback Submission Error","The e-mail address you entered does not appear to be valid.
Please click the back button and check your e-mail address for errors. Note: Spaces cannot be used in an e-mail address."); } } # End If - Check for e-mail if ( $comments == "") { # Check for comments errormsg("Feedback Submission Error","You haven't included any comments... not much point in sending feedback without saying anything.
Please click the back button and enter your comments."); } # End If - Check for link $name = stripslashes($name); $title = stripslashes($title); $comments = stripslashes($comments); $message = "HyperBook Feedback E-mail: $email Name: $name Title: $title URL: $url Version: $version Server Info: $serverinfo Comments: $comments "; # Send e-mail mail ("hyperbookfeedback@diamond-back.com", "HyperBook Feedback",$message,"From: $email"); } # End of function - Send Feedback /* * * Function: Sign Guestbook * */ function signguestbook() { global $addquestion1, $displayadd1, $addquestion2, $displayadd2, $addquestion3, $displayadd3, $displayuin, $displayemail, $foundoptions, $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor, $homepage_title, $homepage_url, $webmaster_email, $welcome_msg, $browser, $lang, $use_captcha, $no_urls, $hide_email; $linebreak = chr(13) . "\n"; # Linebreak & line feed characters. $welcome_msg = str_replace($linebreak, "
", $welcome_msg); # Convert pipes to linebreaks. $halflength = "33"; if ($browser == "MSIE") { $halflength = "37"; } # Adjust input box length for IE $fulllength = "70"; if ($browser == "MSIE") { $fulllength = "79"; } # Adjust input box length for IE $new_name = ""; $record_name = ""; $new_date = ""; $record_date = ""; $new_email = ""; $record_email = ""; $new_url = ""; $record_url = ""; $new_website = ""; $record_website = ""; $new_icq = ""; $record_icq = ""; $new_found = ""; $record_found = ""; $new_location = ""; $record_location = ""; $new_comments = ""; $record_comments = ""; $new_ipaddress = ""; $record_ipaddress = ""; $new_remotehost = ""; $record_remotehost = ""; $new_question1 = $addquestion1; $record_question1 = ""; $new_question2 = $addquestion2; $record_question2 = ""; $new_question3 = $addquestion3; $record_question3 = ""; $new_answer1 = ""; $record_answer1 = ""; $new_answer2 = ""; $record_answer2 = ""; $new_answer3 = ""; $record_answer3 = ""; $new_adminmsg = ""; $record_adminmsg = ""; displayheader($lang[21]); ?>



: .

0) { # - Check for double post $last_record = loadrecord($totalrecords); $last_data = explode("|", $last_record); if ( $data[0] == $last_data[0] AND $data[8] == $last_data[8] ) { errormsg($lang[23],"$lang[27] $lang[28]"); } } # End If - Check for double post displayheader($lang[29]); ?>



",$linebreak, $record_comments); # Convert
to linebreaks. $record_adminmsg = str_replace("
",$linebreak, $record_adminmsg); # Convert
to linebreaks. ?>

Delete Confirmation

Please confirm you wish to DELETE:

Record #:

from your guestbook.


  CONFIRM     CANCEL  



Clear Database Confirmation

Please confirm you wish to:

Clear (Delete) the Guestbook Database.

WARNING: This action will permanently remove
all posts from your guestbook and delete the data files.


  CONFIRM     CANCEL  



Reset IP Log Confirmation

Please confirm you wish to:

Reset (Clear) the IP Log.

WARNING: This action will clear all current IP Addresses from the IP Log.
This log is used to prevent guestbook flooding (multiple posts).


  CONFIRM     CANCEL  


Check for Version Updates
You are running version:

Version Status:
Status Definitions:

No Update Required - You are running the most current version and do not need to update.

Update Available - There is a newer version of the program available but it is not necessary for you to update at this time. The newer version may contain enhanced features.

Update Recommended - There is a version of the program containing error or security fixes, you should update as soon as possible!

For more information on the most current version, please visit:
http://diamond-back.com/software/guestbook/current.php

",$linebreak, $record_comments); # Convert
to linebreaks. $record_adminmsg = str_replace($breakchar, "", $record_adminmsg); # Strip linebreaks. $record_adminmsg = str_replace("\n", "", $record_adminmsg); # Strip linefeeds. $record_adminmsg = str_replace("
",$linebreak, $record_adminmsg); # Convert
to linebreaks. $halflength = "33"; if ($browser == "MSIE") { $halflength = "37"; } # Adjust input box length for IE $fulllength = "70"; if ($browser == "MSIE") { $fulllength = "79"; } # Adjust input box length for IE displayheader("Edit Record"); ?>
Record Number: (on page )
IP Address:
Remote Host:
Date:
Guestbook Administrator's Comment:

  edit     delete  


Search Results
Search Key:
Matches Found: (Maximum records to be returned: )

= $start;$i--) { displayrecord($i,$records[$recordindex],$page); $recordindex--; } } # End of function - Display Page /* * * Function: Display Posts for Editing * */ function displayposts($page) { global $totalrecords, $perpage, $bordercolor, $tablecolor, $barcolor, $textcolor, $bartextcolor, $guestbookname, $homepage_title, $guestbookbannerurl, $signguestbookurl1, $signguestbookurl2, $homepage_url, $webmaster_email, $totalrecords, $confirm, $lang; if ($totalrecords == 0) { $totalpages = 0; } else { $totalpages = intval(($totalrecords - 1) / $perpage) + 1; } # Calculate how many pages there are. if ($page == "" OR $page > $totalpages) { $page = $totalpages; } $currentpage = $page; displayheader("$guestbookname"); if ($guestbookbannerurl != "") { print "

\n"; } # Display banner or text else { print "
\n"; print "\n"; print "
$guestbookname\n"; print "

\n"; } # End If - Display banner or text if ($homepage_title != "" AND $homepage_url != "" AND $homepage_url !="http://" ) { # Display a link back to homepage ?>

. .
ç
1) { ?>
è
:
 -


. .
ç
1) { ?>
è
:


Thank you for trying HyperBook, we hope you and your guests will enjoy using it."; $action = ""; } else { # Prompt for intial data initialsetup($possibleadminurl, $possiblepath); } } # End If - Check for DB Configuration file load_dbconfiguration(); # Load database parameters load_gbconfiguration(); # Load guestbook parameters $lang = load_language("language.conf"); # Load language configuration file $addquestion1 = stripslashes($addquestion1); $addquestion2 = stripslashes($addquestion2); $addquestion3 = stripslashes($addquestion3); $homepage_title = stripslashes($homepage_title); $guestbookname = stripslashes($guestbookname); $welcome_msg = stripslashes($welcome_msg); $thankyou_msg = stripslashes($thankyou_msg); $headertag = stripslashes($headertag); /* Security Checkpoint */ if ( md5 ($hyperbookpassword) != $adminpass AND md5 ($loginpassword) != $adminpass) { login(); } if ($newlogin == "true") { setcookie("hyperbookpassword", "$loginpassword", time() + $cookieexpiration); } if ($action == "logout") { logout(); } $time_offset = $time_hour_offset * 3600; $timestamp = time() + $time_offset; $formatted_date = date("F j, Y, g:i a",$timestamp); /* Actions */ if ($action == "configure") { configuration($possibleadminurl); } if ($action == "updateconfig") { # Update configuration $guestbookname = $new_guestbookname; $homepage_title = $new_homepage_title; $homepage_url = $new_homepage_url; $webmaster_email = $new_webmaster_email; $adminurl = $new_adminurl; $notifications = $new_notifications; $notification_email = $new_notification_email; $ipcheck = $new_ipcheck; $perpage = $new_perpage; $addquestion1 = $new_addquestion1; $displayadd1 = $new_displayadd1; $addquestion2 = $new_addquestion2; $displayadd2 = $new_displayadd2; $addquestion3 = $new_addquestion3; $displayadd3 = $new_displayadd3; $displayuin = $new_displayuin; $displayemail = $new_displayemail; $welcome_msg = $new_welcome_msg; $thankyou_msg = $new_thankyou_msg; $cookieexpiration = $new_cookieexpiration; $bannedwords = $new_bannedwords; $headertag = stripslashes($new_headertag); $time_hour_offset = $new_time_hour_offset; $use_captcha = $new_use_captcha; $no_urls = $new_no_urls; $hide_email = $new_hide_email; $break = chr(13) . "\n"; # Linebreak & line feed characters. $foundoptions = explode($break, $new_foundoptions); configurationcheck(); update_gbconfiguration(); $action = ""; $confirm = "Guestbook Configuration file has been updated."; } # End If - Update configuration if ($action == "colorconfigure") { colorconfiguration(); } if ($action == "updatecolorconfig") { # Update Color Config $bodycolor = $new_bodycolor; if (substr($bodycolor, 0, 1) != "#" AND $bodycolor != "") { $bodycolor = "#" . $bodycolor; } $bordercolor = $new_bordercolor; if (substr($bordercolor, 0, 1) != "#" AND $bordercolor != "") { $bordercolor = "#" . $bordercolor; } $tablecolor = $new_tablecolor; if (substr($tablecolor, 0, 1) != "#" AND $tablecolor != "") { $tablecolor = "#" . $tablecolor; } $barcolor = $new_barcolor; if (substr($barcolor, 0, 1) != "#" AND $barcolor != "") { $barcolor = "#" . $barcolor; } $textcolor = $new_textcolor; if (substr($textcolor, 0, 1) != "#" AND $textcolor != "") { $textcolor = "#" . $textcolor; } $bartextcolor = $new_bartextcolor; if (substr($bartextcolor, 0, 1) != "#" AND $bartextcolor != "") { $bartextcolor = "#" . $bartextcolor; } $linkcolor = $new_linkcolor; if (substr($linkcolor, 0, 1) != "#" AND $linkcolor != "") { $linkcolor = "#" . $linkcolor; } $vlinkcolor = $new_vlinkcolor; if (substr($vlinkcolor, 0, 1) != "#" AND $vlinkcolor != "") { $vlinkcolor = "#" . $vlinkcolor; } $alinkcolor = $new_alinkcolor; if (substr($alinkcolor, 0, 1) != "#" AND $alinkcolor != "") { $alinkcolor = "#" . $alinkcolor; } $hovercolor = $new_hovercolor; if (substr($hovercolor, 0, 1) == "#") { $hovercolor = substr($hovercolor, 1); } $backgroundimageurl = $new_backgroundimageurl; $guestbookbannerurl = $new_guestbookbannerurl; $signguestbookurl1 = $new_signguestbookurl1; $signguestbookurl2 = $new_signguestbookurl2; update_gbconfiguration(); $confirm = "Color/Graphic Configuration has been updated."; colorconfiguration(); } # End If - Update Color Config if ($action == "checkdb") { dbintegritycheck(); } # Check Database if ($action == "cleardatabase") { cleardatabaseconfirm(); } # Get confirmation if ($action == "clearconfirmed") { # Clear Database cleardatabase(); $confirm = "The Database has been cleared (deleted)."; $action = "dbconfigure"; # Drop back into the Database Manager } # End If - Clear Database if ($action == "dbconfigure") { dbconfiguration($possiblepath); } if ($action == "updatedbconfig") { # Update Database Configuration $datapath = $new_datapath; $perfile = $new_perfile; update_dbconfiguration(); $confirm = "Database configuration has been updated."; $action = ""; } # End If - Update Database Configuration if ($action == "updatepassword") { # Update Password updatepassword($new_adminpass,$new2_adminpass); $confirm = "The Administrative Password has been changed."; $action = ""; } # End If - Update Password if ($action == "changepassword") { changepassword(); } if ($action == "preview") { # Preview if (!isset($new_answer1)) { $new_answer1 = ""; } if (!isset($new_answer2)) { $new_answer2 = ""; } if (!isset($new_answer3)) { $new_answer3 = ""; } if (!isset($new_icq)) { $new_icq = ""; } if (!isset($new_ipaddress)) { $new_ipaddress = ""; } if (!isset($new_remotehost)) { $new_remotehost = ""; } if (!isset($new_adminmsg)) { $new_adminmsg = ""; } $new_date = $formatted_date; $data[0] = wordbreak(strip_tags($new_name), 25); $data[1] = strip_tags($new_date); $data[2] = strip_tags($new_email); $data[3] = strip_tags($new_url); $data[4] = wordbreak(strip_tags($new_website), 25); $data[5] = strip_tags($new_icq); $data[6] = wordbreak(strip_tags($new_found1), 25); if ($new_found2 != "") { $data[6] = wordbreak(strip_tags($new_found2), 25); } $data[7] = wordbreak(strip_tags($new_location), 25); $data[8] = wordbreak(strip_tags($new_comments), 44); $data[9] = $new_ipaddress; $data[10] = $new_remotehost; $data[11] = wordbreak($new_question1, 44); $data[12] = wordbreak($new_question2, 44); $data[13] = wordbreak($new_question3, 44); $data[14] = wordbreak(strip_tags($new_answer1), 44); $data[15] = wordbreak(strip_tags($new_answer2), 44); $data[16] = wordbreak(strip_tags($new_answer3), 44); $data[17] = strip_tags($new_adminmsg); $thisrecord = recordformat($data); preview($thisrecord); } # End If - Preview if ($action == "addpost") { # Add New Post if (!isset($new_answer1)) { $new_answer1 = ""; } if (!isset($new_answer2)) { $new_answer2 = ""; } if (!isset($new_answer3)) { $new_answer3 = ""; } if (!isset($new_icq)) { $new_icq = ""; } $new_date = $formatted_date; if(getenv("HTTP_X_FORWARDED_FOR")){ $new_ipaddress = getenv("HTTP_X_FORWARDED_FOR"); } else{ $new_ipaddress = getenv("REMOTE_ADDR"); } $new_remotehost = gethostbyaddr($new_ipaddress); $recordnumber = addrecord($new_name, $new_date, $new_email, $new_url, $new_website, $new_icq, $new_found, $new_location, $new_comments, $new_ipaddress, $new_remotehost, $new_question1, $new_question2, $new_question3, $new_answer1, $new_answer2, $new_answer3, $new_adminmsg); $confirm = "Post has been added to guestbook."; $action = "display"; $page = ""; } # End If - Add New Post if ($action == "delete") { deleteconfirm($record,$page); } if ($action == "deleteconfirmed") { # Delete a record delete($record); if ($page != "0") { $page = pageshift($page); $action = "display"; } else { $action = ""; } $confirm = "Post has been deleted."; } # End If - Delete a record if ($action == "sign") { signguestbook(); } if ($action == "uidsearch") { # Do a UID Search $uid = trim($uid); $record = searchdatabase($uid,"18"); # Search for matching UID in field 18 if ($record == 0) { $confirm = "No match for UID $uid was found."; $action = ""; } # No match found, drop into main menu. else { $action = "edit"; } # Match found, drop into record editor. } # End If - Do a UID Search if ($action == "namesearch") { # Do a name search $uid = trim($uid); $max_return = 25; $recordsfound = searchdatabaseall($uid,"0",$max_return); # Search for matching names in field 0, return first 10 hits. if ($recordsfound == 0) { $confirm = "No match for $uid was found."; $action = ""; } # No match found, drop into main menu. else { # At least one match was found. $number_records = sizeof($recordsfound); if ($number_records == 1) { $record = $recordsfound[0]; $action = "edit"; } # One record found, drop directly into editor. else { displaymatches($recordsfound,$max_return,$uid); } # Display all matches. } # End If - No match found } # End If - Do a name search if ($action == "edit") { # Edit a record $data = loadrecord($record); editrecord($record,$data,$page); } # End If - Edit a record if ($action == "update") { # Update a record if (!isset($new_answer1)) { $new_answer1 = ""; } if (!isset($new_answer2)) { $new_answer2 = ""; } if (!isset($new_answer3)) { $new_answer3 = ""; } if (!isset($new_icq)) { $new_icq = ""; } $data[0] = wordbreak(strip_tags($new_name), 25); $data[1] = strip_tags($new_date); $data[2] = strip_tags($new_email); $data[3] = strip_tags($new_url); $data[4] = wordbreak(strip_tags($new_website), 25); $data[5] = strip_tags($new_icq); $data[6] = wordbreak(strip_tags($new_found2), 25); if ($new_found2 == "") { $data[6] = wordbreak(strip_tags($new_found1), 25); } $data[7] = wordbreak(strip_tags($new_location), 25); $data[8] = wordbreak(strip_tags($new_comments), 44); $data[9] = $new_ipaddress; $data[10] = $new_remotehost; $data[11] = wordbreak($new_question1, 44); $data[12] = wordbreak($new_question2, 44); $data[13] = wordbreak($new_question3, 44); $data[14] = wordbreak(strip_tags($new_answer1), 44); $data[15] = wordbreak(strip_tags($new_answer2), 44); $data[16] = wordbreak(strip_tags($new_answer3), 44); $data[17] = strip_tags($new_adminmsg); $data[18] = $new_uid; $data[19] = ""; # Scrach field for future expansion $data[20] = ""; # Scrach field for future expansion $data[21] = ""; # Scrach field for future expansion $data[22] = ""; # Scrach field for future expansion $newdata = recordformat($data); updaterecord($record,$newdata); $confirm = "Post has been updated."; $action = "display"; } # End If - Update a record if ($page == "0") { $action = ""; } if ($action == "display") { displayposts($page); } # Display Posts for Editing if ($action == "resetip") { cleariplogconfirm(); } if ($action == "cleariplogconfirmed") { # Reset IP Log resetip(); $confirm = "IP Address Log has been reset."; } # End If - Reset IP Log if ($action == "updatecheck") { updatecheck(); } # Check for updates if ($action == "exportdatabase") { # Export Database exportdatabase(); $confirm = "Export Database: All records have been saved to file \"records.dat\" in the data directory."; } # End If - Export Database if ($action == "importdatabase") { # Import Database $number_imported = importdatabase(); $confirm = "Import Database: $number_imported records imported."; } # End If - Import Database if ($action == "register") { registerprogram(); } # Register Program if ($action == "sendregistration") { # Send registration e-mail sendregistration($reg_email, $reg_name, $reg_title, $reg_url, $reg_gburl, $reg_link, $reg_comments, $serverinfo); $confirm = "HyperBook registration has been sent... thank you."; } # End If - Register Program if ($action == "feedback") { feedbackform(); } # Display Feedback Form if ($action == "sendfeedback") { # Send feedback e-mail sendfeedback($fb_email, $fb_name, $fb_title, $fb_url, $fb_comments, $serverinfo); $confirm = "Feedback has been sent... thank you."; } # End If - Display Feedback Form /* * * Default Action: Display Admin Menu * */ displayheader("Guestbook Administration"); if ($confirm != "") { confirmmsg($confirm); } ?>
Guestbook Administration
The following functions will allow you to administrate your guestbook.
Display/Edit/Delete Posts Admin Log Out
Guestbook Configuration Database Manager
Color/Graphic Selection Change Password
Reset IP Address Log Check for Version Updates
Register Program (free) Feedback Form
HyperBook Documentation
Search for:
Open Guestbook