Example #1
0
define('LDAP_LOGIN_PATH', __DIR__ . '/');
define('LDAP_LOGIN_ADMIN', get_root_url() . 'admin.php?page=plugin-' . LDAP_LOGIN_ID);
define('LDAP_LOGIN_VERSION', '1.2');
include_once LDAP_LOGIN_PATH . '/class.ldap.php';
// +-----------------------------------------------------------------------+
// | Event handlers                                                        |
// +-----------------------------------------------------------------------+
add_event_handler('init', 'ld_init');
add_event_handler('try_log_user', 'login', 0, 4);
add_event_handler('get_admin_plugin_menu_links', array(&$ldap, 'ldap_admin_menu'));
// +-----------------------------------------------------------------------+
// | Admin menu loading                                                    |
// +-----------------------------------------------------------------------+
$ldap = new Ldap();
$ldap->load_config();
set_plugin_data($plugin['id'], $ldap);
unset($ldap);
// +-----------------------------------------------------------------------+
// | functions                                                             |
// +-----------------------------------------------------------------------+
function random_password($length = 8)
{
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#\$%^&*()_-=+;:,.?";
    $password = substr(str_shuffle($chars), 0, $length);
    return $password;
}
function ld_init()
{
    load_language('plugin.lang', LDAP_LOGIN_PATH);
    global $conf;
}
}
include 'template/header.php';
?>
<div class="content-box">
	<p>Sistemde olan eklentiler listeleniyor..</p>
	<p>Merhaba , burada sistemde olan eklentileri aktif veya pasif hale getirebilirsin.</p>
	<table class="table">
		<thead>
			<tr>
				<td>Eklenti Bilgileri</td>
			</tr>
		</thead>
		<tbody>
			<?php 
foreach (get_plugins() as $plugin) {
    set_plugin_data($plugin);
    ?>
			<tr>
				<td>
					<span class="name">
						<?php 
    echo plugin_name();
    ?>
						- adlı eklenti şu anda : <?php 
    echo is_active_plugin() ? '<font color="green">aktif</font>' : '<font color="red">pasif</font>';
    ?>
					</span>
					<span class="author"><?php 
    echo plugin_author();
    ?>
					</span>