Esempio n. 1
0
<?php

// Balance listing API.
$balances = $dz->get_list('select `Root.Balances`.`Key`,`Root.Balances`.`Balance`,`Root.Balances`.`Commodity`,`Root.Entities`.`Endpoint` as `Entity` from `Root.Balances` left join `Root.Entities` on `Root.Balances`.`Entity` = `Root.Entities`.`ID`');
// Show the list now!
showList($balances, array('Key', 'Balance', 'Commodity', 'Entity'), function (&$row) {
    // Hex encode the key:
    $row['Key'] = bin2hex($row['Key']);
    if (!$row['Entity']) {
        $row['Entity'] = '';
    }
});
Esempio n. 2
0
<?php

// Checkout listing API (for a particular merchant account).
postedTo();
if ($verifiedAccount == 0) {
    // Account required!
    error('account/required');
}
// Get the checkouts:
$checkouts = $dz->get_list('select `ID`,`Code`,`CreatedOn`,`Type` from `Merchant.Checkouts` where `Account`=' . $verifiedAccount);
// Show the list now!
showList($checkouts, array('ID', 'Code', 'CreatedOn', 'Type'));
Esempio n. 3
0
<?php

// Changes listing API. Includes all transactions and issues.
$entities = $dz->get_list('select * from `Root.Changes`');
// Show the list now!
showList($entities, array('RequestID', 'Signature', 'Time', 'Type', 'Content'));
Esempio n. 4
0
<?php

// Number system listing API.
// Get the systems:
$systems = $dz->get_list('select `Merchant.ProductNumberSystems`.`Code`,`Merchant.ProductNumberSystems`.`Endpoint`,`Merchant.ProductNumberSystems`.`Name`,`Root.Entities`.`Endpoint` as `RegisteredBy` from `Merchant.ProductNumberSystems` left join `Root.Entities` on `Merchant.ProductNumberSystems`.`RegisteredBy`=`Root.Entities`.`ID`');
// Show the list now!
showList($systems, array('Code', 'Endpoint', 'Name', 'RegisteredBy'));
Esempio n. 5
0
<?php

