// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(61));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_videos";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(49) => 'NAME', $l->g(276) => 'CHIPSET', $l->g(26) . " (MB)" => 'MEMORY', $l->g(62) => 'RESOLUTION');
if ($show_all_column) {
    $list_col_cant_del = $list_fields;
} else {
    $list_col_cant_del = array($l->g(49) => $l->g(49));
}
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(211));
$form_name = "affich_registry";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(212) => 'NAME', $l->g(213) => 'REGVALUE');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$tab_options['FILTRE'] = array('NAME' => $l->g(212), 'REGVALUE' => $l->g(213));
$queryDetails = "SELECT * FROM registry WHERE (hardware_id={$systemid})";
ajaxtab_entete_fixe($list_fields, $default_fields, $tab_options, $list_col_cant_del);
echo close_form();
if ($ajax) {
    ob_end_clean();
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(92));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_drives";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(85) => 'LETTER', $l->g(66) => 'TYPE', $l->g(70) => 'VOLUMN', $l->g(86) => 'FILESYSTEM', $l->g(88) . " (MB)" => 'FREE', $l->g(87) . " (MB)" => 'TOTAL', "PERCENT_BAR" => 'CAPACITY');
if ($show_all_column) {
    $list_col_cant_del = $list_fields;
} else {
    $list_col_cant_del = array('PERCENT_BAR' => 'PERCENT_BAR', $l->g(85) => $l->g(85));
}
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    ob_end_clean();
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(1220));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$table_name = "sd_cartridges";
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
$list_fields = array($l->g(66) => 'TYPE', $l->g(1104) => 'LEVEL', $l->g(1225) => 'MAXCAPACITY', $l->g(1226) => 'COLOR', $l->g(53) => 'DESCRIPTION');
//$list_fields['SUP']= 'ID';
$sql = prepare_sql_tab($list_fields);
$list_fields["PERCENT_BAR"] = 'CAPACITY';
$tab_options["replace_query_arg"]['CAPACITY'] = "round(100-(LEVEL*100/MAXCAPACITY))";
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql['SQL'] = $sql['SQL'] . " , round(100-(LEVEL*100/MAXCAPACITY)) AS CAPACITY FROM %s WHERE (snmp_id=%s)";
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("Services");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "services";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('Service Name' => 'SVCNAME', 'Service State' => 'SVCSTATE', 'Service Description' => 'SVCDESC');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM service WHERE (hardware_id = {$systemid})";
array_push($sql['ARG'], $systemid);
/*
 * 
 * Show sd_localprinters data
 * 
 * 
 */
