コード例 #1
0
ファイル: addservice.php プロジェクト: pulse-project/pulse
    $target_uuid = $_GET['gid'];
} else {
    $type = '';
    $target_uuid = $_GET['uuid'];
}
if (isset($_GET['mod'])) {
    $mod = $_GET['mod'];
} else {
    $mod = "none";
}
switch ($mod) {
    case 'add':
        service_add($type, $target_uuid);
        break;
    case 'edit':
        service_edit($type, $target_uuid);
        break;
    default:
        service_add($type, $target_uuid);
        break;
}
function service_add($type, $target_uuid)
{
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = urldecode($_GET['itemlabel']);
    $f = new PopupForm(sprintf(_T("Add the boot service <b>%s</b> to <b>%s</b>", "imaging"), $label, $params['hostname']));
    # Need to get the name of the target
    $f->push(new Table());
    // form preseeding
    $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True));
コード例 #2
0
<?php

include_once 'database.php';
$id = $_GET['id'];
$n = find_service($id);
if (isset($_POST['edit'])) {
    service_edit($_POST);
    header('Location:index.php?page=services');
}
?>

<html>
<head><title>PH directory</title></head>
<body>
	<h2>Edit Service</h2>
	<form method="post" class="form-horizontal">
		<div class="form-group">
			<label id="form-label">Service Name</label>
			<input type="text" name="servicename" placeholder="Title" class="form-control" value="<?php 
echo $n['serviceName'];
?>
" required>

			<label id="form-label">Service Type</label>
			<input type="text" name="servicetype" placeholder="website link" class="form-control" value="<?php 
echo $n['serviceType'];
?>
">

			<label id="form-label">Details</label>
			<textarea rows="4" name="details" placeholder="Enter details here..." class="form-control" required><?php 
コード例 #3
0
ファイル: service_add.php プロジェクト: sebastiendu/mmc
        exit;
    } else {
        new NotifyWidgetFailure($ret[1]);
    }
}
if (isset($_GET['mod'])) {
    $mod = $_GET['mod'];
} else {
    $mod = "none";
}
switch ($mod) {
    case 'add':
        service_add($location);
        break;
    case 'edit':
        service_edit($location);
        break;
    default:
        service_add($location);
        break;
}
function service_add($location)
{
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = urldecode($_GET['itemlabel']);
    $f = new PopupForm(sprintf(_T("Add the boot service <b>%s</b> to the default boot menu", "imaging"), $label));
    $f->push(new Table());
    // form preseeding
    $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True));
    $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True));