/[locfinder]/locfinder/index.php
ViewVC logotype

Diff of /locfinder/index.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by yob, Fri Jan 24 11:06:59 2003 UTC revision 1.8 by yob, Thu Feb 13 07:10:43 2003 UTC
# Line 26  Line 26 
26   *   *
27   ***************************************************************************/   ***************************************************************************/
28    
29    // File listing function
30    function filelist ($currentdir, $startdir=NULL, $files=array()) {
31    
32        chdir ($currentdir);
33    
34        // remember where we started from
35        if (!$startdir) {
36        
37            $startdir = $currentdir;
38    
39        }
40    
41        $d = opendir (".");
42    
43        //list the files in the dir
44        while ($file = readdir ($d)) {
45    
46            if ($file != ".." && $file != ".") {
47    
48                if ($file == "CVS") {
49            
50                    // Do nothing
51    
52                } elseif (is_dir ($file)) {
53    
54                    // If $file is a directory take a look inside
55                    $files = filelist (getcwd().'/'.$file, getcwd(), $files);
56    
57                } else {
58    
59                    // If $ file is not a directory then add it to our output array
60                    $files[] = getcwd() . "/" . $file;
61    
62                }
63            }
64        }
65    
66        closedir ($d);
67        chdir ($startdir);
68        return $files;
69    }
70    
71    // start session managment
72  session_start();  session_start();
73    
74    // include the config file
75  include("config.php");  include("config.php");
76    
 // create 3 instances of the DB class  
 //     more than one required for nested loops, etc  
77  $loc_db = new locDatabase;  $loc_db = new locDatabase;
78  $loc_db_2 = new locDatabase;  $loc_db_2 = new locDatabase;
79  $loc_db_3 = new locDatabase;  $loc_db_3 = new locDatabase;
80    
81  $in_locfinder = true;  $in_locfinder = true;
82    
83  include_once("./functions/func_stats.php");  // get function filenames
84  include_once('./functions/func_iprouting.php');  $files = filelist("./functions/","..");
85  include_once('./functions/func_mapping.php');  
86  include_once("./functions/func_node.php");  $total_files = count($files);
87  include_once("./functions/func_emails.php");  
88  include_once("./functions/func_users.php");  //include each function file
89  include_once("./functions/func_admin.php");  for ($i = 0; $i < $total_files; $i++) {
90    
91        include($files[$i]);
92    
93  if (isset($action)) {  }
94    
95    if ((isset($action)) && (!isset($page))) {
96    
97      include("action/action.php");      include("action/action.php");
98    
99  } else {  } else {
100    
101        if (!isset($page)) {
102    
103            $passed_var = each($GLOBALS["HTTP_GET_VARS"]);
104    
105            if ($passed_var['key'] == "")
106               $page = "front";
107            else
108                $page = $passed_var['key'];
109    
110        }
111    
112      ob_start();      ob_start();
113    
114      include("themes/" . $opt_theme . "/" . $opt_theme . ".php");      include("themes/" . $opt_theme . "/" . $opt_theme . ".php");

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26