if (AJAX) {
    ob_end_clean();
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(79));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$table_name = "sd_localprinters";
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
$list_fields = array($l->g(49) => 'NAME');
//$list_fields['SUP']= 'ID';
$sql = prepare_sql_tab($list_fields);
//$list_fields["PERCENT_BAR"] = 'CAPACITY';
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql['SQL'] = $sql['SQL'] . " FROM %s WHERE (snmp_id=%s)";
$sql['ARG'][] = 'snmp_localprinters';
Example #7
0
function print_blog_item($item_xml)
{
    $additional = '';
    $additional_html = '';
    $blog_type = find_xml_value($item_xml, 'blog-type');
    if ($blog_type == 'Carousel') {
        $additional = 'navigation-on';
    }
    $offset = find_xml_value($item_xml, 'offset');
    $pagination = find_xml_value($item_xml, "pagination");
    $view_all_blog = find_xml_value($item_xml, 'read-the-blog');
    if (!empty($view_all_blog) && $view_all_blog != 'None') {
        global $gdl_admin_translator;
        if ($gdl_admin_translator == 'enable') {
            $translator_view = get_option(THEME_SHORT_NAME . '_translator_read_the_blog', 'Read The Blog');
        } else {
            $translator_view = __('Read The Blog', 'gdl_front_end');
        }
        $additional_html = '<a href="' . get_permalink(get_page_by_path($view_all_blog));
        $additional_html = $additional_html . '" class="view-all-projects">';
        $additional_html = $additional_html . $translator_view . '</a>';
    }
    print_item_header(find_xml_value($item_xml, 'header'), $additional, $additional_html, find_xml_value($item_xml, 'icon-class'));
    global $paged, $sidebar_type, $blog_div_size_num_class;
    $paged = get_query_var('paged') ? get_query_var('paged') : get_query_var('page');
    $paged = $paged ? $paged : 1;
    if ($pagination == "No") {
        $paged = 1;
    }
    if ($paged != '1') {
        $offset = "";
    }
    // get the item class and size from array
    $item_type = find_xml_value($item_xml, 'item-size');
    $item_class = $blog_div_size_num_class[$item_type]['class'];
    $item_size = $blog_div_size_num_class[$item_type][$sidebar_type];
    // get the blog meta value
    $num_fetch = find_xml_value($item_xml, 'num-fetch');
    $num_excerpt = find_xml_value($item_xml, 'num-excerpt');
    $full_content = find_xml_value($item_xml, 'show-full-blog-post');
    $blog_thumbnail = find_xml_value($item_xml, 'show-thumbnail');
    if ($blog_thumbnail == 'No') {
        $item_size = '';
    }
    $category = find_xml_value($item_xml, 'category', false);
    $category = $category == 'All' ? '' : $category;
    $order = find_xml_value($item_xml, 'order');
    $orderby = find_xml_value($item_xml, 'orderby');
    // start fetching database
    query_posts(array('post_type' => 'post', 'paged' => $paged, 'order' => $order, 'orderby' => $orderby, 'category_name' => $category, 'posts_per_page' => $num_fetch, 'offset' => $offset));
    // printing each blog function
    echo '<div class="blog-item-holder">';
    if ($item_type == '1/4 Blog Widget' || $item_type == '1/3 Blog Widget' || $item_type == '1/2 Blog Widget' || $item_type == '1/1 Blog Widget') {
        if ($blog_type == 'Carousel') {
            print_blog_widget_carousel($item_class, $item_size, $num_excerpt, $full_content, $item_type);
        } else {
            print_blog_widget($item_class, $item_size, $num_excerpt, $full_content, $item_type);
        }
    } else {
        if ($item_type == '1/1 Blog List') {
            print_blog_list($item_class, $item_size);
        } else {
            if ($item_type == '1/1 Medium Thumbnail') {
                print_blog_medium($item_class, $item_size, $num_excerpt, $full_content);
            } else {
                if ($item_type == '1/1 Full Thumbnail') {
                    print_blog_full($item_class, $item_size, $num_excerpt, $full_content);
                }
            }
        }
    }
    echo '</div>';
    echo '<div class="clear"></div>';
    if ($pagination == "Yes") {
        pagination();
    }
    wp_reset_query();
}
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
$lbl_log = $l->g(1128);
$list_fields = array();
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$tab_options = $protectedPost;
print_item_header($l->g(1128));
$form_name = "affich_notes";
$table_name = $form_name;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
//delete a list of notes
if ($protectedPost['del_check'] != '') {
    $arg_sql = array();
    $sql = "update itmgmt_comments set visible=0 where id in ";
    $sql = mysql2_prepare($sql, $arg_sql, $protectedPost['del_check']);
    mysql2_query_secure($sql['SQL'], $_SESSION['OCS']["writeServer"], $sql['ARG'], 'DEL_NOTES');
    //update table cache
    $tab_options['CACHE'] = 'RESET';
}
if ($protectedPost['SUP_PROF'] != '' and isset($protectedPost['SUP_PROF'])) {
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    ob_end_clean();
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header('sd_storages');
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$table_name = "sd_storages";
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('SNMP_ID' => 'SNMP_ID', 'MANUFACTURER' => 'MANUFACTURER', 'NAME' => 'NAME', 'MODEL' => 'MODEL', 'DESCRIPTION' => 'DESCRIPTION', 'TYPE' => 'TYPE', 'DISKSIZE' => 'DISKSIZE', 'SERIALNUMBER' => 'SERIALNUMBER', 'FIRMWARE' => 'FIRMWARE');
//$list_fields['SUP']= 'ID';
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] = $sql['SQL'] . " FROM %s WHERE (snmp_id=%s)";
$sql['ARG'][] = 'snmp_storages';
Example #10
0
function print_page_item($item_xml)
{
    print_item_header(find_xml_value($item_xml, 'header'), '', '', find_xml_value($item_xml, 'icon-class'));
    global $paged, $gdl_element_id, $port_div_size_num_class, $sidebar_type;
    if (empty($paged)) {
        $paged = get_query_var('page') ? get_query_var('page') : 1;
    }
    // get the page meta value
    $port_size = find_xml_value($item_xml, 'item-size');
    $item_size = $port_div_size_num_class[$port_size][$sidebar_type];
    $num_fetch = find_xml_value($item_xml, 'num-fetch');
    $num_excerpt = find_xml_value($item_xml, 'num-excerpt');
    query_posts(array('post_type' => 'page', 'paged' => $paged, 'orderby' => 'menu_order', 'order' => 'asc', 'post_parent' => get_the_ID(), 'posts_per_page' => $num_fetch));
    echo '<div class="portfolio-item-holder row">';
    while (have_posts()) {
        the_post();
        print_item_size($port_size, 0.1, 'portfolio-item mb40');
        $thumbnail_id = get_post_thumbnail_id();
        if (!empty($thumbnail_id)) {
            $thumbnail = wp_get_attachment_image_src($thumbnail_id, $item_size);
            $alt_text = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true);
            echo '<div class="portfolio-media-wrapper gdl-image">';
            echo '<a class="hover-wrapper" href="' . get_permalink() . '" >';
            echo '<span class="portfolio-thumbnail-image-hover">';
            echo '<span class="hover-link"></span>';
            echo '</span>';
            echo '</a>';
            echo '<img src="' . $thumbnail[0] . '" alt="' . $alt_text . '"/>';
            echo '</div>';
            //portfolio thumbnail image
        }
        $show_title = find_xml_value($item_xml, "show-title") == "Yes" ? true : false;
        $show_excerpt = find_xml_value($item_xml, "show-excerpt") == "Yes" ? true : false;
        if ($show_title || $show_excerpt) {
            echo '<div class="page-context">';
            if ($show_title) {
                echo '<h2 class="page-item-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
            }
            if ($show_excerpt) {
                echo '<div class="page-item-content">' . gdl_get_excerpt($num_excerpt) . '</div>';
            }
            echo '</div>';
            // port-thumbnail-contxt
        }
        echo '<div class="clear"></div>';
        echo '</div>';
        // close print_item_size
    }
    echo "</div>";
    // portfolio-item-holder
    echo '<div class="clear"></div>';
    if (find_xml_value($item_xml, "pagination") == "Yes") {
        pagination();
    }
    wp_reset_query();
}
Example #11
0
function print_package_search_item($item_xml)
{
    $header = find_xml_value($item_xml, 'header');
    print_item_header($header, '', '', find_xml_value($item_xml, 'icon-class'));
    global $gdl_admin_translator, $post, $gdl_date_format, $package_id;
    if ($gdl_admin_translator == 'enable') {
        $translator_key_words = get_option(THEME_SHORT_NAME . '_translator_key_words_package', 'Key Words');
        $translator_location = get_option(THEME_SHORT_NAME . '_translator_search_location_package', 'Location');
        $translator_departure = get_option(THEME_SHORT_NAME . '_translator_departure_package', 'Departure Date');
        $translator_arrival = get_option(THEME_SHORT_NAME . '_translator_arrival_package', 'Arrival Date');
        $translator_max_budget = get_option(THEME_SHORT_NAME . '_translator_budget_package', 'Max Budget (USD)');
        $translator_package_search = get_option(THEME_SHORT_NAME . '_translator_search_package', 'Search');
        $translator_trip_type = get_option(THEME_SHORT_NAME . '_translator_trip_type', 'Trip Type');
    } else {
        $translator_key_words = __('Key Words', 'gdl_front_end');
        $translator_location = __('Location', 'gdl_front_end');
        $translator_departure = __('Departure Date', 'gdl_front_end');
        $translator_arrival = __('Arrival Date', 'gdl_front_end');
        $translator_max_budget = __('Max Budget (USD)', 'gdl_front_end');
        $translator_package_search = __('Search', 'gdl_front_end');
        $translator_trip_type = __('Trip Type', 'gdl_front_end');
    }
    echo '<div class="package-search-wrapper">';
    echo '<form role="search" method="get" id="package-searchform" action="' . home_url('/') . '">';
    // Search Text
    echo '<div class="package-search-input">';
    echo '<input type="text" name="s" id="package-search" value="' . $translator_key_words . '" data-default="' . $translator_key_words . '" />';
    echo '</div>';
    // Destination
    echo '<div class="package-search-input">';
    echo '<input type="text" name="location" id="location" value="' . $translator_location . '" data-default="' . $translator_location . '" />';
    echo '</div>';
    // Trip Type
    echo '<div class="package-search-select">';
    echo '<select name="package-type" >';
    echo '<option>' . $translator_trip_type . '</option>';
    $get_category = get_categories(array('taxonomy' => 'package-tag', 'hide_empty' => 0));
    if (!empty($get_category)) {
        foreach ($get_category as $category) {
            echo '<option value="' . $category->slug . '">' . $category->name . '</option>';
        }
    }
    echo '</select>';
    echo '</div>';
    // Departure Date
    echo '<div class="package-search-input">';
    echo '<input type="text" name="departure-date" id="departure-date" class="gdl-date-picker" value="' . $translator_departure . '" data-default="' . $translator_departure . '" />';
    echo '<label for="departure-date"><i class="icon-calendar" ></i></label>';
    echo '</div>';
    // Arrival Date
    echo '<div class="package-search-input">';
    echo '<input type="text" name="arrival-date" id="arrival-date" class="gdl-date-picker" value="' . $translator_arrival . '" data-default="' . $translator_arrival . '" />';
    echo '<label for="arrival-date"><i class="icon-calendar" ></i></label>';
    echo '</div>';
    // Max Budget
    echo '<div class="package-search-input">';
    echo '<input type="text" name="max-budget" id="max-budget" value="' . $translator_max_budget . '" data-default="' . $translator_max_budget . '" />';
    echo '</div>';
    // Submit
    echo '<input type="hidden" name="posttype" value="package" />';
    echo '<input type="submit" id="package-searchsubmit" value="' . $translator_package_search . '" />';
    echo '</form>';
    echo '</div>';
    // package search input
}
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("Windows Users");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "winusers";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('name' => 'name');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM winusers WHERE (hardware_id={$systemid})";
array_push($sql['ARG'], $systemid);
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("UpTime");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "uptime";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('uptime' => 'time');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM uptime WHERE (hardware_id = {$systemid})";
array_push($sql['ARG'], $systemid);
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("Office Licences");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "officepack";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('Product' => 'PRODUCT', 'Office Version' => 'OFFICEVERSION', 'Type' => 'TYPE', 'Office Key' => 'OFFICEKEY');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM officepack WHERE (hardware_id = {$systemid})";
array_push($sql['ARG'], $systemid);
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("Security");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "security";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('Category' => 'CATEGORY', 'Company' => 'COMPANY', 'Product Name' => 'PRODUCT', 'Enabled ?' => 'ENABLED', 'Up To Date ?' => 'UPTODATE');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM securitycenter WHERE (hardware_id = {$systemid})";
array_push($sql['ARG'], $systemid);
//====================================================================================
/*
 * 
 * NO USE?
 * 
 * 
 */
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(512));
$form_name = "affich_packets";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(475) => 'PKG_ID', $l->g(49) => 'NAME', $l->g(440) => 'PRIORITY', $l->g(464) => 'FRAGMENTS', $l->g(462) . " Ko" => 'SIZE', $l->g(25) => 'OSNAME', 'COMMENT' => 'COMMENT');
$list_col_cant_del = array($l->g(475) => $l->g(475), $l->g(49) => $l->g(49));
$default_fields = $list_col_cant_del;
$pack_sup = $l->g(561);
$queryDetails = "SELECT PKG_ID,NAME,PRIORITY,FRAGMENTS,round(SIZE/1024,2) as SIZE,OSNAME,COMMENT\n\t\t\t\t\t\tFROM download_history h LEFT JOIN download_available a ON h.pkg_id=a.fileid \n\t\t\t\t\t\twhere hardware_id=%s and name is not null";
$arg = array($systemid);
if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES") {
    $queryDetails .= " and a.comment not like '%s'";
    array_push($arg, '%[VISIBLE=0]%');
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(272));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_ports";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(66) => 'TYPE', $l->g(49) => 'NAME', $l->g(84) => 'CAPTION', $l->g(53) => 'DESCRIPTION');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
//	$tab_options['FILTRE']=array('NAME'=>$l->g(49),'MANUFACTURER'=>$l->g(64),'TYPE'=>$l->g(66));
$queryDetails = "SELECT * FROM ports WHERE (hardware_id={$systemid})";
ajaxtab_entete_fixe($list_fields, $default_fields, $tab_options, $list_col_cant_del);
Example #18
0
function print_toggle_box_item($item_xml)
{
    print_item_header(find_xml_value($item_xml, 'header'), '', '', find_xml_value($item_xml, 'icon-class'));
    $tab_xml = find_xml_node($item_xml, 'tab-item');
    echo "<ul class='gdl-toggle-box'>";
    foreach ($tab_xml->childNodes as $toggle_box) {
        $active = find_xml_value($toggle_box, 'active') == 'Yes' ? 'active' : '';
        echo '<li class="' . $active . '">';
        echo '<h2 class="toggle-box-title"><span class="toggle-box-icon"></span>' . find_xml_value($toggle_box, 'title') . '</h2>';
        echo '<div class="toggle-box-content">';
        echo do_shortcode(html_entity_decode(find_xml_value($toggle_box, 'caption'))) . '</div>';
        echo '</li>';
    }
    echo '</ul>';
}
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(54));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_processors";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$sql = "select id from cpus where hardware_id=%s";
$arg = $systemid;
$res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg);
$val = mysqli_fetch_array($res);
if (isset($val['id'])) {
    $list_fields = array($l->g(64) => 'MANUFACTURER', $l->g(66) => 'TYPE', $l->g(36) => 'SERIALNUMBER', $l->g(429) => 'SPEED', $l->g(1317) => 'CORES', $l->g(1318) => 'L2CACHESIZE', $l->g(1247) => 'CPUARCH', $l->g(1312) => 'DATA_WIDTH', $l->g(1313) => 'CURRENT_ADDRESS_WIDTH', $l->g(1314) => 'LOGICAL_CPUS', $l->g(1319) => 'VOLTAGE', $l->g(1315) => 'CURRENT_SPEED', $l->g(1316) => 'SOCKET');
Example #20
0
<?php

//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
print_item_header($l->g(1266));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_vm";
$table_name = $form_name;
echo open_form($form_name);
$list_fields = array($l->g(49) . ' VM' => 'vm.NAME', $l->g(1046) . ' VM' => 'vm.STATUS', $l->g(25) . ' VM' => 'vm.SUBSYSTEM', $l->g(66) . ' VM' => 'vm.VMTYPE', 'UUID' => 'vm.UUID', $l->g(54) . ' VM' => 'vm.VCPU', $l->g(26) . ' VM' => 'vm.MEMORY', 'NAME' => 'h.name', $l->g(25) => "h.osname");
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= ",h.ID FROM virtualmachines vm left join hardware h on h.uuid=vm.uuid  WHERE (hardware_id=%s)";
array_push($sql['ARG'], $systemid);
$tab_options['ARG_SQL'] = $sql['ARG'];
$tab_options['ARG_SQL_COUNT'] = $systemid;
tab_req($table_name, $list_fields, $default_fields, $list_col_cant_del, $sql['SQL'], $form_name, 80, $tab_options);
echo close_form();
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header($l->g(26));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "affich_memories";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array($l->g(80) => 'CAPTION', $l->g(53) => 'DESCRIPTION', $l->g(83) . " (MB)" => 'CAPACITY', $l->g(283) => 'PURPOSE', $l->g(66) => 'TYPE', $l->g(268) => 'SPEED', $l->g(94) => 'NUMSLOTS', $l->g(36) => 'SERIALNUMBER');
if ($show_all_column) {
    $list_col_cant_del = $list_fields;
} else {
    $list_col_cant_del = array($l->g(80) => $l->g(80), $l->g(83) => $l->g(83));
}
Example #22
0
//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
/*
 * 
 * Show sd_switch data
 * 
 */
print_item_header($l->g(1218));
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$table_name = "sd_switch";
/*MANUFACTURER 
REFERENCE    
TYPE         
SOFTVERSION  
FIRMVERSION  
SERIALNUMBER 
REVISION     
DESCRIPTION  
*/
$list_fields = array($l->g(64) => 'MANUFACTURER', $l->g(1235) => 'REFERENCE', $l->g(66) => 'TYPE', $l->g(1236) => 'SOFTVERSION', $l->g(1237) => 'FIRMVERSION', $l->g(36) => 'SERIALNUMBER', $l->g(18) => 'REVISION', $l->g(53) => 'DESCRIPTION');
//$list_fields['SUP']= 'ID';
Example #23
0
         the_content();
         wp_link_pages(array('before' => '<div class="page-link"><span>' . __('Pages:', 'gdl_front_end') . '</span>', 'after' => '</div>'));
         echo '</div>';
         echo '</div>';
         // port content wrapper
         echo '<div class="clear"></div>';
     }
 }
 // print related portfolio
 if ($related_portfolio == 'Yes') {
     echo '<div class="gdl-related-portfolio">';
     $port_size = get_option(THEME_SHORT_NAME . '_gdl_related_portfolio_size', '1/4');
     $num_fetch = get_option(THEME_SHORT_NAME . '_gdl_related_portfolio_num_fetch', 4);
     $show_title = get_option(THEME_SHORT_NAME . '_gdl_related_portfolio_title', 'Yes') == 'Yes' ? true : false;
     $show_tag = get_option(THEME_SHORT_NAME . '_gdl_related_portfolio_tag', 'Yes') == 'Yes' ? true : false;
     print_item_header($translator_related_portfolio);
     $portfolio_tags = get_the_terms(get_the_ID(), 'portfolio-tag');
     $portfolio_terms = array();
     if (!empty($portfolio_tags)) {
         foreach ($portfolio_tags as $portfolio_tag) {
             $portfolio_terms[] = $portfolio_tag->slug;
         }
         $current_post = array(get_the_ID());
         $tax_query = array(array('taxonomy' => 'portfolio-tag', 'field' => 'slug', 'terms' => $portfolio_terms));
         query_posts(array('post_type' => 'portfolio', 'tax_query' => $tax_query, 'posts_per_page' => $num_fetch, 'post__not_in' => $current_post));
         print_normal_portfolio($port_size, $show_title, $show_tag);
     }
     echo '<div class="clear"></div>';
     echo '</div>';
     // gdl-related-portfolio
 }
// Copyleft Erwan GOALOU 2010 (erwan(at)ocsinventory-ng(pt)org)
// Web: http://www.ocsinventory-ng.org
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
print_item_header("Windows Update State");
if (!isset($protectedPost['SHOW'])) {
    $protectedPost['SHOW'] = 'NOSHOW';
}
$form_name = "winupdate";
$table_name = $form_name;
$tab_options = $protectedPost;
$tab_options['form_name'] = $form_name;
$tab_options['table_name'] = $table_name;
echo open_form($form_name);
$list_fields = array('Scheduled Install Date' => 'SCHEDULEDINSTALLDATE', 'Last Succes Time' => 'LASTSUCCESSTIME', 'Detect Succes Time' => 'DETECTSUCCESSTIME', 'Download Succes Time' => 'DOWNLOADSUCCESSTIME');
$list_col_cant_del = $list_fields;
$default_fields = $list_fields;
$sql = prepare_sql_tab($list_fields);
$sql['SQL'] .= "FROM winupdatestate WHERE (hardware_id = {$systemid})";
array_push($sql['ARG'], $systemid);