!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:     view_l.php (8.85 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
 * $Id: view_l.php,v 1.33 2005/03/21 22:16:07 umcesrjones Exp $
 *
 * Page Description:
 * This page will display the month "view" with all users's events
 * on the same calendar.  (The other month "view" displays each user
 * calendar in a separate column, side-by-side.)  This view gives you
 * the same effect as enabling layers, but with layers you can only
 * have one configuration of users.
 *
 * Input Parameters:
 * id (*) - specify view id in webcal_view table
 * date - specify the starting date of the view.
 *   If not specified, current date will be used.
 * friendly - if set to 1, then page does not include links or
 *   trailer navigation.
 * (*) required field
 *
 * Security:
 * Must have "allow view others" enabled ($allow_view_other) in
 *   System Settings unless the user is an admin user ($is_admin).
 * If the view is not global, the user must be owner of the view.
 * If the view is global, then and user_sees_only_his_groups is
 * enabled, then we remove users not in this user's groups
 * (except for nonuser calendars... which we allow regardless of group).
 */

include_once 'includes/init.php';

$error "";

if ( 
$allow_view_other == "N" && ! $is_admin ) {
  
// not allowed...
  
send_to_preferred_view ();
}
if ( empty ( 
$id ) ) {
  
do_redirect "views.php" );
}

// Find view name in $views[]
$view_name "";
for ( 
$i 0$i count $views ); $i++ ) {
  if ( 
$views[$i]['cal_view_id'] == $id ) {
    
$view_name $views[$i]['cal_name'];
  }
}

// If view_name not found, then the specified view id does not
// belong to current user. 
if ( empty ( $view_name ) ) {
  
$error translate "You are not authorized" );
}

$INC = array('js/popups.php');
print_header($INC);

set_today($date);

$next mktime 300$thismonth 11$thisyear );
$nextyear date "Y"$next );
$nextmonth date "m"$next );
$nextdate sprintf "%04d%02d01"$nextyear$nextmonth );

$prev mktime 300$thismonth 11$thisyear );
$prevyear date "Y"$prev );
$prevmonth date "m"$prev );
$prevdate sprintf "%04d%02d01"$prevyear$prevmonth );

if ( ! empty ( 
$bold_days_in_year ) && $bold_days_in_year == 'Y' ) {
  
$boldDays true;
  
$startdate sprintf "%04d%02d01"$prevyear$prevmonth );
  
$enddate sprintf "%04d%02d31"$nextyear$nextmonth );
} else {
  
$boldDays false;
  
$startdate sprintf "%04d%02d01"$thisyear$thismonth );
  
$enddate sprintf "%04d%02d31"$thisyear$thismonth );
}

$monthstart mktime 300$thismonth1$thisyear );
$monthend mktime 300$thismonth 10$thisyear );

$thisdate $startdate;

// get users in this view
$res dbi_query (
  
"SELECT cal_login FROM webcal_view_user WHERE cal_view_id = $id);
$viewusers = array ();
$all_users false;
if ( 
$res ) {
  while ( 
$row dbi_fetch_row $res ) ) {
    
$viewusers[] = $row[0]; 
    if ( 
$row[0] == "__all__" ) {
      
$all_users true;
    }
  }
  
dbi_free_result $res );
} else {
  
$error translate "Database error" ) . ": " dbi_error ();
}
if ( 
$all_users ) {
  
$viewusers = array ();
  
$users get_my_users ();
  for ( 
$i 0$i count $users ); $i++ ) {
    
$viewusers[] = $users[$i]['cal_login'];
  }
} else {
  
// Make sure this user is allowed to see all users in this view
  // If this is a global view, it may include users that this user
  // is not allowed to see.
  
if ( ! empty ( $user_sees_only_his_groups ) &&
    
$user_sees_only_his_groups == 'Y' ) {
    
$myusers get_my_users ();
    if ( ! empty ( 
$nonuser_enabled ) && $nonuser_enabled == "Y" ) {
      
$myusers array_merge $myusersget_nonuser_cals () );
    }
    
$userlookup = array();
    for ( 
$i 0$i count $myusers ); $i++ ) {
      
$userlookup[$myusers[$i]['cal_login']] = 1;
    }
    
$newlist = array ();
    for ( 
$i 0$i count $viewusers ); $i++ ) {
      if ( ! empty ( 
$userlookup[$viewusers[$i]] ) ) {
        
$newlist[] = $viewusers[$i];
      }
    }
    
$viewusers $newlist;
  }
}
if ( 
count $viewusers ) == ) {
  
// This could happen if user_sees_only_his_groups  = Y and
  // this user is not a member of any  group assigned to this view
  
$error translate "No users for this view" );
}

if ( ! empty ( 
$error ) ) {
  echo 
"<h2>" translate "Error" ) .
    
"</h2>\n" $error;
  
print_trailer ();
  exit;
}

$e_save = array ();
$re_save = array ();
for ( 
$i 0$i count $viewusers ); $i++ ) {
  
/* Pre-Load the repeated events for quckier access */
  
$repeated_events read_repeated_events $viewusers[$i], ""$startdate ); 
  
$re_save array_merge($re_save$repeated_events);
  
/* Pre-load the non-repeating events for quicker access */
  
$events read_events $viewusers[$i], $startdate$enddate );
  
$e_save array_merge($e_save$events);

