#!/usr/local/bin/php -c/usr/local/directadmin/plugins/new_lvemanager/php.ini 'index_inc.php', 'settings' => 'settings_inc.php', 'stats' => 'stats_inc.php', 'packages' => 'packages_inc.php', 'selector' => 'selector_inc.php', ); if ( array_key_exists( $page, $dispatchTable ) ) { $inclusion = $dispatchTable[$page]; $title = $page; } } function is_admin() { $command = '/usr/bin/sudo -n /usr/sbin/lvectl lve-version 2>&1'; ob_start(); passthru($command); $result = ob_get_contents(); ob_end_clean(); $regex_result = preg_match('/(?:password is required|you must have a tty)/', $result); if ( $regex_result == 1 ) { return false; } elseif ( $regex_result == 0 ) { return true; } return false; } ?>