desactive_packet('', $v);
            }
        }
        mysql2_query_secure("DELETE FROM download_enable WHERE FILEID=%s", $_SESSION['OCS']["writeServer"], $protectedPost['DEL_ALL']);
        echo "<script>window.opener.document.packlist.submit(); self.close();</script>";
    }
    if ($protectedPost['SUP_PROF'] != '') {
        desactive_packet('', $protectedPost['SUP_PROF']);
        mysql2_query_secure("DELETE FROM download_enable WHERE ID=%s", $_SESSION['OCS']["writeServer"], $protectedPost['SUP_PROF']);
    }
}
$sql_details = "select distinct priority,fragments,size from download_available where fileid=%s";
$res_details = mysql2_query_secure($sql_details, $_SESSION['OCS']["readServer"], $protectedGet['timestamp']);
$val_details = mysqli_fetch_array($res_details);
$tps = "<br>" . $l->g(992) . " : <b><font color=red>" . tps_estimated($val_details) . "</font></b>";
PrintEnTete($l->g(481) . $tps);
echo "<br>";
$form_name = "tele_actives";
//ouverture du formulaire
echo open_form($form_name);
$list_fields = array($l->g(460) => 'e.ID', 'Timestamp' => 'e.FILEID', $l->g(470) => 'e.INFO_LOC', $l->g(471) => 'e.PACK_LOC', $l->g(49) => 'a.NAME', $l->g(440) => 'a.PRIORITY', $l->g(480) => 'a.FRAGMENTS', $l->g(462) => 'a.SIZE', $l->g(25) => 'a.OSNAME');
if (!$cant_active) {
    $list_fields['SUP'] = 'e.ID';
}
$table_name = "LIST_ACTIVES";
$default_fields = $list_fields;
$list_col_cant_del = array($l->g(460) => $l->g(460), 'SUP' => 'SUP');
$querypack = 'SELECT distinct ';
foreach ($list_fields as $key => $value) {
    if ($key != 'SUP') {
        $querypack .= $value . ',';
Ejemplo n.º 2
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
//====================================================================================
require_once 'require/function_search.php';
require_once 'require/function_computers.php';
PrintEnTete($l->g(985));
$form_name = "del_affect";
echo open_form($form_name);
echo "<div align=center>";
$list_id = multi_lot($form_name, $l->g(601));
if ($protectedPost['SUP'] != '' and isset($protectedPost['SUP'])) {
    $array_id = explode(',', $list_id);
    //$i=0;
    foreach ($array_id as $key => $hardware_id) {
        deleteDid($hardware_id);
        //echo $hardware_id."<br>";
    }
}
if ($list_id) {
    echo "<br><br><input type='submit' value=\"" . $l->g(122) . "\" name='SUP'>";
}
echo "</div>";
//<input type=submit value='Supprimer TOUTES les machines?' name='delete'>
//Modified on $Date: 2010 $$Author: Erwan Goalou
if (AJAX) {
    parse_str($protectedPost['ocs']['0'], $params);
    $protectedPost += $params;
    ob_start();
    $ajax = true;
} else {
    $ajax = false;
}
require_once 'require/function_telediff.php';
require_once 'require/function_computers.php';
$form_name = 'packlist';
//show or not stats on the table
$show_stats = true;
echo open_form($form_name);
PrintEnTete($l->g(465));
if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_ACTIVATE') == 'NO') {
    $cant_active = false;
} else {
    $cant_active = true;
}
if ($_SESSION['OCS']['profile']->getRestriction('GUI') == 'YES') {
    $restrict_computers = computer_list_by_tag('', 'ARRAY');
    if ($restrict_computers == "ERROR") {
        msg_error($l->g(893));
        require_once FOOTER_HTML;
        die;
    }
}
$tab_options = $protectedPost;
//only for profils who can activate packet
Ejemplo n.º 4
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
//====================================================================================
require_once 'require/function_search.php';
PrintEnTete($l->g(976));
$form_name = "lock_affect";
echo open_form($form_name);
echo "<div align=center>";
$list_id = multi_lot($form_name, $l->g(601));
if ($protectedPost['LOCK'] != '' and isset($protectedPost['LOCK'])) {
    if (isset($_SESSION['OCS']["mesmachines"])) {
        $_SESSION['OCS']["TRUE_mesmachines"] = $_SESSION['OCS']["mesmachines"];
    } else {
        $_SESSION['OCS']["TRUE_mesmachines"] = array();
    }
    $_SESSION['OCS']["mesmachines"] = " a.hardware_id in (" . $list_id . ")";
    echo "<script language='javascript'> window.opener.document.multisearch.submit();self.close();</script>";
}
if ($protectedPost['CHOISE'] != "") {
    echo "<br><br><b>" . $l->g(978) . "</b>";
    echo "<br><br>" . $l->g(979);
    echo "<br><br><input type='submit' value=" . $l->g(977) . " name='LOCK'>";
}