Exemplo n.º 1
0
<?php

theme::header_start('Successful Logins', 'View successful logins');
Plugin_search_sort::field();
if (count($records) > 0) {
    o_dialog::confirm_button($controller_path . '/flush/90', '90 Days+', 'trash', 'Successful Logins', 'Do you want to delete successful logins greater then 90 days', ['redirect' => 'true']);
    o_dialog::confirm_button($controller_path . '/flush/30', '30 Days+', 'trash', 'Successful Logins', 'Do you want to delete successful logins greater then 30 days?', ['redirect' => 'true']);
    o_dialog::confirm_button($controller_path . '/clear', 'All', 'trash', 'Successful Logins', 'Do you want to delete all successful logins?', ['redirect' => 'true']);
}
theme::header_end();
theme::table_start(['On', 'By', 'Email'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::date($record->created_on);
    theme::table_row();
    theme::smart_model('o_user_model', $record->created_by, 'username');
    theme::table_row();
    theme::e($record->email);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Exemplo n.º 2
0
<?php

theme::form_start($controller_path . '/nav', null, ['data-validate' => false]);
theme::header_start('Export Menus');
Plugin_search_sort::field();
theme::header_button('Export File', ['icon' => 'upload', 'action' => 'js-post']);
theme::header_button('back');
theme::header_end();
theme::table_start(['Name', 'Value', 'Export' => 'text-center'], [], $records);
$parent_id = '';
foreach ($records as $record) {
    if ($parent_id != $record->parent_id) {
        echo '<tr><td colspan="4"><strong>Parent: ';
        ob_start();
        theme::smart_model('o_menubar', $record->parent_id, 'text');
        $text = ob_get_contents();
        ob_end_clean();
        echo empty($text) ? 'Root Level' : $text;
        echo '</strong></td></tr>';
        $parent_id = $record->parent_id;
    }
    theme::table_start_tr();
    theme::e($record->text);
    theme::table_row();
    theme::e($record->url);
    theme::table_row('actions text-center');
    echo '<input type="checkbox" name="export[]" value="' . $record->id . '">';
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
<?php

theme::form_start($controller_path . '/role-access', null, ['data-validate' => false]);
theme::header_start('Export Roles <i class="fa fa-arrows-h"></i> Access');
Plugin_search_sort::field();
theme::header_button('Export File', ['icon' => 'upload', 'action' => 'js-post']);
theme::header_button('back');
theme::header_end();
theme::table_start(['Role', 'Access', 'Export' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::smart_model('o_role', $record->role_id, 'name');
    echo ' &rArr; ';
    theme::smart_model('o_role', $record->role_id, 'description');
    theme::table_row();
    theme::smart_model('o_access', $record->access_id, 'name');
    echo ' &rArr; ';
    theme::smart_model('o_access', $record->access_id, 'description');
    theme::table_row('actions text-center');
    echo '<input type="checkbox" name="export[]" value="' . bin2hex($record->role_id . '::' . $record->access_id) . '">';
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
theme::form_end();