/** * Index Page for this controller or List all Users. * * Primary View is views/admin/blocks/users/index * @param integer $q User Group ID * @param integer $offset */ public function index($q = 4, $offset = 0) { $limit = AZ::setting('record_per_page'); $total_users = $this->user->getUsers('*', array('gid' => $q), 0, 0, true); $pagination = AZ::pagination('admin/users/index/' . $q, 5, $limit, $total_users); $users = $this->user->getUsers('id,gid,username,name,email,status,last_login,user_profiles.avatar,user_profiles.country', array('gid' => $q), $offset, $limit); AZ::layout('left-content', array('block' => 'users/index', 'group_A' => user_groups_A(), 'users' => $users, 'total_users' => $total_users, 'pagination' => $pagination, 'q' => $q)); }
<?php if (isset($styles)) { load_styles($styles); } ?> <script src="<?php echo skin_url(); ?> scripts/jquery-1.11.3.min.js" type="text/javascript"></script> <script src="<?php echo skin_url(); ?> scripts/bootstrap.min.js" type="text/javascript"></script> <?php if (isset($scripts)) { echo load_scripts($scripts); } ?> <title> <?php echo page_title(isset($page_title) ? $page_title : AZ::setting('global_meta_title')); ?> </title> </head> <body class="<?php echo page_class(); ?> ">
<?php AZ::head(); ?> <div class="header-container"> <div class="container-fluid top-container"> <div class="container"> <div class="row"> <div class="col-md-3 brand"> <?php _a('', AZ::setting('site_name'), ' class="logo-brand" '); ?> </div> <div class="col-xs-6"> <div role="navigation" class="navbar navbar-default"> <button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button"> <span class="sr-only">Toggle</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="navbar-collapse collapse"> <?php echo menu(); ?> </div>
/** * Search Messages By Keywords * * Primary View is views/admin/blocks/messages/search * * @param string $keyword * @param integer $message_id * @param integer $offset */ public function search_messages($keyword = '', $message_id = 0, $offset = 0) { $post = $this->input->post(); if (!isset($post['keyword'])) { return false; } if (empty($keyword)) { $keyword = trim($post['keyword']); } $limit = AZ::setting('record_per_page'); $total_message = $this->message->getMessagesByKeyword($keyword, $offset, $limit, true); $pagination = AZ::pagination('admin/dashboard/search_messages/', 5, $limit, $total_message); $messages = $this->message->getMessagesByKeyword($keyword, $offset, $limit); $labels = $this->message->getLabels(); $selected_message = $this->message->getMessageByKeyword($keyword); $count_unread_message = $this->message->getMessages('*', array('messages.trash' => 0, 'messages.is_read' => 0, 'messages.receiver' => user::id()), 0, 0, true); AZ::layout('left-content', array('block' => 'messages/search', 'keyword' => $keyword, 'labels' => $labels, 'messages' => $messages, 'selected_message' => $selected_message, 'total_message' => $total_message, 'pagination' => $pagination, 'count_unread_message' => $count_unread_message)); }
</a> </li> <?php AZ::block('header/notify-navigation'); ?> <?php AZ::block('header/message-navigation'); ?> <li> <a href="<?php echo site_url(); ?> " title="<?php __(AZ::setting('site_name')); ?> " id="siteHome" target="_blank"> <i class="fa fa-home"></i> </a> </li> </ul> <?php AZ::block('header/user-navigation'); ?> </div> </nav> </header>
/** * Content Fields Page for this controller. * * Primary View is views/admin/blocks/contents/fields * @param integer $q Content Field Group (Fieldset) * @param integer $offset */ public function fields($q = 1, $offset = 0) { $fieldset_A = $this->content->fieldset_A(); $limit = AZ::setting('record_per_page'); $total_fields = $this->content->getFields('*', array('group_id' => $q), 0, 0, true); $pagination = AZ::pagination('admin/contents/fields/' . $q, 5, $limit, $total_fields); $fields = $this->content->getFields('id,label,type,enabled,system,in_list,in_view', array('group_id' => $q), $offset, $limit); AZ::layout('left-content', array('block' => 'contents/fields', 'total_fields' => $total_fields, 'pagination' => $pagination, 'fields' => $fields, 'fieldset_A' => $fieldset_A, 'q' => $q)); }
public function getMessagesData($mode = 'inbox', $message_id = 0, $offset = 0) { switch ($mode) { case 'inbox': $limit = AZ::setting('record_per_page'); $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.receiver' => user::id()), 0, 0, true); $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message); $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.receiver' => user::id()), $offset, $limit); break; case 'stared': $limit = AZ::setting('record_per_page'); $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.is_star' => 1, 'messages.receiver' => user::id()), 0, 0, true); $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message); $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.is_star' => 1, 'messages.receiver' => user::id()), $offset, $limit); break; case 'outbox': $limit = AZ::setting('record_per_page'); $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.author' => user::id()), 0, 0, true); $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message); $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.author' => user::id()), $offset, $limit); break; case 'trash': $limit = AZ::setting('record_per_page'); $total_message = $this->getMessages('*', array('messages.trash' => 1, 'messages.receiver' => user::id()), 0, 0, true); $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message); $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 1, 'messages.receiver' => user::id()), $offset, $limit); break; default: $limit = AZ::setting('record_per_page'); $total_message = $this->getMessages('*', array('messages.trash' => 0, 'messages.receiver' => user::id()), 0, 0, true); $pagination = AZ::pagination('admin/dashboard/messages/' . $mode . '/' . $message_id, 6, $limit, $total_message); $messages = $this->getMessages('users.name,messages.id,messages.label,messages.is_read,messages.is_star,messages.subject,messages.body,messages.created,messages.author,messages.have_attachment', array('messages.trash' => 0, 'messages.receiver' => user::id()), $offset, $limit); break; } $messagesData = array('total_message' => $total_message, 'pagination' => $pagination, 'messages' => $messages); return $messagesData; }
</div> </div> <div class="clearfix"></div> </div> <?php } else { ?> <?php __('no_record'); ?> <?php } ?> </div> </div> </section> <?php if (count($groups) > AZ::setting('record_per_page')) { ?> <script> (function($) { $(document).ready(function(){ $("#groupsTable").DataTable(); }); })(jQuery); </script> <?php }
<span class="glyphicon pull-left hidden-xs"></span> <?php __('Publish'); ?> </a> </h4> </div> <div id="fieldset_publish" class="panel-collapse collapse in"> <br /> <div class="row-fluid"> <div class="col-md-12"> <div class="field-row form-light"> <div class="col-xs-12"> <span class="glyphicon glyphicon-link"></span> <?php echo form_label(AZ::setting('site_url'), 'alias'); echo form_input(array('name' => 'alias', 'placeholder' => isset($contentType->name) ? rtrim($contentType->name, 's') . '-ID' : '', 'value' => isset($content->alias) ? $content->alias : '')); ?> </div> <div class="clearfix"></div> </div> <div class="field-row"> <div class="col-xs-5"> <i class="fa fa-check-square-o"></i> <?php echo form_label(lang('Status'), 'status'); ?> </div> <div class="col-xs-7">