Example #1
0
						</div>
						<ul class="filter_values">
							<li class="filter_value">
								<input class="tooltip options" type="checkbox" id="google_sites" title="Google linked sites" value="1">
								<label for="google_sites">Google linked sites</label>
							</li>
							<li class="filter_value">
								<input class="tooltip options" type="checkbox" id="empty_google_sites" title="Google unlinked sites" value="1">
								<label for="empty_google_sites">Google unlinked sites</label>
							</li>
						</ul>
					</li>';
    }
}
$filter_class = '';
if (get_user_preference('filter_display') == '0') {
    $filter_class = ' display_none';
}
?>
<div class="grid grid_control no_margin_bottom">
	<div id="all_filters" class="clear<?php 
echo $filter_class;
?>
">
		<div class="attribute_filter_top">
			<div class="section_header">
				<h2>
					Filter by
					<a href="javascript: void(0);" class="tooltip fg-button ui-state-default fg-button-icon-solo ui-corner-all clear_all" title="Clear All Filters">
						<span class="ui-icon ui-icon-refresh"></span>x
					</a>
Example #2
0
        $class = 'nav';
        if (isset($menu['child_menus']) && !empty($menu['child_menus'])) {
            $class .= ' dropdown';
        }
        if (!empty($menu['li_class'])) {
            $class .= ' ' . $menu['li_class'];
        }
        if (!empty($menu['inside_link_html'])) {
            $link_text = str_replace('[[user_first_name]]', $user_first_name, str_replace('[[user_last_name]]', $user_last_name, $menu['inside_link_html']));
        } else {
            $link_text = '<span>' . $menu['menu_name'] . '</span>';
        }
        if (strstr($class, 'right')) {
            $title = 'Hide Header and Footer';
            $icon = 'n';
            if (get_user_preference('header_footer_display') == '0') {
                $title = 'Show Header and Footer';
                $icon = 's';
            }
            echo '	<a class="tooltip_default fg-button ui-state-default fg-button-icon-solo ui-corner-all show_header_footer" title="' . $title . '">
											<span class="ui-icon ui-icon-arrowthick-1-' . $icon . '"></span>x
										</a>';
            echo '	<li class="bar right"></li>';
        }
        echo '	<li class="' . $class . '">
										<a href="' . $link . '" class="' . $menu['class'] . '">' . $link_text . '</a>';
        if (isset($menu['child_menus']) && !empty($menu['child_menus'])) {
            echo '	<div class="menu">
											<ul>';
            foreach ($menu['child_menus'] as $child_menu) {
                $child_link = '/' . $child_menu['directory'] . '/' . $child_menu['controller'] . '/' . $child_menu['controller_function'];
Example #3
0
 function _get_tab_columns($client_tab_id = 0)
 {
     $this->_secure(5);
     $grid_method = get_grid_method_from_page();
     $result = array();
     $user = $this->session->all_userdata();
     $filter_display = get_user_preference('filter_display');
     if ($grid_method == 'jqgrid' || $grid_method == 'slick') {
         $names = array();
         $field_width = 95;
         $date_width = 80;
         if ($filter_display == '0') {
             $field_width = 150;
         }
     } else {
         $field_width = '95px';
         $date_width = '95px';
         if ($filter_display == '0') {
             $field_width = '112px';
             $date_width = '112px';
         }
     }
     $this->load->model('model_client_tabs');
     $client_tabs = $this->model_client_tabs->get_records(array('client_id' => $user['client_id'], 'security_level' => $user['user_security_level']));
     $site_title_name = get_app_var('SITE_TITLE_NAME');
     if (!empty($client_tabs)) {
         if ($grid_method == 'jqgrid') {
             $result[] = array('name' => 'actions', 'index' => 'actions', 'datatype' => 'T', 'width' => 35, 'sortable' => false, 'frozen' => true, 'resizable' => false, 'align' => 'center', 'sorttype' => 'text', 'title' => false);
             $result[] = array('name' => 'site_title', 'index' => 'site_title', 'datatype' => 'T', 'sorttype' => 'text', 'hidden' => false, 'classes' => 'site_title tooltip', 'width' => 250, 'frozen' => true, 'title' => false);
             $names[] = '';
             $names[] = $site_title_name;
         } elseif ($grid_method == 'slick') {
             $result[] = array('id' => 'actions', 'name' => '', 'toolTip' => 'Actions', 'headerCssClass' => 'tooltip', 'field' => 'actions', 'width' => 45, 'searchable' => false, 'sortable' => false, 'orderable' => false, 'attributeType' => 'T', 'attributeID' => 0);
             $result[] = array('id' => 'site_title', 'name' => $site_title_name, 'toolTip' => 'Site title derived on Masterdash', 'headerCssClass' => 'tooltip', 'field' => 'site_title', 'width' => 250, 'searchable' => true, 'sortable' => true, 'sorttype' => 'text', 'orderable' => false, 'attributeType' => 'T', 'attributeID' => 0);
         } else {
             $result[] = array('sName' => 'site_title', 'sTitle' => '<span>' . $site_title_name . '</span>', 'sClass' => 'site_title', 'sType' => 'string', 'bVisible' => true);
         }
         foreach ($client_tabs as $client_tab) {
             $visible = false;
             if ($client_tab['client_tab_id'] == $client_tab_id || $client_tab_id == 'all') {
                 $visible = true;
             }
             $tab_attributes = $client_tab['tab_attributes'];
             if (!empty($tab_attributes)) {
                 foreach ($tab_attributes as $tab_attribute) {
                     $type = $grid_method == 'jqgrid' || $grid_method == 'slick' ? 'text' : 'string';
                     if ($tab_attribute['attribute_value_type'] == 'D') {
                         $type = 'date';
                     } elseif ($tab_attribute['attribute_value_type'] == 'M') {
                         $type = 'time';
                     } elseif ($tab_attribute['attribute_value_type'] == 'PC' || $tab_attribute['attribute_value_type'] == 'PT') {
                         $type = $grid_method == 'jqgrid' || $grid_method == 'slick' ? 'text' : 'html';
                     } elseif ($tab_attribute['attribute_value_type'] == 'F') {
                         $type = $grid_method == 'jqgrid' || $grid_method == 'slick' ? 'float' : 'text';
                     } elseif ($tab_attribute['attribute_value_type'] == 'I') {
                         $type = $grid_method == 'jqgrid' || $grid_method == 'slick' ? 'integer' : 'text';
                     }
                     if ($grid_method == 'jqgrid') {
                         $class = $tab_attribute['attribute_array_index'] . ' ' . $type . ($type == 'float' || $type == 'integer' ? ' tooltip_right' : ' tooltip');
                         $result[] = array('name' => $tab_attribute['attribute_array_index'], 'index' => $tab_attribute['attribute_array_index'], 'datatype' => $tab_attribute['attribute_value_type'], 'classes' => $class, 'sorttype' => $type, 'width' => $type == 'date' ? $date_width : $field_width, 'align' => $type == 'date' || $type == 'time' ? 'center' : ($type == 'float' || $type == 'integer' ? 'right' : 'left'), 'hidden' => $visible ? false : true);
                         $names[] = $tab_attribute['attribute_name'];
                     } elseif ($grid_method == 'slick') {
                         if ($visible) {
                             $class = $tab_attribute['attribute_array_index'] . ' ' . $type;
                             $result[] = array('id' => $tab_attribute['attribute_array_index'], 'name' => $tab_attribute['attribute_name'], 'toolTip' => $tab_attribute['attribute_description'], 'field' => $tab_attribute['attribute_array_index'], 'width' => $type == 'date' ? $date_width : $field_width, 'headerCssClass' => 'tooltip', 'cssClass' => $class, 'searchable' => true, 'sortable' => true, 'sorttype' => $type, 'orderable' => $client_tab_id == 'all' || $user['user_security_level'] < 50 ? false : true, 'attributeType' => $tab_attribute['attribute_value_type'], 'attributeID' => $tab_attribute['attribute_id']);
                         }
                     } else {
                         $class = $tab_attribute['attribute_array_index'] . ' ' . $type;
                         $result[] = array('sName' => $tab_attribute['attribute_array_index'], 'sTitle' => '<span>' . teaser($tab_attribute['attribute_name'], 30) . '</span>', 'sClass' => $class, 'sType' => $type, 'sWidth' => $field_width, 'bVisible' => $visible);
                     }
                 }
             }
         }
     }
     if ($grid_method == 'jqgrid') {
         $result = array('names' => $names, 'columns' => $result);
     } elseif ($grid_method == 'slick') {
         $result = array('columns' => $result);
     }
     return $result;
 }
Example #4
0
<?php

$user = $this->session->all_userdata();
$this->load->view('layouts/default/sub_header');
$filter_display = get_user_preference('filter_display');
$grid_data_class = 'grid_grid_data';
$dashboard_header_class = 'filters';
if ($filter_display == '0') {
    $grid_data_class = 'grid_grid_data_wide';
    $dashboard_header_class = 'no_filters';
}
?>
<div id="content">
	<div class="container" id="main_container">
		<?php 
$data = array();
$data['client_attributes'] = $client_attributes;
$data['sites'] = $sites;
$this->load->view('users/home/filters', $data);
?>
		<div id="dashboard_header" class="<?php 
echo $dashboard_header_class;
?>
 no_dashboard_header">
			<a class="btn theme medium right" href="javascript:add_site();">Add Site</a>
		</div>
		<div id="grid_container" class="grid <?php 
echo $grid_data_class;
?>
 no_margin_bottom"></div>
	</div>
Example #5
0
 /**
  * Returns current sessions for this attcontrol
  *
  * Fetches data from {attcontrol_sessions}
  *
  * @return array of records or an empty array
  */
 public function get_current_sessions()
 {
     global $DB;
     $page = optional_param('page', 0, PARAM_INT);
     $perpage = get_user_preference('attcontrol_perpage', 10);
     $offset = $page * $perpage;
     $today = time();
     // Because we compare with database, we don't need to use usertime().
     $sql = "SELECT *\n                  FROM {attcontrol_sessions}\n                 WHERE :time BETWEEN sessdate AND (sessdate + duration)\n                   AND attcontrolid = :aid";
     $params = array('time' => $today, 'aid' => $this->id);
     return $DB->get_records_sql($sql, $params, $offset, $perpage);
 }
<?php

$end_date = strtotime('midnight -1 day');
$interval = '-1 week';
$start_date = strtotime($interval, $end_date);
$dashboard_header_class = '';
$dashboard_header_button_class = '';
if (get_user_preference('dashboard_header_display') == '0') {
    $dashboard_header_class = ' no_dashboard_header';
    $dashboard_header_button_class = ' display_none';
}
?>
<div id="dashboard_header" class="<?php 
echo $dashboard_header_class;
?>
">
	<div id="dashboard_header_buttons" class="<?php 
echo $dashboard_header_button_class;
?>
">
		<div class="report_buttons">
			<div class="report first active">
				<div class="pad">
					<span id="report_visits" class="value"><img src="/images/loader_dark.gif"/></span>
					Total Visits
				</div>
			</div>
			<div class="report">
				<div class="pad">
					<span id="report_new_visits" class="value"><img src="/images/loader.gif"/></span>
					Total New Visits
 function get_filters(&$site_position, &$options_position)
 {
     $result = array();
     $user = $this->session->all_userdata();
     $dashboard_filter_order = get_user_preference('dashboard_filter_order');
     $filters = array();
     $filters['client_id'] = $user['client_id'];
     $filters['not_empty'] = '1';
     $filters['attribute_filter_flag'] = '1';
     if (!empty($dashboard_filter_order)) {
         $filter_order = explode(',', $dashboard_filter_order);
         $order_by = 'case attributes.attribute_id ';
         $counter = 0;
         foreach ($filter_order as $filter_order_item) {
             $counter++;
             if ($filter_order_item == 'sites') {
                 $site_position = $counter;
             } elseif ($filter_order_item == 'options') {
                 $options_position = $counter;
             } else {
                 $order_by .= 'when ' . $filter_order_item . ' then ' . $counter . ' ';
             }
         }
         $order_by .= 'end';
         $filters['order_by'] = $order_by;
     }
     $result = $this->get_records($filters);
     return $result;
 }
Example #8
0
						<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
							<?php 
    if (!empty($client_tabs)) {
        foreach ($client_tabs as $i => $client_tab) {
            $class = '';
            if ($i == 0) {
                $class = ' ui-tabs-selected ui-state-active';
            }
            echo '<li class="ui-state-default ui-corner-top' . $class . '"><a href="#tabs-' . $client_tab['client_tab_id'] . '">' . $client_tab['tab_name'] . '</a></li>';
        }
    }
    ?>
						</ul>
						<?php 
    if (!empty($client_tabs)) {
        $auto_height = get_user_preference('auto_height');
        $title = 'Fit to Contents';
        $icon = 's';
        if ($auto_height == '1') {
            $title = 'Resizable';
            $icon = 'n';
        }
        foreach ($client_tabs as $client_tab) {
            $grid_search_id = 'grid_search_' . $client_tab['client_tab_id'];
            echo '	<div id="tabs-' . $client_tab['client_tab_id'] . '" class="slick_tabs ui-tabs-hide">
												<div class="slick_grid_container">
													<div class="slick_grid_header ui-widget-header ui-corner-top ui-helper-clearfix">
														<label for="' . $grid_search_id . '">Search:</label>
														<input type="text" size="20" id="' . $grid_search_id . '" value="">
														<a href="javascript:void(0);" title="Clear Search" class="tooltip fg-button ui-state-default fg-button-icon-solo ui-corner-all table_clear">
															<span class="ui-icon ui-icon-close"></span>