!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\htdocs\jaime\nuevo\WebCalendar-1.0.2\   drwxrwxrwx
Free 7.96 GB of 239.26 GB (3.33%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     search_handler.php (2.98 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once 'includes/init.php';

$error "";

$keywords getValue "keywords" );
$advanced getValue "advanced" );

if ( 
strlen $keywords ) == )
  
$error translate("You must enter one or more search keywords") . ".";

$matches 0;

$search_others true;

if ( empty ( 
$users ) || empty ( $users[0] ) )
  
$search_others false;
if ( 
$login == "__public__" && $public_access_others != "Y" )
  
$search_others false;
if ( 
$readonly == "Y" || $single_user == "Y" )
  
$search_others false;

print_header();
?>

<h2><?php etranslate("Search Results")?></h2>

<?php
if ( ! empty ( $error ) ) {
  echo 
"<span style=\"font-weight:bold;\">" translate("Error") . ":</span> $error";
} else {
  
$ids = array ();
  
$words split " "$keywords );
  for ( 
$i 0$i count $words ); $i++ ) {
    
// Note: we only search approved events
    
$sql "SELECT webcal_entry.cal_id, webcal_entry.cal_name, " .
      
"webcal_entry.cal_date " .
      
"FROM webcal_entry, webcal_entry_user " .
      
"WHERE webcal_entry.cal_id = webcal_entry_user.cal_id " .
      
"AND webcal_entry_user.cal_status in ('A','W') " .
      
"AND webcal_entry_user.cal_login IN ( ";
    if ( 
$search_others ) {
      if ( empty ( 
$users[0] ) )
        
$users[0] = $login;
      for ( 
$j 0$j count $users ); $j++ ) {
        if ( 
$j )
          
$sql .= ", ";
        
$sql .= " '$users[$j]'";
      }
    } else
      
$sql .= " '$login' ";
    
$sql .= ") ";
    if ( 
$search_others ) {
      
// Don't search confidential entries of other users.
      
$sql .= "AND ( webcal_entry_user.cal_login = '$login' OR " .
        
"( webcal_entry_user.cal_login != '$login' AND " .
    
"webcal_entry.cal_access = 'P' ) ) ";
    }
    
$sql .= "AND ( UPPER(webcal_entry.cal_name) " .
      
"LIKE UPPER('%" .  $words[$i] . "%') " .
      
"OR UPPER(webcal_entry.cal_description) " .
      
"LIKE UPPER('%" .  $words[$i] . "%') ) " .
      
"ORDER BY cal_date";
    
//echo "SQL: $sql<br />";
    
$res dbi_query $sql );
    if ( 
$res ) {
      while ( 
$row dbi_fetch_row $res ) ) {
        
$matches++;
        
$idstr strval $row[0] );
        if ( empty ( 
$ids[$idstr] ) )
          
$ids[$idstr] = 1;
        else
          
$ids[$idstr]++;
        
$info[$idstr] = "$row[1] (" date_to_str ($row[2]) .
          
")";
      }
    }
    
dbi_free_result $res );
  }
}

if ( 
$matches )
  
$matches count $ids );

if ( 
$matches == )
  echo 
"<span style=\"font-weight:bold;\">$matches " translate("match found") . ".</span><br /><br />";
else if ( 
$matches )
  echo 
"<span style=\"font-weight:bold;\">$matches " translate("matches found") . ".</span><br /><br />";
else
  echo 
translate("No matches found") . ".";

// now sort by number of hits
if ( empty ( $error ) ) {
  
arsort $ids );
  echo 
"<ul>\n";
  for ( 
reset $ids ); $key key $ids ); next $ids ) ) {
    echo 
"<li><a class=\"nav\" href=\"view_entry.php?id=$key\">" $info[$key] . "</a></li>\n";
  }
  echo 
"</ul>\n";
}

?>
<br /><br />

<?php print_trailer(); ?>

</body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--