function get_vibes_value($response = array(), $vibe = NULL)
 {
     $result = array();
     $responsedata = get_responsedata($response);
     if (!$vibe || !empty($responsedata)) {
         if (intval(element('autn:numhits', $responsedata)) > 1) {
             foreach (element('autn:hit', $responsedata) as $autnhit) {
                 $autnid = element('autn:id', $autnhit);
                 $autncontent = element('autn:content', $autnhit);
                 $document = element('DOCUMENT', $autncontent);
                 $result[$autnid] = array_key_exists($vibe, $document) ? is_array(element($vibe, $document)) ? element($vibe, $document) : array(element($vibe, $document)) : array();
             }
         } elseif (intval(element('autn:numhits', $responsedata)) === 1) {
             $autnhit = element('autn:hit', $responsedata);
             $autncontent = element('autn:content', $autnhit);
             $document = element('DOCUMENT', $autncontent);
             $result = array_key_exists($vibe, $document) ? is_array(element($vibe, $document)) ? element($vibe, $document) : array(element($vibe, $document)) : array();
         }
     }
     return $result;
 }
Exemple #2
0
				// This call is pagination load options from session			
				$query_settings = array_merge($um_search_settings, $query_settings_sess);				
				$start = $page-1;
				$query_settings = array_merge($query_settings, array('start' => ($start*$query_settings['maxresults'])+1));
			
			else:
				//Its not a post  Give all results				
				$query_settings = $um_search_settings;
				
			endif;	**/
// Call Search
$search_results = $this->idol->QueryAction($query_settings);
$message = $this->notification->errors() ? $this->notification->errors() : ($this->notification->messages() ? $this->notification->messages() : $this->session->flashdata('message'));
if (!empty($search_results)) {
    $results = clean_json_response($search_results);
    $responsedata = get_responsedata($results);
    $sort = array_key_exists('sort', $query_settings) ? element('sort', $query_settings) : '';
    $maxresults = array_key_exists('maxresults', $query_settings) ? element('maxresults', $query_settings) : 0;
    $totalresults = array_key_exists('autn:totalhits', $responsedata) ? element('autn:totalhits', $responsedata) : 0;
    $numhits = array_key_exists('autn:numhits', $responsedata) ? element('autn:numhits', $responsedata) : 0;
    $info = $this->search_model->search_info(array('total_rows' => intval($totalresults), 'per_page' => intval($maxresults), 'start' => intval(element('start', $query_settings))));
    ?>

<div class="box box-default o-hidden">			
	
	<div class="box-header with-border">
	  <h3 class="box-title">
	  <i class="fa <?php 
    echo element('icon', $options);
    ?>
"></i>
Exemple #3
0
 function search($start = null)
 {
     if (!$this->users->logged_in()) {
         r_direct_login();
     } else {
         $parameters = array();
         if ($this->input->server('REQUEST_METHOD') === 'POST') {
             $parameters = $_POST;
         } elseif ($this->input->server('REQUEST_METHOD') === 'GET') {
             $parameters = $_GET;
         }
         $search_results = $this->idol->QueryAction($parameters);
         $message = $this->notification->errors() ? $this->notification->errors() : ($this->notification->messages() ? $this->notification->messages() : $this->session->flashdata('message'));
         if (!empty($search_results)) {
             $results = clean_json_response($search_results);
             $responsedata = get_responsedata($results);
             $data['responsedata'] = $responsedata;
             $data['template'] = element('template', $parameters);
             $data['search_parameters'] = $parameters;
             $template = isset($parameters['template']) ? $parameters['template']['name'] : 'document-template-chat';
             echo $this->load->view('template/' . $template, $data);
         } else {
             echo 'No results...';
         }
     }
 }
Exemple #4
0
 public function get_databases($server = array())
 {
     $databases = array();
     $status = $this->status->get_status($server);
     if (is_response_success($status)) {
         $databases = element('databases', get_responsedata($status));
     }
     return $databases;
 }
Exemple #5
0
}
?>
						  </div>
						  <div style="" id="server-info-tab-2" class="tab-pane ">
							<?php 
if (isset($server_status) && $server_status) {
    ?>
										<div data-bind="SlimScroll: { 
														position: 'right', 
														height: 500, 
														size: '5px',  
														railOpacity: 0.3,
														wheelStep: 10,
														allowPageScroll: false}">
									<?php 
    $responsedata = get_responsedata($server_status);
    foreach ($responsedata as $k => $a) {
        echo '<ul class="list-unstyled">';
        echo '<li>';
        if (!is_string($a)) {
            echo '<h5 class="text-capitalize">' . $k . '</h5>';
            echo '<ul class="list-unstyled m-l-20">';
            foreach ($a as $l => $b) {
                if (!is_string($b)) {
                    echo '<h5 class="text-capitalize">' . $l . '</h5>';
                    echo '<ul class="list-unstyled m-l-40">';
                    foreach ($b as $m => $c) {
                        if (!is_string($c)) {
                            if (is_int($m)) {
                                echo '---';
                            } else {
Exemple #6
0
* @Description: Feed widget for dashboard. With selections from predefined Feed Rules.
*/
?>


<?php 
$mode = $this->application->get_mode('dashboard_mode');
$query_parameters = $this->application->get_config('query', 'actions');
$options = $this->application->get_settings($widget_key);
$feed = $this->rules_model->get_rule(element('feed', $options));
$feed_setting = unserialize(element('rule_settings', $feed));
$keywords = element('keywords', $feed_setting);
$query_settings = array_merge($query_parameters, $this->usermeta_model->get_usermeta(0, array('meta_key' => 'settings_query_query')), array('text' => $keywords, 'maxresults' => 5));
$results = $this->search_model->call_search($query_settings);
if (!empty($results)) {
    $responsedata = clean_json_response(get_responsedata($results));
    $numhits = array_key_exists('autn:numhits', $responsedata) ? element('autn:numhits', $responsedata) : 0;
    $default_elements = array_keys($this->document_lib->default_elements());
    ?>


<div class="box box-success o-hidden">	
	<?php 
    if ($mode) {
        ?>
	<div class="removable-widget-tools">
		<ul class="list list-inline m-0">
			<li class="<?php 
        echo $mode ? 'handle' : 'hidden';
        ?>
">
Exemple #7
0
 public function call_get_tag_values($post_opts = array())
 {
     $response = array();
     //$server = array_merge($this->server , $this->usermeta_model->get_usermeta(0, array( 'meta_key' => 'server_status')));
     $config = $this->application->get_config('gettagvalues', 'actions');
     $search = array();
     if ($this->session->userdata('search_settings')) {
         $search = $this->session->userdata('search_settings');
     }
     $post_data = array_merge(clean_parameters($config), clean_parameters(elements(array_keys($config), $post_opts)));
     //$data =
     //$this->curl->simple_post( element('url', $server) . ':' . element('port', $server), $post_data);
     $this->curl->create(element('server', $post_opts));
     $this->curl->option('buffersize', 10);
     $this->curl->option('useragent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)');
     $this->curl->option('returntransfer', 1);
     $this->curl->option('followlocation', 1);
     $this->curl->option('connecttimeout', 1);
     $this->curl->post($post_data);
     $data = $this->curl->execute();
     if ($data && $data !== false) {
         $response = json_decode($data, true);
         $response = clean_json_response($response);
     }
     if (is_response_success($response)) {
         $response = get_responsedata($response);
     }
     $this->curl->close();
     return $response;
 }