header('Content-Type: text/xml; charset=utf-8');
require_once "../includes/session.php";
require_once "../includes/functions.php";
require_once "../includes/connect.php";
if (isset($_GET['item'])) {
    addList();
} else {
    if (isset($_GET['delete'])) {
        deleteList();
        showList();
    } else {
        showList();
    }
}
function addList()
{
    global $connection;
    $day = $_GET['day'];
    $sql = "SELECT id, name FROM food WHERE id IN (" . $_GET['item'] . ")";
    $result_set = mysql_query($sql, $connection);
    confirm_query($result_set);
    if (mysql_num_rows($result_set) >= 1) {
        echo "<foods>";
        while ($foods = mysql_fetch_array($result_set)) {
            $sql = "INSERT INTO food_day (food_id, date) VALUES(" . $foods['id'] . ", '" . get_date_of_day($day) . "')";
            $results = mysql_query($sql, $connection);
            confirm_query($results);
            echo "<food id='" . mysql_insert_id($connection) . "'>" . $foods['name'] . "</food>";
        }
Esempio n. 6
0
<?php

// Commodity listing API.
$coms = $dz->get_list('select `Tag`,`Description_en`,`Name_en`,`Divisor`,`Policy`,`Root.Entities`.`Endpoint` as `Issuer` from `Root.Commodities` left join `Root.Entities` on `Root.Entities`.`ID` = `Root.Commodities`.`Issuer`');
// Show the list now!
showList($coms, array('Tag', 'Description_en', 'Name_en', 'Divisor', 'Issuer', 'Policy'));
if ($_GET['reference'] == "%") {
    $cREFERENCE = $listREFERENCE[rand(0, sizeof($listREFERENCE) - 1)];
} else {
    $cREFERENCE = $_GET['reference'];
}
print "<div style=\"color:blue; font-style:italic\">Select root and  features</div>";
print "<table id='outputT' width=\"100%\" style=\"background-color:#FFD4A8; font-size:95%\" >\n<tr style=\"font-size:95%\">\n<th>ROOT</th>\n<th>CATEGORY</th>\n<th>GENDER</th>\n<th>NUMBER</th>\n<th>PERSON</th>\n<th>CASE</th>\n<th>TENSE</th>\n<th></th>\n</tr>";
$default_option = array("root" => $cROOT, "category" => $cCATEGORY, "gender" => $cGENDER, "form" => $cFORM, "person" => $cPERSON, "CASE" => $cCASE, "tense" => $cTENSE, "reference" => $cREFERENCE);
print "<tr>";
echo "<td align='center' class='ROOT' > " . showList($listROOT, $default_option["root"], "<select name='root' id='root' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "root") . "</td>";
echo "<td align='center' class='CATEGORY' > " . showList($listCATEGORY, $default_option["category"], "<select name='category' id='category' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "category") . "</td>";
echo "<td align='center' class='GENDER' > " . showList($listGENDER, $default_option["gender"], "<select name='gender' id='gender' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "gender") . "</td>";
echo "<td align='center' class='NUMBER'> " . showList($listFORM, $default_option["form"], "<select name='number' id='number' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "form") . "</td>";
echo "<td align='center' class='PERSON'>" . showList($listPERSON, $default_option["person"], "<select name='person' id='person' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "person") . "</td>";
echo "<td align='center' class='CASE' >" . showList($listREFERENCE, $default_option["reference"], "<select name='case' id='case' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "reference") . "</td>";
echo "<td align='center' class='TENSE' >" . showList($listTENSE, $default_option["tense"], "<select name='tense' id='tense' class='spmHandler' onchange='set(this.value);'>", $cROOT, $cCATEGORY, $cGENDER, $cFORM, $cPERSON, $cTENSE, $cREFERENCE, $lang, $scr, "tense") . "</td>";
print "</tr>";
print "</table>";
$root = $cROOT;
$fp = fopen("features.txt", "r");
$word = array();
while (!feof($fp)) {
    $string = fgets($fp);
    $string = str_replace("\n", "\t", $string);
    $try = explode("\t", $string);
    if (in_array($try[0], $word) == false and $try[1] == $root) {
        array_push($word, $try[0]);
    }
}
array_push($word, "NONE");
fclose($fp);
Esempio n. 8
0
<TD colspan="3" class="CONTINGUT_ADMIN">	

	<?php 
include_partial('breadcumb', array('text' => 'HORARI PERSONAL'));
?>
	
    
    <?php 
if (isset($FPERSONAL)) {
    echo showForm($FPERSONAL, $ERROR, $IDU, $DATE);
}
?>
    
    <?php 
if (isset($DADES_DIA_USUARI)) {
    echo showList($DADES_DIA_USUARI, $DIA);
}
?>
    
    <?php 
echo showCalendari($DATAI, $CALENDARI);
?>
              	 
     
</TD>
                
<?php 
function menu($seleccionat = 1, $nova = false)
{
    echo "<TABLE class=\"REQUADRE\"><tr>";
    if (!$nova) {
Esempio n. 9
0
    $match = $resultArray[1];
    //---showProfile---//
    if ($pageType === "profile") {
        include "showProfile.php";
        $result = showProfile($match);
        echo $pageType . ":|:|:|:" . $result;
    } elseif ($pageType === "project") {
        include "showProject.php";
        $result = showProject($match);
        echo $pageType . ":|:|:|:" . $result;
    } elseif ($pageType === "search") {
        include "showSearch.php";
        $result = showSearch($match);
        if ($result === "") {
            echo $pageType;
        } else {
            echo $pageType . ":|:|:|:" . $result;
        }
    } elseif ($pageType === "home") {
        echo "home";
    }
} elseif (isset($_POST["showList"])) {
    include "showList.php";
    if (isset($_POST["q"])) {
        $q = $_POST["q"];
    } else {
        $q = 0;
    }
    $result = showList($q);
    echo "list" . ":|::|::|:" . $result;
}
Esempio n. 10
0
<?php

// Group listing API.
$groups = $dz->get_list('select `ID`,`Code`,`Name_en`,`Planet` from `Root.Groups`');
// Show the list now!
showList($groups, array('ID', 'Code', 'Name_en', 'Planet'));
Esempio n. 11
0
  GLPI is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  GLPI is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with GLPI; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  ------------------------------------------------------------------------
*/
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '../../..');
}
$NEEDED_ITEMS = array("fusioninventory", "search");
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER["PHP_SELF"], "plugins", "fusioninventory", "agents");
PluginFusioninventoryAuth::checkRight("agents", "r");
PluginFusioninventoryDisplay::mini_menu();
manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_SNMP_AGENTS);
$_GET['target'] = "agents.php";
searchForm(PLUGIN_FUSIONINVENTORY_SNMP_AGENTS, $_GET);
showList(PLUGIN_FUSIONINVENTORY_SNMP_AGENTS, $_GET);
commonFooter();
Esempio n. 12
0
<?php

// Balance listing API (for a particular bank account).
postedTo();
if ($verifiedAccount == 0) {
    // Account required!
    error('account/required');
}
// Get the balances:
$balances = $dz->get_list('select `Amount`,`Root.Commodities`.`Name_en` as `Name`,`Root.Commodities`.`Divisor` as `Divisor`,`Root.Commodities`.`Tag` as `Tag` from `Bank.Account.Balances` left join `Root.Commodities` on `Root.Commodities`.`Tag` = `Bank.Account.Balances`.`Commodity` where `Bank.Account.Balances`.`Account`=' . $verifiedAccount);
// Show the list now!
showList($balances, array('Amount', 'Name', 'Divisor', 'Tag'));
    if (isset($_GET["Field"]) and !empty($_GET["Field"])) {
        $_GET["contains"][1] = $_GET["Field"];
        $_GET["link"][1] = "AND";
    } else {
        $_GET["contains"][1] = "";
        $_GET["link"][1] = "AND";
    }
    if ($_GET["FK_networking_ports"] == '-----') {
        $_GET["contains"][0] = '*';
    }
    $_GET["sort"] = 1;
    $_GET["order"] = "DESC";
    //if($_GET["field"][0] != "view")
    //{
    $_SESSION["glpisearchcount"][PLUGIN_FUSIONINVENTORY_SNMP_HISTORY] = 2;
    showList(PLUGIN_FUSIONINVENTORY_SNMP_HISTORY, $_GET);
}
//}
echo "</form>";
commonFooter();
function displaySearchForm($FK_port)
{
    global $DB, $_SERVER, $_GET, $GEDIFFREPORTLANG, $LANG, $CFG_GLPI, $FUSIONINVENTORY_MAPPING;
    include_once GLPI_ROOT . '/plugins/fusioninventory/inc_constants/snmp.mapping.constant.php';
    echo "<form action='" . $_SERVER["PHP_SELF"] . "' method='post'>";
    echo "<table class='tab_cadre' cellpadding='5'>";
    echo "<tr class='tab_bg_1' align='center'>";
    echo "<td>";
    echo $LANG["reports"][46] . " :&nbsp;";
    $query = "SELECT `glpi_networking`.`name` as `name`, `glpi_networking_ports`.`name` as `pname`,\r\n                    `glpi_networking_ports`.`ID` as `ID`\r\n             FROM `glpi_networking`\r\n                  LEFT JOIN `glpi_networking_ports` ON `on_device` = `glpi_networking`.`ID`\r\n             WHERE `device_type`=" . NETWORKING_TYPE . "\r\n             ORDER BY `glpi_networking`.`name`, `glpi_networking_ports`.`logical_number`;";
    echo "<select name='FK_networking_ports'>";
Esempio n. 14
0
<?php

// Transfer history API (for a particular bank account).
postedTo();
if ($verifiedAccount == 0) {
    // Account required!
    error('account/required');
}
// Get the tx history:
$subs = $dz->get_list('select * from `Bank.Transactions` where `Account`=' . $verifiedAccount);
// Show the list now!
showList($subs, array('ID', 'Type', 'Amount', 'Commodity', 'Reference', 'Name', 'Username', 'ItemInformation', 'TimeAt'));
Esempio n. 15
0
  GLPI is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  GLPI is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with GLPI; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  ------------------------------------------------------------------------
*/
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '../../..');
}
$NEEDED_ITEMS = array("fusioninventory", "search");
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER["PHP_SELF"], "plugins", "fusioninventory", "task");
PluginFusioninventoryDisplay::mini_menu();
manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_TASK);
$_GET['target'] = "task.php";
searchForm(PLUGIN_FUSIONINVENTORY_TASK, $_GET);
showList(PLUGIN_FUSIONINVENTORY_TASK, $_GET);
commonFooter();
Esempio n. 16
0
  GLPI is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  GLPI is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with GLPI; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  ------------------------------------------------------------------------
*/
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '../../..');
}
$NEEDED_ITEMS = array("fusioninventory", "search");
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER["PHP_SELF"], "plugins", "fusioninventory", "rangeip");
PluginFusioninventoryAuth::checkRight("rangeip", "r");
PluginFusioninventoryDisplay::mini_menu();
manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_SNMP_RANGEIP);
$_GET['target'] = "rangeip.php";
searchForm(PLUGIN_FUSIONINVENTORY_SNMP_RANGEIP, $_GET);
showList(PLUGIN_FUSIONINVENTORY_SNMP_RANGEIP, $_GET);
commonFooter();
        saveTree($tree, $revision);
        showTreeForm($tree, $revision);
        $tree->overview();
        break;
    case 'save-branch':
        saveBranch($tree);
        $tree->saveData();
        showTreeForm($tree, $revision);
        $tree->overview();
        break;
    case 'edit-branch':
    case 'new-branch':
        showBranchForm($tree, $branchID);
        break;
    default:
        showList($tree);
}
?>
</body>
</html>
<?php 
function showList($tree)
{
    ?>
  <a class="btnCreateNewTree">Create a new decision tree &raquo;</a>
  <?php 
    $tree->listAll();
}
function showTreeForm($tree, $selectedRevision)
{
    $treeViewerID = substr(substr($tree->treeID, 0, strlen($tree->treeID) - 4), 4);
Esempio n. 18
0
<?php

// Classification listing API.
// Get the classifications:
$classifications = $dz->get_list('select * from `Merchant.OPC`');
// Show the list now!
showList($classifications, array('OPC', 'Name_en', 'RawData', 'Parent'));
Esempio n. 19
0
$lstUsersInAcl = createList('lstUserIn', $usersInAcl);
$lstUsersNotInAcl = createList('lstUserNotIn', $usersNotInAcl);
$hdrUsersInAcl = 'Access control users';
$hdrUsersNotInAcl = 'Users';
$tblUsersInAcl = showList($hdrUsersInAcl, $lstUsersInAcl);
$tblUsersNotInAcl = showList($hdrUsersNotInAcl, $lstUsersNotInAcl);
//----- GROUP LIST ------------
$tree =& $this->getObject('groupadmin_tree', 'groupadmin');
$groupsInAcl = $this->objPermAcl->getAclGroups($aclId);
$groupsNotInAcl = $this->objGAModel->getGroups(array("id", "name"));
$lstGroupsInAcl = createList('lstGroupIn', $groupsInAcl);
$lstGroupsNotInAcl = createList('lstGroupNotIn', $groupsNotInAcl);
$hdrGroupsInAcl = 'Access control groups';
$hdrGroupsNotInAcl = 'Groups';
$tblGroupsInAcl = showList($hdrGroupsInAcl, $lstGroupsInAcl);
$tblGroupsNotInAcl = showList($hdrGroupsNotInAcl, $lstGroupsNotInAcl);
//------- BUTTONS -----------
$objSkin =& $this->getObject('skin', 'skin');
$iconsURL = $objSkin->getSkinURL() . "icons";
$tblUserButtons = "<TABLE>";
$tblUserButtons .= "<TR><TD><BUTTON class='button' type='submit' onClick='document.frmEditAcl.btnUserInsert.value=\"clicked\"'>&gt;&gt;</BUTTON></TD></TR>";
$tblUserButtons .= "<TR><TD><BUTTON class='button' type='submit' onClick='document.frmEditAcl.btnUserRemove.value=\"clicked\"'>&lt;&lt;</BUTTON></TD></TR>";
$tblUserButtons .= "</TABLE>";
$tblUserButtons .= "<INPUT type='hidden' name='btnUserInsert' value='notClicked'>";
$tblUserButtons .= "<INPUT type='hidden' name='btnUserRemove' value='notClicked'>";
$tblGroupButtons = "<TABLE>";
$tblGroupButtons .= "<TR><TD><BUTTON class='button' type='submit' onClick='document.frmEditAcl.btnGroupInsert.value=\"clicked\"'>&gt;&gt;</BUTTON></TD></TR>";
$tblGroupButtons .= "<TR><TD><BUTTON class='button' type='submit' onClick='document.frmEditAcl.btnGroupRemove.value=\"clicked\"'>&lt;&lt;</BUTTON></TD></TR>";
$tblGroupButtons .= "</TABLE>";
$tblGroupButtons .= "<INPUT type='hidden' name='btnGroupInsert' value='notClicked'>";
$tblGroupButtons .= "<INPUT type='hidden' name='btnGroupRemove' value='notClicked'>";
    $flag_chk = 1;
}
echo "<td align='center' class='check hidden'>" . display($flag) . "</td>";
print "</tr>";
print "<tr>";
echo "<td>CASE</td>";
echo "<td align='center' class='CASE' >" . showList($listREFERENCE, $default_option["reference"], "<select name='case' id='case' class='spmHandler' onchange=change()>", $myWord) . "</td>";
$flag = check($cREFERENCE, $myWord, 5);
if ($flag == 0) {
    $flag_chk = 1;
}
echo "<td align='center' class='check hidden'>" . display($flag) . "</td>";
print "</tr>";
print "<tr>";
echo "<td>TENSE</td>";
echo "<td align='center' class='TENSE' >" . showList($listTENSE, $default_option["tense"], "<select name='tense' id='tense' class='spmHandler' onchange=change() >", $myWord) . "</td>";
$flag = check($cTENSE, $myWord, 9);
if ($flag == 0) {
    $flag_chk = 1;
}
echo "<td align='center' class='check hidden'>" . display($flag) . "</td>";
print "</tr>";
print "<tr>";
echo "<td align='center'><button onclick=\"checkValue('" . $myWord . "');\">Check</button></td><td class='hidden'>";
if ($flag_chk == 0 and $_GET['turn'] != "%") {
    echo "<br/><br/><p id='right_wrong' style='text-align:center;font-size:30px;color:#008000'>Right answer!!!</p>";
} else {
    if ($flag_chk == 1) {
        echo "<br/><br/><p id='right_wrong' style='text-align:center;font-size:30px;color:#FF0000'>Wrong answer!!!</p>";
        echo "<br/><br/><div id='get_hide'><button onclick=\"getAnswer('" . $myWord . "');\">Get Answers</button></div>";
    }
Esempio n. 21
0
<?php

// Setting listing API (for a particular merchant account).
postedTo();
if ($verifiedAccount == 0) {
    // Account required!
    error('account/required');
}
// Get the settings:
$settings = $dz->get_list('select * from `Merchant.Account.Settings` where `Account`=' . $verifiedAccount);
// Show the list now!
showList($settings, array('ID', 'Setting', 'Value'));
Esempio n. 22
0
		</ul>
	</div>

	<div class="navigation" id = "inter">
        <?php 
function showList($hrefs, $listobjects)
{
    echo "<ul>";
    for ($i = 0; $i < count($hrefs); $i++) {
        echo "<li> <a href=\"" . $hrefs[$i] . "\"> " . $listobjects[$i] . " </a>";
    }
    echo "</ul>";
}
$hrefs = array('interests.php#films', 'interests.php#books', 'interests.php#music');
$listobject = array('Любимые фильмы', 'Любимые книги', 'Любимая музыка');
showList($hrefs, $listobject);
?>
	</div>
    <div class="bodyi">
        <a name="films"> Мои любимые фильмы </a>
        <br>
        <img src="images/lock.jpg" alt="image">
        <img src="images/vaza.jpg" alt="image">
        <img src="images/bast.jpg" alt="image">
        <br>

        <a name="books"> Мои любимые книги </a>
        <br>
        <img src="images/earthsea.jpg" alt="image">
        <img src="images/orange.jpg" alt="image">
        <img src="images/vedmak.jpg" alt="image">
Esempio n. 23
0
*/
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '../../..');
}
$NEEDED_ITEMS = array("fusioninventory", "search", "setup", "rulesengine");
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER["PHP_SELF"], "plugins", "fusioninventory", "snmp_auth");
PluginFusioninventoryAuth::checkRight("snmp_authentification", "r");
$config = new PluginFusioninventoryConfig();
PluginFusioninventoryDisplay::mini_menu();
// Forms for FILE
if ($config->getValue("authsnmp") == "file") {
    $plugin_fusioninventory_snmp_auth = new PluginFusioninventorySnmpauth();
    if (!isset($_GET["ID"])) {
        echo $plugin_fusioninventory_snmp_auth->plugin_fusioninventory_snmp_connections();
    }
} else {
    if ($config->getValue("authsnmp") == "DB") {
        // Forms for DB
        $_GET['target'] = "snmp_auth.php";
        manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_SNMP_AUTH);
        searchForm(PLUGIN_FUSIONINVENTORY_SNMP_AUTH, $_GET);
        showList(PLUGIN_FUSIONINVENTORY_SNMP_AUTH, $_GET);
    } else {
        echo $LANG['plugin_fusioninventory']["functionalities"][19];
    }
}
commonFooter();
Esempio n. 24
0
$pathOpd = '/Users/jobhenkens/Documents/allwork etc/webdesign etc/opleiding-php-drupal/web-backend/cursus/public/cursus/opdrachten';
$listVb = scandir($pathVb);
$listOpd = scandir($pathOpd);
#var_dump($listVb);
$list = array_merge($listVb, $listOpd);
#var_dump($list);
function showList($list)
{
    $result = array();
    foreach ($list as $value) {
        $result[] = $value;
    }
    return $result;
}
$resultaatVb = showList($listVb);
$resultaatOpd = showList($listOpd);
function searchFiles($list, $needle)
{
    $result = array();
    foreach ($list as $key => $value) {
        if (strpos($value, $needle)) {
            $result[] = $value;
        }
    }
    return $result;
}
if (isset($_GET['link'])) {
    $link = $_GET['link'];
} elseif (isset($_GET['zoeken'])) {
    $getZoek = $_GET['zoeken'];
    $link = 'zoeken';
Esempio n. 25
0
// List all contracts within a given range.
// Get all the contract data:
$contracts = $dz->get_list('select * from `Root.Contracts`');
$contractActions = $dz->get_list('select * from `Root.Contracts.Actions`');
// Group actions into their contract:
$actionMap = array();
foreach ($contractActions as $action) {
    // Get the contract ID:
    $contractID = $action['Contract'];
    // Does the set of actions exist yet?
    if (!isset($actionMap[$contractID])) {
        // Create the set of actions for a given contract:
        $actionMap[$contractID] = array();
    }
    // Add the action to the array:
    array_push($actionMap[$contractID], array('Type' => $action['Type'], 'Values' => $action['Values']));
}
// Build the list now!
showList($contracts, array('Key', 'Name_en', 'Description_en', 'Created', 'Expires', 'ApplyOn', 'CanVote', 'Status', 'Actions'), function (&$row) {
    $row['Key'] = base64_encode($row['Key']);
    // Get the contract ID:
    $contractID = $row['ID'];
    // Get it's action set from the map, if there is one:
    if (isset($actionMap[$contractID])) {
        // Set it to the actions column:
        $row['Actions'] = $actionMap[$contractID];
    } else {
        // Otherwise it's just an empty array:
        $row['Actions'] = array();
    }
});
Esempio n. 26
0
<?php

// Device listing API (for a particular merchant account).
postedTo();
if ($verifiedAccount == 0) {
    // Account required!
    error('account/required');
}
// Get the devices:
$devices = $dz->get_list('select `ID`,`Name`,`CreatedOn` from `Merchant.Devices` where `Account`=' . $verifiedAccount);
// Show the list now!
showList($devices, array('ID', 'CreatedOn', 'Name'));
if (!isset($_GET["start"])) {
    $_GET["start"] = 0;
}
$_GET = getValues($_GET, $_POST);
displaySearchForm();
manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_SNMP_NETWORKING_PORTS2);
if (isset($_POST["dropdown_calendar"]) && isset($_POST["dropdown_sup_inf"])) {
    $_GET["field"][0] = 3;
    $_GET["contains"][0] = getContainsArray($_POST);
    $_GET["field"][1] = 2;
    $_GET["contains"][1] = $_POST['location'];
    $_GET["link"][1] = "AND";
    $_SESSION["glpisearchcount"][PLUGIN_FUSIONINVENTORY_SNMP_NETWORKING_PORTS2] = 1;
    showList(PLUGIN_FUSIONINVENTORY_SNMP_NETWORKING_PORTS2, $_GET);
} else {
    showList(PLUGIN_FUSIONINVENTORY_SNMP_NETWORKING_PORTS2, $_GET);
}
commonFooter();
function displaySearchForm()
{
    global $_SERVER, $_GET, $LANG, $CFG_GLPI;
    echo "<form action='" . $_SERVER["PHP_SELF"] . "' method='post'>";
    echo "<table class='tab_cadre' cellpadding='5'>";
    echo "<tr class='tab_bg_1' align='center'>";
    echo "<td>";
    echo $LANG["financial"][8] . " :";
    $values = array();
    $values["sup"] = ">";
    $values["inf"] = "<";
    $values["equal"] = "=";
    if (isset($_GET["contains"][1])) {
Esempio n. 28
0
<?php

// List all usernames within a given range.
$usernames = $dz->get_list('select `Root.Usernames`.`Key`,`Username`,`Root.Entities`.`Endpoint` as `Entity` from `Root.Usernames` left join `Root.Entities` on `Root.Usernames`.`Entity` = `Root.Entities`.`ID`');
// Show the list now!
showList($usernames, array('Key', 'Username', 'Entity'), function (&$row) {
    // Base 64 encode the key:
    $row['Key'] = base64_encode($row['Key']);
});
Esempio n. 29
0
<?php

// Product listing API.
// Get the products:
$products = $dz->get_list('select * from `Merchant.OPN`');
// Show the list now!
showList($products, array('OPN', 'Name_en', 'RawData', 'Category'));
Esempio n. 30
0
<?php

// Entity listing API.
$entities = $dz->get_list('select `Key`,`Type`,`Endpoint`,`Group`,`Name`,`Country` from `Root.Entities`');
// Show the list now!
showList($entities, array('Key', 'Type', 'Endpoint', 'Group', 'Name', 'Country'), function (&$row) {
    // Base 64 encode the key:
    $row['Key'] = base64_encode($row['Key']);
});