PHITE: Code Examples

Home

> Quick Start
> Basic Concepts
> Code Examples
        • Brenda's Pictures
        • Environment
        • Call A Form
        • Edit This Page
        • Auto Links
        • Call Script
        • Popups
        • Counter
        • Example Form 1
        • Example Form 2
        • Page Redirect
        • Type test
        • Blog
        • News Feed 1
        • News Feed 2
> Tool Examples
> Choose Skin
> Contact Me
> Help
> Credits
> Downloads
> PHITE Sites

Links
PHP
TemplatePower
ZOPE
HotScripts
ScriptSearch

Phite (GitHub)
PHITE is now listed on GitHub


This page includes several sub-pages with examples of PHP code snippets. Note that the contents of every snippet is shown below the main body. That is very simply done by there being a 'CB' Center Block file in this directory, which very simply displays the contents of every file. Note that in this page it shows its own code, and in the subpages it shows the example code (through acquisition).



Files in this directory

Files in ./PT_007_Code_Examples

CB_800_Files_in_this_directory.inc

<!-- CB.inc file to display all of the code in current directory -->

<?php global $PHITE_vars;

print (
"<CENTER><h3>Files in ".$PHITE_vars['PHITE_selfdir']."</h3><TABLE WIDTH='80%' border='1'><tr><td>");
$d=dir($PHITE_vars['PHITE_selfdir']);
while (
$file=$d->read())

  if (
strtolower(substr(strrchr($file,'.'),1))=='inc')
  {
    print(
"<TR><TD><center><b>".$file."</b></center><p>");
    
show_source($PHITE_vars['PHITE_selfdir'].'/'.$file);
    print(
"</TR>");
  }
}
print(
"</TABLE></center>");

print (
"<CENTER><TABLE WIDTH='80%' border='1'><tr><td>");
$d=dir($PHITE_vars['PHITE_selfdir']);
while (
$file=$d->read())

  if (
strtolower(substr(strrchr($file,'.'),1))=='txt')
  {
    print(
"<TR><TD><center><b>".$file."</b></center><p>");
    
show_source($PHITE_vars['PHITE_selfdir'].'/'.$file);
    print(
"</TR>");
  }
}
print(
"</TABLE></center>");

?>

RB_001_File__fslFolder_List.inc

<!-- Directory listing right block -->

<?php global $PHITE_vars;

$d=dir($PHITE_vars['PHITE_selfdir']);
while (
$file=$d->read())

  if (
substr($file,0,1)!='.')print($file."<br>");
}
?>

body.inc

This page includes several sub-pages with examples of PHP code snippets. 

Note that the contents of every snippet is shown below the main body. 

That is very simply done by there being a 'CB' Center Block file in this directory, 
which very simply displays the contents of every file. Note that in this page it 
shows its own code, and in the subpages it shows the example code (through acquisition).

File/Folder List
CB_800_Files_in_this_directory.inc
PT_009_Brenda__apos_Pictures
RB_001_File__fslFolder_List.inc
PT_040_Call_Script
PT_050_Counter
PT_010_Environment
body.inc
PT_055_Example_Form_1
PT_030_Auto_Links
PT_060_Page_Redirect
PT_056_Example_Form_2
PT_071_News_Feed_1
PT_070_Blog
PT_071_News_Feed_2
PT_020_Edit_This_Page
PT_060_Type_test
PT_015_Call_A_Form
PT_040_Popups

 
Chris Robson 2002, Tom Brennfleck 2009
Privacy        Disclaimer
Online: 1    Today: 1    Total: 5,817
Powered by Phite