$events = array ();
$repeated_events = array ();

for ( 
$i 0$i count $e_save ); $i++ ) {
  
$should_add 1;
  for ( 
$j 0$j count $events ) && $should_add$j++ ) {
    if ( 
$e_save[$i]['cal_id'] == $events[$j]['cal_id'] ) {
      
$should_add 0;
    }
  }
  if ( 
$should_add ) {
    
array_push $events$e_save[$i] );
  }
}

for ( 
$i 0$i count $re_save ); $i++ ) {
  
$should_add 1;
  for ( 
$j 0$j count $repeated_events ) && $should_add$j++ ) {
    if ( 
$re_save[$i]['cal_id'] == $repeated_events[$j]['cal_id'] ) {
      
$should_add 0;
    }
  }
  if ( 
$should_add ) {
    
array_push $repeated_events$re_save[$i] );
  }
}

display_small_month $prevmonth$prevyeartruetrue"prevmonth"
  
"view_l.php?id=$id&amp;" );
display_small_month $nextmonth$nextyeartruetrue"nextmonth"
  
"view_l.php?id=$id&amp;" );
?>

<div class="title">
<span class="date"><br /><?php
  
echo date_to_str sprintf "%04d%02d01"$thisyear$thismonth ),
    
$DATE_FORMAT_MYfalsefalse );
?></span>
<span class="viewname"><br /><?php echo $view_name?></span></div>
<br /><br /><br /><br />

<table class="main" style="clear:both;" cellspacing="0" cellpadding="0">
<tr>
<?php if ( $WEEK_START == ) { ?>
<th class="weekend"><?php etranslate("Sun")?></th>
<?php ?>
<th><?php etranslate("Mon")?></th>
<th><?php etranslate("Tue")?></th>
<th><?php etranslate("Wed")?></th>
<th><?php etranslate("Thu")?></th>
<th><?php etranslate("Fri")?></th>
<th class="weekend"><?php etranslate("Sat")?></th>
<?php if ( $WEEK_START == ) { ?>
<th class="weekend"><?php etranslate("Sun")?></th>
<?php ?>
</tr>
<?php
// We add 2 hours on to the time so that the switch to DST doesn't
// throw us off.  So, all our dates are 2AM for that day.
//$sun = get_sunday_before ( $thisyear, $thismonth, 1 );
if ( $WEEK_START == ) {
  
$wkstart get_monday_before $thisyear$thismonth);
} else {
  
$wkstart get_sunday_before $thisyear$thismonth);
}
// generate values for first day and last day of month
$monthstart mktime 300$thismonth1$thisyear );
$monthend mktime 300$thismonth 10$thisyear );

// debugging
//echo "<br />sun = " . date ( "D, m-d-Y", $sun ) . "<br />";
//echo "<br />monthstart = " . date ( "D, m-d-Y", $monthstart ) . "<br />";
//echo "<br />monthend = " . date ( "D, m-d-Y", $monthend ) . "<br />";

//NOTE: if you make HTML changes to this table, make the same changes
//to the example table in pref.php.
for ( $i $wkstartdate "Ymd"$i ) <= date "Ymd"$monthend );
  
$i += ( 24 3600 ) ) {
  print 
"<tr>\n";
  for ( 
$j 0$j 7$j++ ) {
    
$date $i + ( $j 24 3600 );
    if ( 
date "Ymd"$date ) >= date "Ymd"$monthstart ) &&
      
date "Ymd"$date ) <= date "Ymd"$monthend ) ) {
      
$thiswday date "w"$date );
      
$is_weekend = ( $thiswday == || $thiswday == );
      if ( empty ( 
$WEEKENDBG ) ) $is_weekend false;
      print 
"<td";
      
$class "";
      if ( 
date "Ymd"$date  ) == date "Ymd"$today ) ) {
        
$class "today";
      }
      if ( 
$is_weekend ) {
        if ( 
strlen $class ) ) $class .= " ";
        
$class .= "weekend";
      }
      if ( 
strlen $class ) ) echo " class=\"$class\"";
      echo 
">";
 
//echo date ( "D, m-d-Y H:i:s", $date ) . "<br />";
      
print_date_entries date "Ymd"$date ),
        ( ! empty ( 
$user ) ) ? $user $loginfalse );
      print 
"</td>\n";
    } else {
      print 
"<td>&nbsp;</td>\n";
    }
  }
  print 
"</tr>\n";
}
?>
</table><br />

<?php
if ( ! empty ( $eventinfo ) ) {
  echo 
$eventinfo;
}

display_unapproved_events ( ( $is_assistant || 
  
$is_nonuser_admin $user $login ) );
?>

<br />
<a title="<?php 
 etranslate
("Generate printer-friendly version")
?>" class="printer" href="view_l.php?id=<?php echo $id?>&amp;<?php
 
if ( $thisyear ) {
  echo 
"year=$thisyear&amp;month=$thismonth&amp;";
 }
 if ( ! empty ( 
$user ) ) echo "user=$user&amp;";
 if ( ! empty ( 
$cat_id ) ) echo "cat_id=$cat_id&amp;";
?>friendly=1" target="cal_printer_friendly" onmouseover="window.status = '<?php 
 etranslate
("Generate printer-friendly version")?>'">[<?php 
 etranslate
("Printer Friendly")?>]</a>

<?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.0156 ]--