<?php
/*
OpenDataBag - Data Web Interface
Copyright (C) 2004 Nawara
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
$file=purename(get('file'));
echo '<h2>';
echo $file;
echo '</h2>';
if(file_exists(cfg_data_path.'/config/userexit/exit_'.$file.'.txt'))
{
echo '<div class="supergroup" style="width:800px;">';
myecho('Last Modification');
echo ' '.date('Y-m-d H:i',filemtime(cfg_data_path.'/config/userexit/exit_'.$file.'.txt')).'<br /><br />';
$content=file_get_contents(cfg_data_path.'/config/userexit/exit_'.$file.'.txt');
$old_pos=0;
$pos=stripos($content,'pass');
while($old_pos<$pos)
{
$pos=stripos($content,'pass');
$pos_start=strpos($content,'=',$pos);
$pos_end=strpos($content,';',$pos);
if($pos_end>$pos_start)
$content=substr($content,0,$pos_start)."= '******'; /* Password hidden */".substr($content,$pos_end+1);
$old_pos=$pos;
$pos=stripos($content,'pass',$old_pos);
}
highlight_string($content);
echo '</div>';
}
?>