本文整理汇总了PHP中DataCenter::CreateDataCenter方法的典型用法代码示例。如果您正苦于以下问题:PHP DataCenter::CreateDataCenter方法的具体用法?PHP DataCenter::CreateDataCenter怎么用?PHP DataCenter::CreateDataCenter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataCenter
的用法示例。
在下文中一共展示了DataCenter::CreateDataCenter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// No departments defined
$nodept = "<h3>Create a department</h3>";
$nodeptdrop = "readonly";
} else {
$nodept = $nodeptdrop = "";
}
// Data Centers Form Submission
if (isset($_REQUEST['dcaction']) && ($_REQUEST['dcaction'] == 'Create' || $_REQUEST['dcaction'] == 'Update')) {
$dc->DataCenterID = $_REQUEST['datacenterid'];
$dc->Name = $_REQUEST['name'];
$dc->SquareFootage = $_REQUEST['squarefootage'];
$dc->DeliveryAddress = $_REQUEST['deliveryaddress'];
$dc->Administrator = $_REQUEST['administrator'];
$dc->DrawingFileName = $_REQUEST['drawingfilename'];
if ($_REQUEST['dcaction'] == 'Create') {
if (!$dc->CreateDataCenter()) {
$errormsg = "<h3>Datacenter not created, check the apache error log</h3>";
}
} else {
$dc->UpdateDataCenter();
}
}
if (isset($_REQUEST['datacenterid']) && $_REQUEST['datacenterid'] > 0) {
$dc->DataCenterID = $_REQUEST['datacenterid'];
$dc->GetDataCenter();
}
$dcList = $dc->GetDCList();
$result = $dbh->prepare("SELECT * FROM fac_DataCenter LIMIT 1;");
$result->execute();
if ($result->rowCount() == 0) {
// No data centers configured disable cabinets and complete options
示例2: trim
exit;
}
if (isset($_POST['action']) && ($_POST['action'] == 'Create' || $_POST['action'] == 'Update')) {
$dc->DataCenterID = $_POST['datacenterid'];
$dc->Name = trim($_POST['name']);
$dc->SquareFootage = $_POST['squarefootage'];
$dc->DeliveryAddress = $_POST['deliveryaddress'];
$dc->Administrator = $_POST['administrator'];
$dc->DrawingFileName = $_POST['drawingfilename'];
$dc->MaxkW = $_POST['maxkw'];
$dc->ContainerID = $_POST['container'];
$dc->MapX = $_POST['x'];
$dc->MapY = $_POST['y'];
if ($dc->Name != "") {
if ($_POST['action'] == 'Create') {
$dc->CreateDataCenter();
} else {
$status = __("Updated");
$dc->UpdateDataCenter();
}
}
}
if (isset($_POST['cambio_cont']) && $_POST['cambio_cont'] == 'SI') {
$dc->DataCenterID = $_POST['datacenterid'];
$dc->Name = trim($_POST['name']);
$dc->SquareFootage = $_POST['squarefootage'];
$dc->DeliveryAddress = $_POST['deliveryaddress'];
$dc->Administrator = $_POST['administrator'];
$dc->DrawingFileName = $_POST['drawingfilename'];
$dc->MaxkW = $_POST['maxkw'];
$dc->ContainerID = $_POST['container'];