Beispiel #1
0
<?php

$security_level = '0';
$user_first_name = '';
$user_last_name = '';
$CI =& get_instance();
$user = $CI->session->all_userdata();
if (isset($user['user_id']) && !empty($user['user_id'])) {
    $security_level = $user['security_level'];
    $user_first_name = $user['user_first_name'];
    $user_last_name = $user['user_last_name'];
}
$menus = call_model_function('model_menus', 'model_menus', 'get_menu_hierarchy', $security_level);
$clients = call_model_function('model_users', 'model_users', 'get_records', array('user_id' => $user['user_id']));
$client_nav = '';
if (sizeof($clients) > 0) {
    $client_nav = '<li class="nav dropdown profile right">';
    $selected_client = '';
    $other_clients = '<div class="menu"><ul>';
    foreach ($clients as $client) {
        $client_title = $client['client_name'];
        if (!empty($client['client_site_title']) && strtolower($client['client_site_title']) != 'masterdash') {
            $client_title = $client['client_site_title'];
        }
        if ($client['client_id'] == $user['client_id']) {
            $selected_client = '<a class="item" href="javascript:;">' . $client_title . '<div class="arrow"></div></a>';
        } else {
            $link = urlencode(base64_encode(serialize(array('client_id' => $client['client_id'], 'time' => mktime()))));
            $other_clients .= '<li class=""><a href="/users/home/select/' . $link . '">' . $client_title . '</a></li>';
        }
    }
Beispiel #2
0
			</div>
		</div>
		<div class="form_field">
			<div class="form_title"><span class="mandatory">Security Level</span>:</div>
			<div class="form_input">
				<?php 
$value = '';
$options = array('' => 'Please select');
$filters = array();
// Only a superuser can create superusers!
$is_super = call_model_function('model_users', 'model_users', 'is_super');
if (!$is_super) {
    $filters['not_security_level_alias'] = 'SUP';
}
$filters['security_level_selectable_flag'] = '1';
$security_levels = call_model_function('model_security_levels', 'model_security_levels', 'get_records', $filters);
if (!empty($security_levels)) {
    foreach ($security_levels as $security_level) {
        $options[$security_level['security_level']] = $security_level['security_level_name'];
    }
}
echo form_dropdown('data[user_security_level]', $options, $value, 'id="user_security_level"');
?>
			</div>
		</div>
		<div class="form_field" id="display_send_email_flag">
			<?php 
echo form_error('data[send_email_flag]');
?>
			<div class="form_title">Send Registration Email:</div>
			<div class="form_input">
Beispiel #3
0
?>
">
	<link rel="shortcut icon" href="http://<?php 
echo $_SERVER['SERVER_NAME'];
?>
/favicon.ico" type="image/x-icon">
	<!-- css -->
	<link rel="stylesheet" href="/css/all.css" type="text/css" media="screen"/>
	<?php 
$user = $this->session->all_userdata();
if (!empty($user)) {
    $client = call_model_function('model_clients', 'model_clients', 'get_records', array('client_id' => $user['client_id']));
    $theme = call_model_function('model_themes', 'model_themes', 'get_records', array('theme_id' => $client[0]['client_theme_id']));
}
if (empty($theme)) {
    $theme = call_model_function('model_themes', 'model_themes', 'get_records', array('theme_default_flag' => '1'));
}
$theme_path = $theme[0]['theme_path'];
$theme_sub_path = $theme[0]['theme_sub_path'];
$theme_jquery_path = $theme[0]['theme_jquery_path'];
?>
	<link rel="stylesheet" href="<?php 
echo $theme_jquery_path;
?>
" type="text/css" media="screen"/>
	<link rel="stylesheet" id="client_theme" href="<?php 
echo $theme_path;
?>
" type="text/css" media="screen"/>
	<link rel="stylesheet" id="client_sub_theme" href="<?php 
echo $theme_sub_path;
Beispiel #4
0
											<img src="' . $logo . '"/>
										</div>';
}
?>
						<div class="logo_input">
							<input name="userfile" type="file" size="30">
						</div>
					</div>
				</div>
				<div class="form_field margin_top">
					<div class="form_title">Theme:</div>
					<div class="form_input">
						<?php 
echo form_error('data[client_theme_id]');
$value = set_value('data[client_theme_id]', $data['client_theme_id']);
$themes = call_model_function('model_themes', 'model_themes', 'get_records');
if (!empty($themes)) {
    foreach ($themes as $theme) {
        if (!empty($theme['theme_preview'])) {
            $class = '';
            if ($value == $theme['theme_id'] || empty($value) && $theme['theme_default_flag'] == '1') {
                $class = ' theme_selected';
            }
            echo '	<div id="' . $theme['theme_id'] . '" class="theme_preview' . $class . '" rel="' . $theme['theme_path'] . '|' . $theme['theme_sub_path'] . '">
													<h3>' . $theme['theme_name'] . ($theme['theme_default_flag'] == '1' ? ' (Default)' : '') . '</h3>
													<img src="' . $theme['theme_preview'] . '"/>
												</div>';
        }
    }
}
?>
        $id = 'view_site_id_' . $site['site_id'];
        $value = $site['site_id'];
        $field_data = array('name' => 'data[site_id][]', 'id' => $id, 'class' => 'user_site view');
        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>
		<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>';