From: Juliette W. <jv...@us...> - 2005-06-14 15:50:17
|
Update of /cvsroot/stack/stack-1-0/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8717/other Modified Files: Tag: frontend_dev ListMenu.php Log Message: Added default action to process_input.php Fixed registration screen warning. Index: ListMenu.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/other/ListMenu.php,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** ListMenu.php 27 Mar 2005 17:53:31 -0000 1.2 --- ListMenu.php 14 Jun 2005 15:50:07 -0000 1.2.4.1 *************** *** 54,57 **** --- 54,58 ---- * @package Menu */ + class ListMenu { *************** *** 128,137 **** */ function ListMenu($basepath, $menufile) ! { $this->_basepath=$basepath; //open menu file ! $menufile='http://'.$_SERVER['SERVER_NAME'].$basepath.$menufile; $handle=@fopen($menufile, 'r'); if (!$handle) { die('<strong>ListMenu was unable to open the menu-structure file: '.$menufile. --- 129,140 ---- */ function ListMenu($basepath, $menufile) ! { $this->_basepath=$basepath; //open menu file ! // $menufile='http://'.$_SERVER['SERVER_NAME'].$basepath.$menufile; ! $handle=@fopen($menufile, 'r'); + if (!$handle) { die('<strong>ListMenu was unable to open the menu-structure file: '.$menufile. *************** *** 140,148 **** ); } ! //sequentially parse each line of file $CurrNodeIndex=0; while ($buffer=fgets($handle, 4096)) { ! $buffer=trim($buffer); --- 143,151 ---- ); } ! //sequentially parse each line of file $CurrNodeIndex=0; while ($buffer=fgets($handle, 4096)) { ! $buffer=trim($buffer); *************** *** 158,162 **** continue; } ! //parse text, link, and target list($text, $link, $target)=array_pad(explode('|',substr($buffer,$level)),3,''); --- 161,165 ---- continue; } ! //parse text, link, and target list($text, $link, $target)=array_pad(explode('|',substr($buffer,$level)),3,''); *************** *** 169,173 **** $parsedURL['scheme']="http"; ! $parsedURL['host']=$_SERVER['SERVER_NAME']; //if link is empty, link to this page --- 172,176 ---- $parsedURL['scheme']="http"; ! $parsedURL['host']=$_SERVER['SERVER_NAME'].'/'; //if link is empty, link to this page *************** *** 202,209 **** 'visible'=>1 ); ! $CurrNodeIndex++; }//end while fclose($handle); --- 205,213 ---- 'visible'=>1 ); ! $CurrNodeIndex++; }//end while + fclose($handle); *************** *** 257,264 **** $PrevLevel=0; $stack=array(); - //build unordered list for ($CurrNodeIndex=0; $CurrNodeIndex<count($menu); $CurrNodeIndex++) { - // ignore invisible nodes if ($menu[$CurrNodeIndex]['visible']==0) { --- 261,266 ---- |