示例#1
0
function setFunction($UID, $Function)
{
    $UID = sanitize($UID);
    $Function = sanitize($Function);
    if (slave_exists($UID)) {
        $functions = getFunction($UID);
        if ($functions == "") {
            mysql_query("UPDATE slaves SET Function='{$Function}' WHERE `Unique_ID` = '{$UID}'") or die(mysql_error());
        } else {
            $functions = $functions . ", " . $Function;
            mysql_query("UPDATE slaves SET Function='{$functions}' WHERE `Unique_ID` = '{$UID}'") or die(mysql_error());
        }
    }
}
示例#2
0
function getMethod()
{
    return getFunction();
}
示例#3
0
        ?>
</i>
<br /><br />
<b>Selected Array:&nbsp; </b><i><?php 
        print_r($inputArray);
        ?>
</i>
<br /><br />
<b>Selected Elements:&nbsp; </b><i><?php 
        print_r($wantedElements);
        ?>
</i>
<br /><br />
<?php 
    }
    $resultArray = (array) getFunction($endpoint, $function, $inputArray, $wantedElements, $mode, (int) $_POST["limit"]);
    echo "<center><b>---- Query ----- </b></center> <br />" . "\n";
    echo str_replace("#&gt;", "#&gt;<br />", $resultArray[1]);
    //echo $resultArray[1];
    echo "<br /><br />" . "\n";
    echo "<center><b>---- Result ----- </b></center> <br />" . "\n";
    $selectPartspec = (array) GR4PHP_Template::getSelectPartsByFunction($_POST["function"]);
    $selectPartDefault = (array) GR4PHP_Template::getSelectPartsByFunction("general");
    $selectPartComplete = array_merge($selectPartDefault, $selectPartspec);
    echo "<center><table border='1'>" . "\n";
    echo "<tr>" . "\n";
    if ($wantedElements != NULL) {
        $selectPartComplete = getWantedElements($wantedElements, $selectPartComplete);
    }
    $selectWithout = array();
    foreach ($selectPartComplete as $spc) {
示例#4
0
文件: index.php 项目: stamlercas/csa
function FunctionEdit()
{
    $id = $_GET["id"];
    if (empty($id)) {
        displayError("An ID is required for this function.");
    } else {
        $row = getFunction($id);
        if ($row == false) {
            displayError("<p>Function ID is not on file.</p> ");
        } else {
            $id = $row["FunctionID"];
            $name = $row["Name"];
            $desc = $row["Description"];
            include '../security/modify_function_form.php';
        }
    }
}
示例#5
0
function getMethod()
{
    return getClass() . '::' . getFunction();
}