Beispiel #1
0
    function display_site_filter($sites = array())
    {
        if (!empty($sites)) {
            $link_id = 'sites';
            $title = 'Show Sites Filters';
            echo '	<li class="attribute_filter" id="sites">
							<div class="section_header">
								<div class="drag_handle"></div>
								<h3>
									<span class="tooltip" title="Sites">Sites</span>
									<a href="javascript: void(0);" class="tooltip fg-button ui-state-default fg-button-icon-solo ui-corner-all all_sites" title="Show All Sites">
										<span class="ui-icon ui-icon-zoomin"></span>x
									</a>
									<a href="javascript: void(0);" class="tooltip fg-button ui-state-default fg-button-icon-solo ui-corner-all show_filter" title="' . $title . '">
										<span class="ui-icon ui-icon-arrowthick-1-s"></span>x
									</a>
								</h3>
							</div>
							<ul class="filter_values">';
            foreach ($sites as $site) {
                $title = $site['site_title'];
                $id = 'site-' . $site['site_id'];
                $value = teaser($title, 28);
                echo '		<li class="filter_value">
									<input class="tooltip sites" type="checkbox" id="' . $id . '" title="' . $title . '" value="' . $site['site_id'] . '">
									<label for="' . $id . '" class="tooltip" title="' . $title . '">' . $value . '</label>
								</li>';
            }
            echo '		</ul>
						</li>';
        }
    }
Beispiel #2
0
 function get_all_sites_html()
 {
     $this->_secure();
     $result = '';
     $url_params = $this->uri->uri_to_assoc(3);
     $user = $this->session->all_userdata();
     $this->load->model('model_sites');
     $sites = $this->model_sites->get_records(array('client_id' => $user['client_id'], 'site_displayed_flag' => '1'));
     if (!empty($sites)) {
         $columns = 1;
         if (isset($url_params['columns']) && !empty($url_params['columns'])) {
             $columns = $url_params['columns'];
         }
         $sites_per_column = ceil(sizeof($sites) / $columns);
         $site_counter = 0;
         foreach ($sites as $site) {
             if ($site_counter % $sites_per_column == 0) {
                 if ($site_counter > 0) {
                     $result .= '</div>';
                 }
                 $result .= '<div class="all_sites_column">';
             }
             $id = 'all_site_id_' . $site['site_id'];
             $value = $site['site_id'];
             $field_data = array('name' => 'data[site_id][]', 'id' => $id, 'class' => 'all_site');
             $result .= '<div class="form_field">' . form_checkbox($field_data, $value) . '<label for="' . $id . '" class="tooltip" title="' . $site['site_title'] . '">' . teaser($site['site_title'], 30) . '</label></div>';
             $site_counter++;
         }
         $result .= '</div>';
     }
     $data = array();
     $data['any'] = $result;
     $data['action_view'] = 'misc/any';
     $this->load->view('layouts/blank', $data);
 }
Beispiel #3
0
 function get_value_from_id($values = array(), $search_id = 0, $length = 0, $csv = false)
 {
     $result = '';
     if (!empty($values) && !empty($search_id)) {
         if (isset($values[$search_id])) {
             if (is_array($values[$search_id])) {
                 if ($csv) {
                     $result = $values[$search_id];
                 } else {
                     $result = $values[$search_id]['name'];
                     if (!empty($values[$search_id]['email'])) {
                         $result .= ', email: ' . $values[$search_id]['email'];
                     }
                     if (!empty($values[$search_id]['phone'])) {
                         $result .= ', phone: ' . $values[$search_id]['phone'];
                     }
                     if (!empty($values[$search_id]['mobile'])) {
                         $result .= ', mobile: ' . $values[$search_id]['mobile'];
                     }
                 }
             } else {
                 $result = $values[$search_id];
             }
         }
         if (!empty($length)) {
             $result = teaser($result, $length);
         }
     }
     return $result;
 }
