Пример #1
0
?>
</div>
<br>
<div>
	<strong>Enabled: </strong><?php 
o::enum($record->active, 'Inactive|Active');
?>
</div>
<br>

<div>
<?php 
if ($record->is_deletable) {
    ?>
	<?php 
    o_dialog::confirm_a($controller_path . '/delete/' . $record->id, 'Delete Record', ['text' => 'Are you sure you want to delete this record?', 'icon' => 'trash', 'class' => 'btn btn-sm btn-danger', 'callback' => 'menubar_hander', 'id' => $record->id]);
    ?>
<i class="fa fa-trash"></i> Delete</a>
<?php 
}
?>

	<a href="<?php 
echo $controller_path . '/new/' . $record->id . '/' . rawurlencode($record->text);
?>
" data-id="<?php 
echo $record->id;
?>
" class="btn btn-sm btn-default"><i class="fa fa-magic"></i> Add Child Menu</a>

<?php 
Пример #2
0
<?php

theme::header_start('Cache', 'Manage "' . $current_cache . '" cache.');
Plugin_search_sort::field();
o_dialog::confirm_button($controller_path . '/clear', 'All', 'trash', 'Cached Entries', 'Do you want to delete all cached entries?', ['redirect' => 'true']);
theme::header_end();
theme::table_start(['Name', 'Size' => 'text-center', 'Created', 'Expires', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    $record = (object) $record;
    theme::table_start_tr();
    theme::e($record->name);
    theme::table_row('text-center');
    theme::e(byte_format($record->size));
    $total_bytes += $record->size;
    theme::table_row();
    theme::e(date('m/d/y g:ia', $record->date));
    theme::table_row();
    theme::e(date('m/d/y g:ia', $record->date + $ttl_txt));
    theme::table_row('actions text-center');
    o_dialog::confirm_a_delete($this->controller_path . '/delete/' . urlencode($record->name));
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
if ($total_bytes > 0) {
    echo '<p><strong>Total Size <span class="badge">' . byte_format($total_bytes) . '</span></strong></p>';
}
if ($ttl_txt > 0) {
    echo '<p><strong>Time to live <span class="badge">~' . seconds2human($ttl_txt) . '</span></strong></p>';
}
Пример #3
0
<?php

theme::header_start('Banners', 'mange banners.');
Plugin_search_sort::field();
if (has_access('templates::add')) {
    theme::header_button('new');
}
theme::header_end();
theme::table_start(['Title', 'Starts After', 'End After', 'Points To', 'Weight' => 'text-center', 'Actions' => 'text-center'], [], $records);
foreach ($records as $key => $record) {
    theme::table_start_tr();
    theme::e($record->title);
    theme::table_row();
    theme::date($record->start_on);
    theme::table_row();
    theme::date($record->end_on);
    theme::table_row();
    theme::e($record->url);
    theme::table_row('text-center');
    theme::e($record->weight);
    theme::table_row('actions text-center');
    if ($record->is_editable) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if ($record->is_deletable) {
        o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
    }
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Пример #4
0
<?php

/* on delete assigned to this role */
$role_name = o::smart_model('o_role_model', setting('auth', 'Default Role Id'), 'name', true);
theme::header_start('Roles', 'manage user roles.');
Plugin_search_sort::field();
theme::header_button_new();
theme::header_end();
theme::table_start(['Name', 'Description', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    o::e($record->name);
    theme::table_row();
    o::e($record->description);
    theme::table_row('actions text-center');
    if ($record->is_editable) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if ($record->is_deletable) {
        o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id, ['data' => ['append' => '<br>This will reassign all users with this role to the "' . $role_name . '" role.']]);
    }
    theme::table_action('list-ul', $this->controller_path . '/details/' . $record->id);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Пример #5
0
<?php

$index = 'id' . uniqid();
theme::element('div', ['id' => $index, 'class' => 'magic-row']);
theme::element('div', ['style' => 'width:95%', 'class' => 'portal-cell']);
theme::hidden('t_orange_c[' . $index . '][id]', $record->id);
theme::hidden('t_orange_c[' . $index . '][parent_id]', $record->parent_id);
theme::start_form_section('Name');
theme::text('t_orange_c[' . $index . '][name]', $record->name);
theme::end_form_section();
theme::start_form_section('Age', 2);
theme::text('t_orange_c[' . $index . '][age]', $record->age);
theme::end_form_section();
theme::element('/div');
theme::element('div', ['style' => 'width:5%', 'class' => 'portal-cell portal-cell-action']);
//theme::table_action('edit',$this->controller_path.'/xedit/'.$record->id,['class'=>'js-o_dialog','data'=>['redirect'=>'true','heading'=>'Leave this record?','text'=>'If you edit this record you will leave the current record.']]);
o_dialog::confirm_a_delete($this->controller_path . '/delete_child/' . $parent_id . '/' . $record->id, ['div' => $index]);
theme::element('/div');
theme::element('/div');
Пример #6
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();
Пример #7
0
<?php

theme::header_start('Failed Logins', 'View failed logins');
Plugin_search_sort::field();
if (count($records) > 0) {
    o_dialog::confirm_button($controller_path . '/flush/90', '90 Days+', 'trash', 'Failed Logins', 'Do you want to delete failed logins greater then 90 days', ['redirect' => 'true']);
    o_dialog::confirm_button($controller_path . '/flush/30', '30 Days+', 'trash', 'Failed Logins', 'Do you want to delete failed logins greater then 30 days?', ['redirect' => 'true']);
    o_dialog::confirm_button($controller_path . '/clear', 'All', 'trash', 'Failed Logins', 'Do you want to delete all failed logins?', ['redirect' => 'true']);
}
theme::header_end();
theme::table_start(['IP Address', 'Login', 'Time'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::e($record->ip_address);
    theme::table_row();
    theme::e($record->login);
    theme::table_row();
    theme::date($record->time);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Пример #8
0
theme::header_end();
theme::table_start(['Created', 'Expires', 'Username', 'Email', 'Expired' => 'text-center', 'Complete' => 'text-center', 'Activate' => 'text-center', 'Resend Email' => 'text-center', 'Delete' => 'text-center'], [], $records);
//kd($records);
foreach ($records as $record) {
    $user = json_decode($record->json);
    theme::table_start_tr();
    theme::date($record->created_on);
    theme::table_row();
    theme::date($record->timeout);
    theme::table_row();
    theme::e($user->username);
    theme::table_row();
    theme::e($user->email);
    theme::table_row('text-center');
    theme::enum_icon($record->expired);
    theme::table_row('text-center');
    theme::enum_icon($record->complete);
    theme::table_row('actions text-center');
    if (!$record->complete) {
        theme::table_action('user-plus', $this->controller_path . '/activate/' . $record->register_key);
    }
    theme::table_row('actions text-center');
    if (!$record->complete) {
        theme::table_action('envelope-o', $this->controller_path . '/resend-activation/' . $record->register_key);
    }
    theme::table_row('actions text-center');
    o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->register_key);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();