debug = FALSE; //require_once(e_HANDLER.'form_handler.php'); $DOCS_DIRECTORY = $HELP_DIRECTORY; // Give a sensible, albeit probably invalid, value if (substr($HELP_DIRECTORY,-5,5) == 'help/') { $DOCS_DIRECTORY = substr($HELP_DIRECTORY,0,-5); // Whatever $HELP_DIRECTORY is set to, assume docs are in a subdirectory called 'help' off it } $maindirs = array('admin' => $ADMIN_DIRECTORY, 'files' => $FILES_DIRECTORY, 'images' => $IMAGES_DIRECTORY, 'themes' => $THEMES_DIRECTORY, 'plugins' => $PLUGINS_DIRECTORY, 'handlers' => $HANDLERS_DIRECTORY, 'languages' => $LANGUAGES_DIRECTORY, 'downloads' => $DOWNLOADS_DIRECTORY, 'docs' => $DOCS_DIRECTORY); foreach ($maindirs as $maindirs_key => $maindirs_value) { $coredir[$maindirs_key] = substr($maindirs_value, 0, -1); } require_once('core_image.php'); //$rs = new form; set_time_limit(18000); $e_sub_cat = 'fileinspector'; if(isset($_GET['scan'])) { session_write_close(); while (@ob_end_clean()); //header("Content-type: text/html; charset=".CHARSET, true); //$css_file = file_exists(e_THEME.$pref['admintheme'].'/'.$pref['admincss']) ? e_THEME.$pref['admintheme'].'/'.$pref['admincss'] : e_THEME.$pref['admintheme'].'/'.$pref['admincss']; // $fi = new file_inspector; $fi = e107::getSingleton('file_inspector'); echo "
".$v." | ".$k." |
".FR_LAN_2." | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
".$scan_text."
|
";
}
else
{
$text = " ";
*/
}
function exploit_interface()
{
// global $ns;
$ns = e107::getRender();
$query = http_build_query($_POST);
$text = "
";
$ns -> tablerender(FR_LAN_1, $text);
}
function headerCss()
{
$pref = e107::getPref();
echo "\n";
$e_js = e107::getJs();
// Core CSS - XXX awaiting for path changes
if (!isset($no_core_css) || !$no_core_css)
{
//echo "\n";
$e_js->otherCSS('{e_WEB_CSS}e107.css');
}
if (!deftrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
{
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
//echo "\n";
$e_js->themeCSS($css_file);
}
elseif (isset($pref['themecss']) && $pref['themecss'])
{
$css_file = file_exists(THEME.'admin_'.$pref['themecss']) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
//echo "\n";
$e_js->themeCSS($css_file);
}
else
{
$css_file = file_exists(THEME.'admin_style.css') ? 'admin_style.css' : 'style.css';
//echo "\n";
$e_js->themeCSS($css_file);
}
$e_js->renderJs('other_css', false, 'css', false);
echo "\n\n";
// Core CSS
$e_js->renderJs('core_css', false, 'css', false);
echo "\n\n";
// Plugin CSS
$e_js->renderJs('plugin_css', false, 'css', false);
echo "\n\n";
// Theme CSS
//echo "\n";
$e_js->renderJs('theme_css', false, 'css', false);
echo "\n\n";
// Inline CSS - not sure if this should stay at all!
$e_js->renderJs('inline_css', false, 'css', false);
echo "\n\n";
/*
echo "\n";
if (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE && isset($pref['admincss']) && $pref['admincss'] && file_exists(THEME.$pref['admincss'])) {
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? THEME_ABS.'admin_'.$pref['admincss'] : THEME_ABS.$pref['admincss'];
echo "\n";
} else if (isset($pref['themecss']) && $pref['themecss'] && file_exists(THEME.$pref['themecss']))
{
$css_file = file_exists(THEME.'admin_'.$pref['themecss']) ? THEME_ABS.'admin_'.$pref['themecss'] : THEME_ABS.$pref['themecss'];
echo "\n";
}
else
{
$css_file = file_exists(THEME.'admin_style.css') ? THEME_ABS.'admin_style.css' : THEME_ABS.'style.css';
echo "\n";
}
if (!isset($no_core_css) || !$no_core_css) {
echo "\n";
}
* */
}
}
function fileinspector_adminmenu() //FIXME - has problems when navigation is on the LEFT instead of the right.
{
$var['setup']['text'] = FC_LAN_11;
$var['setup']['link'] = e_SELF."?mode=setup";
$var['run']['text'] = FR_LAN_2;
$var['run']['link'] = e_SELF."?mode=run";
e107::getNav()->admin(FC_LAN_1, $_GET['mode'], $var);
}
function e_help()
{
// $fi = new file_inspector;
$fi = e107::getSingleton('file_inspector');
$list = $fi->getLegend();
$text = '';
foreach($list as $v)
{
if(!empty($v[1]))
{
$text .= "
"; echo e107::getMessage()->render(); echo $text; //$ns -> tablerender(FR_LAN_1.'...', $text); } function renderRow($stext) { $mode = $this->opt('core'); $iconKey = $stext['icon']; // return " ".$mode." ( ".$iconKey.") | getDiz($iconKey)."\">".$this->iconTag[$iconKey]." ".$stext['file']." ";
if ($this->opt('regex'))
{
if ($this->opt('num') || $this->opt('line'))
{
$text .= " |
"; } foreach ($stext['lines'] as $rkey => $rvalue) { if ($this->opt('num')) { $text .= "[".($rkey + 1)."] "; } if ($this->opt('line')) { $text .= htmlspecialchars($rvalue)." "; } } $text .= " "; } else { $text .= " ".$this -> parsesize($stext['size']);
}
$text .= " | "; } $text .= " ";
$active = "active";
if($inc >= 100)
{
$inc = 100;
$active = "";
}
echo e107::getForm()->progressBar('inspector',$inc);
/* echo '
".$diz." ";
if($total > 0)
{
echo "".$inc ."% ";
}
echo "".$v[0]." ".$v[1]." ";
}
}
return array('caption'=>FC_LAN_37, 'text'=>$text);
}
require_once(e_ADMIN.'footer.php');
function headerjs()
{
/*$c = e_IMAGE_ABS . 'fileinspector/contract.png';
$e = e_IMAGE_ABS . 'fileinspector/expand.png';
$text = '';*/
/*
* // Start of rework
e107::js('footer-inline', "
c = new Image();
c = '".SITEURLBASE.e_IMAGE_ABS."fileinspector/contract.png';
e = '".SITEURLBASE.e_IMAGE_ABS."fileinspector/expand.png';
function ec(ecid) {
icon = $('#e_' + ecid).src;
if (icon == e) {
$('#e_' + ecid).src = c;
} else {
$('#e_' + ecid).src = e;
}
div = $('#d_' + ecid).style;
if (div.display == 'none')
{
div.display = '';
}
else
{
div.display = 'none';
}
}
var hideid = 'initial';
function sh(showid)
{
if (hideid != showid)
{
show = $('#'+showid).style;
hide = $('#'+hideid).style;
show.display = '';
hide.display = 'none';
hideid = showid;
}
}
");*/
global $e107;
$text = "";
$text .= "
\n";
return $text;
}
?> |