".$HANDLERS_DIRECTORY."htmlarea/
".$ADMIN_DIRECTORY."htmlarea/
";
$ns -> tablerender(ADLAN_ERR_1, $text);*/
$mes->addWarning($HANDLERS_DIRECTORY."htmlarea/
".$ADMIN_DIRECTORY."htmlarea/");
}
/* Not used in 0.8
// check for old modules.
if(getperms('0') && isset($pref['modules']) && $pref['modules'] && $sql->db_Field("plugin",5) == "plugin_addons")
{
$mods=explode(",", $pref['modules']);
$thef = "e_module.php";
foreach ($mods as $mod)
{
if (is_readable(e_PLUGIN."{$mod}/module.php"))
{
$mod_found[] = e_PLUGIN."{$mod}/module.php";
}
}
if($mod_found)
{
$text = ADLAN_ERR_5." ".$thef.":
";
foreach($mod_found as $val){
$text .= "- ".str_replace("../","",$val)."
\n";
}
$text .="
";
$ns -> tablerender(ADLAN_ERR_4,$text);
}
}
*/
// check for file-types;
$allowed_types = get_filetypes(); // Get allowed types according to filetypes.xml or filetypes.php
if (count($allowed_types) == 0)
{
$allowed_types = array('zip' => 1, 'gz' => 1, 'jpg' => 1, 'png' => 1, 'gif' => 1);
$mes->addInfo("Setting default filetypes: ".implode(', ',array_keys($allowed_types)));
}
//echo "Allowed filetypes = ".implode(', ',array_keys($allowed_types)).'
';
// avatar check.
$public = array(e_UPLOAD, e_UPLOAD.'avatars');
$exceptions = array(".","..","/","CVS","avatars","Thumbs.db",".ftpquota",".htaccess","php.ini",".cvsignore",'e107.htaccess');
//TODO use $file-class to grab list and perform this check.
foreach ($public as $dir)
{
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false)
{
if (is_dir($dir."/".$file) == FALSE && !in_array($file,$exceptions))
{
$fext = substr(strrchr($file, "."), 1);
if (!array_key_exists(strtolower($fext),$allowed_types) )
{
if ($file == 'index.html' || $file == "null.txt")
{
if (filesize($dir.'/'.$file))
{
$potential[] = str_replace('../', '', $dir).'/'.$file;
}
}
else
{
$potential[] = str_replace('../', '', $dir).'/'.$file;
}
}
}
}
closedir($dh);
}
}
}
if (isset($potential))
{
//$text = ADLAN_ERR_3."
";
$mes->addWarning(ADLAN_ERR_3);
$text = '';
foreach ($potential as $p_file)
{
$text .= '- '.$p_file.'
';
}
$mes->addWarning($text);
//$ns -> tablerender(ADLAN_ERR_1, $text);
}
// ---------------------------------------------------------
// auto db update
if ('0' == ADMINPERMS)
{
require_once(e_ADMIN.'update_routines.php');
update_check();
}
// end auto db update
/*
if (e_QUERY == 'purge' && getperms('0'))
{
$admin_log->purge_log_events(false);
}
*/
$td = 1;
// DEPRECATED
function render_links($link, $title, $description, $perms, $icon = FALSE, $mode = FALSE)
{
return e107::getNav()->renderAdminButton($link, $title, $description, $perms, $icon, $mode);
}
function render_clean() // still used by classis, tabbed etc.
{
global $td;
$text = "";
while ($td <= ADLINK_COLS)
{
$text .= " | ";
$td++;
}
$text .= "";
$td = 1;
return $text;
}
if(is_object($adp))
{
$adp->render();
}
else
{
require_once(e_ADMIN.'includes/'.$pref['adminstyle'].'.php');
}
function admin_info()
{
global $tp;
$width = (getperms('0')) ? "33%" : "50%";
$ADMIN_INFO_TEMPLATE = "
{ADMIN_STATUS}
|
{ADMIN_LATEST}
| ";
if(getperms('0'))
{
$ADMIN_INFO_TEMPLATE .= "
{ADMIN_LOG} | ";
}
$ADMIN_INFO_TEMPLATE .= "
";
return $tp->parseTemplate($ADMIN_INFO_TEMPLATE);
}
function status_request()
{
global $pref;
if ($pref['adminstyle'] == 'classis' || $pref['adminstyle'] == 'cascade' || $pref['adminstyle'] == 'beginner' || $pref['adminstyle'] == 'tabbed') {
return TRUE;
} else {
return FALSE;
}
}
function latest_request()
{
global $pref;
if ($pref['adminstyle'] == 'classis' || $pref['adminstyle'] == 'cascade' || $pref['adminstyle'] == 'beginner' || $pref['adminstyle'] == 'tabbed') {
return TRUE;
} else {
return FALSE;
}
}
function log_request()
{
global $pref;
if ($pref['adminstyle'] == 'classis' || $pref['adminstyle'] == 'cascade'|| $pref['adminstyle'] == 'beginner' || $pref['adminstyle'] == 'tabbed') {
return TRUE;
} else {
return FALSE;
}
}
// getPlugLinks() - moved to sitelinks_class.php : pluginLinks();
require_once("footer.php");
?>