Changeset 64
- Timestamp:
- 07/16/05 13:30:46
- Files:
-
- trunk/include/patConfiguration.php (deleted)
- trunk/include/patTemplate.php (deleted)
- trunk/include/patXMLRendererAdmin.php (modified) (13 diffs)
- trunk/include/patXMLRendererAdminFunctions.php (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/patXMLRendererAdmin.php
r2 r64 319 319 $this->tmpl->readTemplatesFromFile( "patXMLRenderer.tmpl" ); 320 320 321 switch( $this->variables["mode"] )321 switch( @$this->variables["mode"] ) 322 322 { 323 323 // statistics … … 325 325 $this->tmpl->readTemplatesFromFile( "patXMLRendererStatistics.tmpl" ); 326 326 327 switch( $this->variables["submode"] )327 switch( @$this->variables["submode"] ) 328 328 { 329 329 case "general": … … 350 350 $this->tmpl->readTemplatesFromFile( "patXMLRendererExtensions.tmpl" ); 351 351 352 switch( $this->variables["submode"] )352 switch( @$this->variables["submode"] ) 353 353 { 354 354 case "detail": … … 399 399 $this->variables = $this->extras->getRequestVariables(); 400 400 401 $this->dispatcher = $ GLOBALS["PHP_SELF"]."?";401 $this->dispatcher = $_SERVER['PHP_SELF'].'?'; 402 402 403 403 if( defined( "SID" ) ) … … 427 427 $GLOBALS["sortDir"] = $this->variables["sortDir"] ? $this->variables["sortDir"] : "desc"; 428 428 if( is_array( $stats ) ) 429 usort( $stats, "sortLogFile");429 usort( $stats, array(&$this,"sortLogFile") ); 430 430 $this->tmpl->addGlobalVar( "orderby", $GLOBALS["sortField"] ); 431 431 $this->tmpl->addGlobalVar( "sortDir", $GLOBALS["sortDir"] ); … … 477 477 $GLOBALS["sortDir"] = isset( $this->variables["sortdir"] ) ? $this->variables["sortdir"] : "desc"; 478 478 if( is_array( $visits ) ) 479 usort( $visits, "sortLogFile");479 usort( $visits, array(&$this,"sortLogFile") ); 480 480 $this->tmpl->addGlobalVar( "orderby", $GLOBALS["sortField"] ); 481 481 $this->tmpl->addGlobalVar( "sortDir", $GLOBALS["sortDir"] ); … … 506 506 $GLOBALS["sortDir"] = isset( $this->variables["sortdir"] ) ? $this->variables["sortdir"] : "asc"; 507 507 if( is_array( $visits ) ) 508 usort( $visit, "sortLogFile");508 usort( $visit, array(&$this,"sortLogFile") ); 509 509 $this->tmpl->addGlobalVar( "orderby", $GLOBALS["sortField"] ); 510 510 $this->tmpl->addGlobalVar( "sortDir", $GLOBALS["sortDir"] ); … … 544 544 $GLOBALS["sortDir"] = $this->variables["sortdir"] ? $this->variables["sortdir"] : "desc"; 545 545 if( is_array( $referers ) ) 546 usort( $referers, "sortLogFile");546 usort( $referers, array(&$this,"sortLogFile") ); 547 547 548 548 $this->tmpl->addRows( "referer_detail_entry", $referers ); … … 556 556 $GLOBALS["sortDir"] = $this->variables["sortdir"] ? $this->variables["sortdir"] : "desc"; 557 557 if( is_array( $referers ) ) 558 usort( $referers, "sortLogFile");558 usort( $referers, array(&$this,"sortLogFile") ); 559 559 $this->tmpl->addGlobalVar( "orderby", $GLOBALS["sortField"] ); 560 560 $this->tmpl->addGlobalVar( "sortDir", $GLOBALS["sortDir"] ); … … 766 766 $GLOBALS["sortField"] = "name"; 767 767 $GLOBALS["sortDir"] = "asc"; 768 usort( $ext, "sortLogFile");768 usort( $ext, array(&$this,"sortLogFile") ); 769 769 return $ext; 770 770 } … … 831 831 $destFolder = $this->extras->getSessionValue( "destFolder" ); 832 832 833 $documentRoot = str_replace( $ this->extras->getServerVar( "PHP_SELF" ), "", $this->extras->getServerVar( "PATH_TRANSLATED" ));834 835 $destUrl = "http://".str_replace( $documentRoot, $ this->extras->getEnvVar( "HOSTNAME" ), $destFolder );833 $documentRoot = str_replace( $_SERVER["PHP_SELF"], "", $_SERVER["PATH_TRANSLATED"] ); 834 835 $destUrl = "http://".str_replace( $documentRoot, $_ENV["HOSTNAME"], $destFolder ); 836 836 837 837 $tmp = $this->getAvailableFiles( $destFolder ); … … 1061 1061 else 1062 1062 { 1063 $host = $ this->extras->getEnvVar( "HOSTNAME" );1064 $self = $ this->extras->getServerVar( "PHP_SELF" );1063 $host = $_ENV["HOSTNAME"]; 1064 $self = $_SERVER["PHP_SELF"]; 1065 1065 1066 1066 $data = array( … … 1163 1163 return false; 1164 1164 } 1165 1166 /** 1167 * used to sort two dimensional array 1168 * use the global vars $sorftField and $sortDir 1169 * 1170 * @access public 1171 */ 1172 function sortLogFile( $a, $b ) 1173 { 1174 global $sortField; 1175 global $sortDir; 1176 1177 if( strtolower( $a[$sortField] ) == strtolower( $b[$sortField] ) ) 1178 return 0; 1179 1180 if( $sortDir == "asc" ) 1181 return( strtolower( $a[$sortField] ) < strtolower( $b[$sortField] ) ) ? -1 : 1; 1182 else 1183 return( strtolower( $a[$sortField] ) > strtolower( $b[$sortField] ) ) ? -1 : 1; 1184 } 1185 1165 1186 } 1187 1166 1188 ?>
