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()); } } }
function getMethod() { return getFunction(); }
?> </i> <br /><br /> <b>Selected Array: </b><i><?php print_r($inputArray); ?> </i> <br /><br /> <b>Selected Elements: </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("#>", "#><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) {
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'; } } }
function getMethod() { return getClass() . '::' . getFunction(); }