<?php


$allmod = array();
$d = dir(ABSPATH . 'modules');
while (false !== ($entry = $d->read()))
{
    if (file_exists(ABSPATH . 'modules/' . $entry . '/__conf.php'))
    {
        $mod = include (ABSPATH . 'modules/' . $entry . '/__conf.php');
        $allmod = array_merge($allmod, $mod);
    }
}
$d->close();

foreach ($allmod as $k => $v)
{
    $allmod[$k]['is_install'] = !module_exists($k) && file_exists(ABSPATH .
        'modules/' . $k . '/_install.php');

    $allmod[$k]['is_update'] = file_exists(ABSPATH . 'modules/' . $k .
        '/_update.php');

    $allmod[$k]['is_uninstall'] = module_exists($k) && file_exists(ABSPATH .
        'modules/' . $k . '/_uninstall.php');

}
arg($allmod);

?>