/*
--------------------------------------------------------------
PHP Trailing Solution
--------------------------------------------------------------
Code developed by: Tahir Ata Barry (Also know as phpMax among the PHP folks).
Email: tabarry@email.com or tabarry@sulata.com.pk
Company: Sulata iSoft, Lahore, Pakistan
Web Site: http://www.sulata.com.pk
Development Date: October 6, 2001
Code available at: http://www.sulata.com.pk/trail
Server requirement: A web server supporting PHP scripting language.
Browser Requirement: Any browser that supports cookies (nowadays all of them do).
Instructions:
1. This code has been developed to provide a generic trailing solution.
2. Just add this code to every page that requires to be added it trail.
3. The first defined variable is $title, which must be different for every page is the trail.
4. This title will be displayed as hyperlink text in the trail.
5. If you do not want to copy and paste this all file in every trail page, just remove
the $title from this file and define it at the top of every php file to be included in trail.
6. In such a case, the $title must be defined before the include file.
7. This code uses cookies to store trail, so browsers must be enabled to store cookies.
8. You can also control font face and font size from this page by defining the $font_name and $font_size variable.
9. $path is a varible which gets the path of the current file.
It uses getenv("SCRIPT_NAME") environment variable to get the path of the file. If this is not supported by you server, then you can also use getenv("PATH_INFO") environment variable.
The best way is to check it with phpinfo() function.
10. After you have set the variable on this page, in your page where you want to show the trial, just add a php variable like this:
Warning: Undefined variable $trail in ../includes/trail.php on line 28
or
Warning: Undefined variable $trail in ../includes/trail.php on line 28
--------------------------------------------------------------
*/
// The $title is the hyperlink test of a page. This must be different for every page in the trail.
// $title = "Home Page";
$path = getenv("SCRIPT_NAME");
$path = "$title";
// If you want to control font face and size from PHP, set the font name and size as per your requirement.
$font_name = "verdana";
$font_size = "2";
// Code begins here....
$old_value = $HTTP_COOKIE_VARS["my_trail"];
if (strstr($old_value,$path)) {
$new_value = $old_value;
setcookie("my_trail",$new_value,time()+14400,"/","",0);
} else {
if($old_value!=""){
$new_value = "$old_value > $path";
setcookie("my_trail",$new_value,time()+14400,"/","",0);
}else{
$new_value = "$path";
setcookie("my_trail",$new_value,time()+14400,"/","",0);
}
}
$trail = "$new_value";
$splitter = explode($path,$trail);
// Use the option one from below if you want php to set font properties or the option to to define it your self. Just un-comment the option that you do not need.
//$trail = "$splitter[0] $title";
$trail = "$splitter[0] $title";
?>
This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.
Warning: include(../includes/text_file_hit_counter.php): Failed to open stream: No such file or directory in /sdf/www/nz/p/petercon/cyberculture/index.php on line 46
Warning: include(): Failed opening '../includes/text_file_hit_counter.php' for inclusion (include_path='.:/usr/pkg/lib/php82') in /sdf/www/nz/p/petercon/cyberculture/index.php on line 46
These are a few of my Favorite Places on the Web. I hope you like them as much as I do. If you have a Favorite Place you think I might like please let me know about it by filling out my Feedback Form. I'll check it out and add it to the list if I like it. I like to keep this list short so it has to be really good to get on here!
Computers and the Net are the future. Community networks are as important to society as public libraries. Some of the aspects of community that can be placed on-line include information on arts and crafts fairs and classes, writing workshops, local dance and theater events, homework hotlines, parent's forums, on-line education, e-mail to local government agencies and District Supervisors, Board agendas and public meeting schedules, forums on local issues, legal documents from government on-line, social services information, job listings, forums for unemployed workers, library catalogs on-line, ethnic and alternative newspapers, letters to the editors of newspapers, and civic journalism projects.
These pages shamelessly designed for DHTML compliant
browsers using HTML
level 4 with CSS level 2 stylesheets
, JavaScript and Java applets.