Beispiel #4
0
foreach (p_list() as $pos) {
    ?>
    <div class="p-item">
        <a href="<?php 
    echo SITE_URL;
    ?>
apply/<?php 
    echo $pos->name;
    ?>
">
            <div class="p-item-title"><?php 
    echo $pos->name;
    ?>
</div>
            <p class="p-item-info"><?php 
    echo teaser(explode("\n", $pos->info)[0], 120);
    ?>
</p>
        </a>
        <?php 
    if (logged_in()) {
        ?>
        <a class="p-item-submitted" href="<?php 
        echo SITE_URL;
        ?>
list/<?php 
        echo $pos->name;
        ?>
">See submitted</a>
        <?php 
    }
Beispiel #5
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;
 }
													<div class="drag_handle"></div>
													<span class="editable" id="' . $client_tab['client_tab_id'] . '">' . $client_tab['tab_name'] . '</span>
												</div>
												<ul class="tab_list_container">';
        if (!empty($client_tab['tab_attributes'])) {
            foreach ($client_tab['tab_attributes'] as $tab_attribute) {
                if (isset($tab_attribute['attribute_value_type'])) {
                    $class = 'tooltip';
                    $style = '';
                    if (!empty($tab_attribute['attribute_group_class'])) {
                        $class .= ' ' . $tab_attribute['attribute_group_class'];
                    } elseif (!empty($tab_attribute['attribute_group_bg_colour'])) {
                        $style = ' style="background-color: ' . $tab_attribute['attribute_group_bg_colour'] . '"';
                    }
                    $remove = '<a href="javascript:void(0);" class="fg-button ui-state-default fg-button-icon-solo ui-corner-all dashboard_remove">' . '<span class="ui-icon ui-icon-close"></span>x</a>';
                    $name = teaser($tab_attribute['attribute_name'], 40);
                    if (isset($tab_attribute['attribute_values']) && !empty($tab_attribute['attribute_values'])) {
                        $name .= ' (' . sizeof($tab_attribute['attribute_values']) . ')';
                    } elseif ($tab_attribute['attribute_value_type'] == 'PT' || $tab_attribute['attribute_value_type'] == 'PC') {
                        $name .= ' (0)';
                    }
                    $title = $tab_attribute['attribute_description'];
                    echo '<li class="' . $class . '"' . $style . ' title="' . $title . '" rel="' . $tab_attribute['attribute_id'] . '"><span>' . $name . '</span>' . $remove . '</li>';
                }
            }
        }
        echo '		</ul>
											</li>';
    }
}
?>
}
?>
		</div>
		<div id="manage_sites">
			<h3>Manage</h3>
			<?php 
$user = $this->session->all_userdata();
$sites = call_model_function('model_sites', 'model_sites', 'get_records', array('client_id' => $user['client_id']));
if (!empty($sites)) {
    $field_data = array('name' => 'data[all_sites][]', 'id' => 'manage_select');
    echo '	<div class="form_field">
								' . form_checkbox($field_data, '1') . '
								<label for="manage_select">Select All</label>
							</div>';
    $checked = false;
    foreach ($sites as $site) {
        $id = 'manage_site_id_' . $site['site_id'];
        $value = $site['site_id'];
        $field_data = array('name' => 'data[site_id][]', 'id' => $id, 'class' => 'user_site manage');
        echo '	<div class="form_field">
									' . form_checkbox($field_data, $value) . '
									<label for="' . $id . '" class="tooltip" title="' . $site['site_title'] . '">' . teaser($site['site_title'], 35) . '</label>
								</div>';
    }
}
?>
		</div>
		<input type="hidden" name="data[user_id]" id="user_site_user_id" value="0">
	</form>
</div>
Beispiel #8
0
            ?>
" width="30" height="30" class="img-circle" style="margin-right:-15px;" /></i>
          <a href="discuss/tid/<?php 
            echo $thread->id;
            ?>
" style="margin-left:10px;"><?php 
            echo stripslashes(teaser($thread->title, 100));
            ?>
</a>
          <span><i class="fa fa-fw fa-clock-o"></i> <?php 
            echo 'Created ' . get_timeago(strtotime(str_replace('T', ' ', $thread->post_date))) . ' by ' . $authname;
            ?>
          </span></div>
          <div class="discuss_postmessage">
            <?php 
            echo stripslashes(teaser($message, 100));
            ?>
          </div>
        </div>
        <?php 
        }
    }
    ?>
  <?php 
}
?>

  <div class="topselectors">
  <div class="searchstats"><?php 
echo 'Recent posts';
?>