本文整理汇总了PHP中DataCenter类的典型用法代码示例。如果您正苦于以下问题:PHP DataCenter类的具体用法?PHP DataCenter怎么用?PHP DataCenter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DataCenter类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: renderCabinetProps
/**
* Render cabinet properties into this view.
*
* The cabinet properties zone, row, model, maximum weight and installation date
* are rendered to be for this page. It checks if the user is allowed to see the
* content of the cabinet and only if the user does the information is provided.
*
* @param Cabinet $cab
* @param CabinetAudit $audit
* @param string $AuditorName
*/
function renderCabinetProps($cab, $audit, $AuditorName)
{
$tmpDC = new DataCenter();
$tmpDC->DataCenterID = $cab->DataCenterID;
$tmpDC->GetDataCenter();
$AuditorName = $AuditorName != '' ? "<br>{$AuditorName}" : "";
$renderedHTML = "\t\t<table id=\"cabprop\">\n\t\t\t<tr><td>" . __("Last Audit") . ":</td><td id=\"lastaudit\">{$audit->AuditStamp}{$AuditorName}</td></tr>\n\t\t\t<tr><td>" . __("Model") . ":</td><td>{$cab->Model}</td></tr>\n\t\t\t<tr><td>" . __("Data Center") . ":</td><td>{$tmpDC->Name}</td></tr>\n\t\t\t<tr><td>" . __("Install Date") . ":</td><td>{$cab->InstallationDate}</td></tr>\n";
if ($cab->ZoneID) {
$zone = new Zone();
$zone->ZoneID = $cab->ZoneID;
$zone->GetZone();
$renderedHTML .= "\t\t\t<tr><td>" . __("Zone") . ":</td><td>{$zone->Description}</td></tr>\n";
}
if ($cab->CabRowID) {
$cabrow = new CabRow();
$cabrow->CabRowID = $cab->CabRowID;
$cabrow->GetCabRow();
$renderedHTML .= "\t\t\t<tr><td>" . __("Row") . ":</td><td>{$cabrow->Name}</td></tr>\n";
}
$renderedHTML .= "\t\t\t<tr><td>" . __("Tags") . ":</td><td>" . renderTagsToString($cab) . "</td></tr>\n";
// This is out of context here and makes the information confusing.
// $renderedHTML .= ' <tr><td class="left">' . __('Front Edge') . ':</td>';
// $renderedHTML .= "<td class=\"right\">$cab->FrontEdge </td></tr>\n";
$renderedHTML .= "\t\t</table>\n";
return $renderedHTML;
}
开发者ID:olivierbeytrison,项目名称:openDCIM,代码行数:37,代码来源:cabnavigator.php
示例2: builddclist
function builddclist($id = null)
{
$dc = new DataCenter();
$dcList = $dc->GetDCList();
$idnum = '';
if (!is_null($id)) {
if ($id == "dc-front") {
$idnum = 1;
} elseif ($id == "dc-rear") {
$idnum = 2;
}
$id = " name=\"{$id}\" id=\"{$id}\"";
}
$dcpicklist = "<select{$id}><option value=0> </option>";
foreach ($dcList as $d) {
$dcpicklist .= "<option value={$d->DataCenterID}>{$d->Name}</option>";
}
$dcpicklist .= '</select>';
return $dcpicklist;
}
开发者ID:ghasedak,项目名称:openDCIM,代码行数:20,代码来源:paths.php
示例3: _putresources
function _putresources()
{
parent::_putresources();
$this->_putbookmarks();
}
function _putcatalog()
{
parent::_putcatalog();
if (count($this->outlines) > 0) {
$this->_out('/Outlines ' . $this->OutlineRoot . ' 0 R');
$this->_out('/PageMode /UseOutlines');
}
}
}
if (!isset($_REQUEST['action'])) {
$dc = new DataCenter();
$dcList = $dc->GetDCList();
?>
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="Mon, 01 Jan 1997 01:00:00 GMT">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<title>openDCIM Inventory Reporting</title>
<link rel="stylesheet" href="css/inventory.php" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css">
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:report_surplus.php
示例4: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("XML Output for CFD Simulation");
$datacenter = new DataCenter();
$dcList = $datacenter->GetDCList();
if (!isset($_REQUEST['datacenterid'])) {
?>
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="Mon, 01 Jan 1997 01:00:00 GMT">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<title>openDCIM Data Center Inventory</title>
<link rel="stylesheet" href="css/inventory.php" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
<!--[if lt IE 9]>
<link rel="stylesheet" href="css/ie.css" type="text/css" />
<![endif]-->
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#generate').hide();
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:report_xml_CFD.php
示例5: fclose
fclose($fh);
print "<p>Anything shown here is just a notice. It is not necessarily an error. We will occasionally have to repeat database modifications that will fail and will show here. <b>This is behavior is to be expected</b>. Take note of any errors displayed in red then press F5 to reload this page until it goes to the configuration screen.</p>";
} else {
echo '<p class="success">All is well. Please remove install.php to return to normal functionality</p>';
}
?>
</body>
</html>
<?php
exit;
}
require_once "facilities.inc.php";
$dept = new Department();
$dc = new DataCenter();
$cab = new Cabinet();
function BuildFileList()
{
$imageselect = '<div id="preview"></div><div id="filelist">';
$path = './images';
$dir = scandir($path);
foreach ($dir as $i => $f) {
if (is_file($path . DIRECTORY_SEPARATOR . $f) && round(filesize($path . DIRECTORY_SEPARATOR . $f) / 1024, 2) >= 4 && $f != "serverrack.png" && $f != "gradient.png") {
$imageinfo = getimagesize($path . DIRECTORY_SEPARATOR . $f);
if (preg_match('/^image/i', $imageinfo['mime'])) {
$imageselect .= "<span>{$f}</span>\n";
}
}
}
$imageselect .= "</div>";
开发者ID:Gusenichka,项目名称:openDCIM,代码行数:31,代码来源:install.php
示例6: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Data Center Cabinet Inventory");
// Get the list of departments that this user is a member of
$viewList = $person->isMemberOf();
$cab = new Cabinet();
$head = $legend = $zeroheight = $body = $deptcolor = "";
$deptswithcolor = array();
$dev = new Device();
$templ = new DeviceTemplate();
$tempDept = new Department();
$dc = new DataCenter();
$cabrow = new CabRow();
$cabrow->CabRowID = $_REQUEST['row'];
$cabrow->GetCabRow();
$cab->CabRowID = $cabrow->CabRowID;
$cabinets = $cab->GetCabinetsByRow();
$frontedge = $cabrow->GetCabRowFrontEdge();
if (isset($_GET["rear"])) {
//opposite view
$cabinets = array_reverse($cabinets);
}
//start loop to parse all cabinets in the row
foreach ($cabinets as $index => $cabinet) {
$currentHeight = $cabinet->CabinetHeight;
if ($config->ParameterArray["ReservedColor"] != "#FFFFFF" || $config->ParameterArray["FreeSpaceColor"] != "#FFFFFF") {
$head .= "\t\t<style type=\"text/css\">\n\t\t\t.reserved{background-color: {$config->ParameterArray['ReservedColor']};}\n\t\t\t.freespace{background-color: {$config->ParameterArray['FreeSpaceColor']};}\n";
}
$side = null;
开发者ID:mnibbelink,项目名称:openDCIM,代码行数:31,代码来源:rowview.php
示例7: RowToObject
static function RowToObject($dbRow, $filterrights = true)
{
/*
* Generic function that will take any row returned from the fac_Cabinet
* table and convert it to an object for use in array or other
*/
$cab = new Cabinet();
$cab->CabinetID = $dbRow["CabinetID"];
$cab->DataCenterID = $dbRow["DataCenterID"];
$cab->Location = $dbRow["Location"];
$cab->LocationSortable = $dbRow["LocationSortable"];
$cab->AssignedTo = $dbRow["AssignedTo"];
$cab->ZoneID = $dbRow["ZoneID"];
$cab->CabRowID = $dbRow["CabRowID"];
$cab->CabinetHeight = $dbRow["CabinetHeight"];
$cab->Model = $dbRow["Model"];
$cab->Keylock = $dbRow["Keylock"];
$cab->MaxKW = $dbRow["MaxKW"];
$cab->MaxWeight = $dbRow["MaxWeight"];
$cab->InstallationDate = $dbRow["InstallationDate"];
$cab->SensorIPAddress = $dbRow["SensorIPAddress"];
$cab->SensorCommunity = $dbRow["SensorCommunity"];
$cab->SensorTemplateID = $dbRow["SensorTemplateID"];
$cab->MapX1 = $dbRow["MapX1"];
$cab->MapY1 = $dbRow["MapY1"];
$cab->MapX2 = $dbRow["MapX2"];
$cab->MapY2 = $dbRow["MapY2"];
$cab->FrontEdge = $dbRow["FrontEdge"];
$cab->Notes = $dbRow["Notes"];
$cab->U1Position = $dbRow["U1Position"];
if ($filterrights) {
$cab->FilterRights();
}
if ($cab->U1Position == "Default") {
$dc = new DataCenter();
$dc->DataCenterID = $cab->DataCenterID;
$dc->GetDataCenter();
if ($dc->U1Position == "Default") {
global $config;
$cab->U1Position = $config->ParameterArray["U1Position"];
} else {
$cab->U1Position = $dc->U1Position;
}
}
return $cab;
}
开发者ID:ghasedak,项目名称:openDCIM,代码行数:46,代码来源:assets.inc.php
示例8: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Data Center Statistics");
$cab = new Cabinet();
$dc = new DataCenter();
$dc->DataCenterID = $_REQUEST["dc"];
$dcStats = $dc->GetDCStatistics();
$height = 0;
$width = 0;
$ie8fix = "";
if (strlen($dc->DrawingFileName) > 0) {
$mapfile = "drawings/{$dc->DrawingFileName}";
if (file_exists($mapfile)) {
list($width, $height, $type, $attr) = getimagesize($mapfile);
// There is a bug in the excanvas shim that can set the width of the canvas to 10x the width of the image
$ie8fix = "\n<script type=\"text/javascript\">\n\tfunction uselessie(){\n\t\tdocument.getElementById(\\'mapCanvas\\').className = \"mapCanvasiefix\";\n\t}\n</script>\n<style type=\"text/css\">\n.mapCanvasiefix {\n\t width: {$width}px !important;\n}\n</style>";
}
}
// If no mapfile is set then we don't need the buttons to control drawing the map. Adjust the CSS to hide them and make the heading centered
if (strlen($dc->DrawingFileName) < 1 || !file_exists("drawings/{$dc->DrawingFileName}")) {
$screenadjustment = "<style type=\"text/css\">.dcstats .heading > div { width: 100% !important;} .dcstats .heading > div + div { display: none; }</style>";
}
if ($config->ParameterArray["mUnits"] == "english") {
$vol = __("Square Feet");
$density = __("Watts per Square Foot");
} else {
$vol = __("Square Meters");
$density = __("Watts per Square Meter");
}
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:dc_dashboard.php
示例9: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Data Center Statistics");
$cab = new Cabinet();
$dc = new DataCenter();
$dev = new Device();
//setting airflow
if (isset($_POST["cabinetid"]) && isset($_POST["airflow"]) && $person->SiteAdmin) {
$cab->CabinetID = $_POST["cabinetid"];
if ($cab->GetCabinet()) {
if ($cab->CabRowID > 0 && isset($_POST["row"]) && $_POST["row"] == "true") {
//update all row
$cabinets = $cab->GetCabinetsByRow();
foreach ($cabinets as $index => $cabinet) {
$cabinet->FrontEdge = $_POST["airflow"];
$cabinet->UpdateCabinet();
}
} else {
//update cabinet
$cab->FrontEdge = $_POST["airflow"];
$cab->UpdateCabinet();
}
}
exit;
}
if (isset($_POST['dc']) && (isset($_POST['getobjects']) || isset($_POST['getoverview']))) {
$payload = array();
if (isset($_POST['getobjects'])) {
$cab->DataCenterID = $_POST['dc'];
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:dc_stats.php
示例10: preg_replace
<?php
require_once 'db.inc.php';
require_once 'facilities.inc.php';
$searchKey = $_REQUEST['key'];
//Remove control characters tab, enter, etc
$searchTerm = preg_replace("/[[:cntrl:]]/", "", $_REQUEST['search']);
//Remove any extra quotes that could get passed in from some funky js or something
$searchTerm = str_replace(array("'", '"'), "", $searchTerm);
$dc = new DataCenter();
$dcList = $dc->GetDCList();
$dev = new Device();
$esx = new ESX();
$cab = new Cabinet();
$pdu = new PowerDistribution();
$dept = new Department();
$resultcount = 0;
$title = __("Search Results");
if ($searchKey == 'serial') {
$dev->SerialNo = $searchTerm;
$devList = $dev->SearchDevicebySerialNo();
$resultcount = count($devList);
$title = __("Serial number search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'ip') {
$dev->PrimaryIP = $searchTerm;
$devList = $dev->SearchDevicebyIP();
$resultcount = count($devList);
$title = __("PrimaryIP search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'label') {
$dev->Label = $searchTerm;
$devList = $dev->SearchDevicebyLabel();
开发者ID:rhizalpatrax64bit,项目名称:openDCIM,代码行数:31,代码来源:search.php
示例11: computeSheetBodyDCInventory
/**
* Compute the full inventory on devices in the data centers and return the data
* center summary statistics
*
* @param PHPExcel_Worksheet $worksheet
* @param array $DProps properties defined for the Excel document
* @return (array|array|array|boolean)[]
* statistics array, device inventory, cabinet inventory
*/
function computeSheetBodyDCInventory($DProps)
{
global $person;
global $sessID;
$dc = new DataCenter();
$cab = new Cabinet();
$device = new Device();
$invData = array();
$invCab = array();
$sheetColumns = $DProps['DC Inventory']['Columns'];
$cabinetColumns = $DProps['Rack Inventory']['Columns'];
$devTemplates = DeviceTemplate::getTemplateListIndexedbyID();
$deptList = Department::GetDepartmentListIndexedbyID();
$contactList = $person->GetUserList('indexed');
$limitedUser = false;
$dcList = $dc->GetDCList();
$Stats = array();
// A little code to update the counter
$percentDone = 0;
$sectionMaxPercent = 40;
$incrementalPercent = 1 / sizeof($dcList) * $sectionMaxPercent;
foreach ($dcList as $dc) {
$dcContainerList = $dc->getContainerList();
$dcStats = array();
$cab->DataCenterID = $dc->DataCenterID;
$dcStats['Fl_Spc'] = $dc->SquareFootage;
$dcStats['DesignPower'] = $dc->MaxkW;
$dcStats['Watts'] = 0;
$dcStats['Rk_Num'] = 0;
$dcStats['Rk_UtT'] = 0;
$dcStats['Rk_UtU'] = 0;
$dcStats['Rk_UtE'] = 0;
$dcStats['Rk_Res'] = 0;
$cabList = $cab->ListCabinetsByDC();
if (count($cabList) == 0) {
// empty data center room
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
$devSpec['DC Name'] = $dc->Name;
$invData[] = $devSpec;
} else {
foreach ($cabList as $cab) {
if (!$person->ReadAccess and $cab->AssignedTo == 0 or $cab->AssignedTo > 0 and !$person->canRead($cab->AssignedTo)) {
// User is not allowed to see anything in here
$limitedUser = true;
continue;
}
$zoneName = getZoneName($cab);
$rowName = getRowName($cab);
addRackStat($invCab, $cab, $cabinetColumns, $dc, $dcContainerList);
$cab_height = $cab->CabinetHeight;
if (mb_strtoupper($cab->Model) == 'RESERVED') {
$dcStats['Rk_Res']++;
} else {
$dcStats['Rk_Num']++;
}
$dcStats['Rk_UtT'] += $cab_height;
$device->Cabinet = $cab->CabinetID;
$device_list = $device->ViewDevicesByCabinet();
// empty cabinet
if (count($device_list) == 0 && $cab->CabinetHeight > 0) {
$dcStats['Rk_UtE'] += $cab_height;
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
$devSpec['Zone'] = $zoneName;
$devSpec['Row'] = $rowName;
$devSpec['DC Name'] = $dc->Name;
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = 1;
$devSpec['Height'] = $cab->CabinetHeight;
$devSpec['Device'] = '__EMPTY';
$invData[] = $devSpec;
} else {
usort($device_list, 'cmpDevPos');
$low_idx = 1;
foreach ($device_list as $dev) {
if ($low_idx < $dev->Position) {
// range of empty slots
if ($dev->Position <= $cab_height) {
$height = $dev->Position - $low_idx;
} else {
$height = $cab_height - $low_idx + 1;
}
if ($height > 0) {
$dcStats['Rk_UtE'] += $height;
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
${$devSpec}['Zone'] = $zoneName;
$devSpec['Row'] = $rowName;
$devSpec['DC Name'] = $dc->Name;
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = $low_idx;
$devSpec['Height'] = $height;
$devSpec['Device'] = '__EMPTY';
//.........这里部分代码省略.........
开发者ID:dc-admin,项目名称:openDCIM,代码行数:101,代码来源:report_asset_Excel-new.php
示例12: __
<?php
require_once 'db.inc.php';
require_once 'facilities.inc.php';
$subheader = __("Data Center Detail");
if (!$person->SiteAdmin) {
// No soup for you.
header('Location: ' . redirect());
exit;
}
$status = "";
$dc = new DataCenter();
// AJAX Action
if (isset($_POST['confirmdelete']) && isset($_POST['datacenterid'])) {
// About the nuke this place from orbit
$junkremoval = $_POST['junkremoval'] == 'delete' ? true : false;
$dc->DataCenterID = $_POST['datacenterid'];
if ($dc->DeleteDataCenter($junkremoval)) {
echo 'ok';
} else {
echo 'no';
}
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'];
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:datacenter.php
示例13: GetChildDCList
function GetChildDCList()
{
$this->MakeSafe();
$sql = "SELECT * FROM fac_DataCenter WHERE ContainerID={$this->ContainerID} \n\t\t\tORDER BY Name ASC;";
$datacenterList = array();
foreach ($this->query($sql) as $row) {
$datacenterList[$row["DataCenterID"]] = DataCenter::RowToObject($row);
}
return $datacenterList;
}
开发者ID:paragm,项目名称:openDCIM,代码行数:10,代码来源:infrastructure.inc.php
示例14: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Rows of Cabinets");
if (!$person->SiteAdmin) {
// No soup for you.
header('Location: ' . redirect());
exit;
}
$cabrow = new CabRow();
$zone = new Zone();
$DC = new DataCenter();
$zoneList = $zone->GetZoneList();
$formpatch = "";
$status = "";
if (isset($_POST['action']) && $_POST['action'] == 'Delete') {
$cabrow->CabRowID = $_POST['cabrowid'];
$cabrow->DeleteCabRow();
header('Location: cabrow.php');
exit;
}
if (isset($_REQUEST["cabrowid"])) {
$cabrow->CabRowID = isset($_POST['cabrowid']) ? $_POST['cabrowid'] : $_GET['cabrowid'];
$cabrow->GetCabRow();
if (isset($_POST["action"]) && ($_POST["action"] == "Create" || $_POST["action"] == "Update")) {
$cabrow->Name = $_POST["name"];
$cabrow->DataCenterID = $_POST["datacenterid"];
$cabrow->ZoneID = $_POST["zoneid"];
if ($_POST["action"] == "Create") {
$cabrow->CreateCabRow();
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:cabrow.php
示例15: Cabinet
<?php
require_once("db.inc.php");
require_once("facilities.inc.php");
$subheader=__("Zone Statistics");
$cab=new Cabinet();
$zone=new Zone();
$dc=new DataCenter();
$dev=new Device();
//setting airflow
if(isset($_POST["cabinetid"]) && isset($_POST["airflow"]) && $person->SiteAdmin){
$cab->CabinetID=$_POST["cabinetid"];
if ($cab->GetCabinet()){
if ($cab->CabRowID>0 && isset($_POST["row"]) && $_POST["row"]=="true"){
//update all row
$cabinets=$cab->GetCabinetsByRow();
foreach($cabinets as $index => $cabinet){
$cabinet->FrontEdge=$_POST["airflow"];
$cabinet->UpdateCabinet();
}
}else{
//update cabinet
$cab->FrontEdge=$_POST["airflow"];
$cab->UpdateCabinet();
}
}
exit;
}
开发者ID:spezialist1,项目名称:openDCIM,代码行数:30,代码来源:zone_stats.php
示例16: array
}
}
$data_array = array();
if (isset($_POST['ListUnique'])) {
$data_array = $log->ListUnique($_POST['ListUnique']);
}
if (isset($_POST['BuildTable'])) {
echo BuildDataTable($log);
exit;
}
header('Content-Type: application/json');
echo json_encode($data_array);
exit;
}
$subversion = __("Logging View/Export");
$datacenter = new DataCenter();
$dcList = $datacenter->GetDCList();
$templ = new DeviceTemplate();
$dept = new Department();
$dev = new Device();
$log = new LogActions();
function BuildDataTable($log_object)
{
$limit = isset($_REQUEST['Limit']) ? $_REQUEST['Limit'] : 1000;
$result = $log_object->Search($limit);
// Left these expanded in case we need to add or remove columns. Otherwise I would have just collapsed entirely.
$body = "<table id=\"export\" class=\"display\">\n\t<thead>\n\t\t<tr>\n\n\t\t\t\t<th>" . __("Time") . "</th>\n\t\t\t\t<th>" . __("UserID") . "</th>\n\t\t\t\t<th>" . __("Class") . "</th>\n\t\t\t\t<th>" . __("ObjectID") . "</th>\n\t\t\t\t<th>" . __("ChildID") . "</th>\n\t\t\t\t<th>" . __("Action") . "</th>\n\t\t\t\t<th>" . __("Property") . "</th>\n\t\t\t\t<th>" . __("Old Value") . "</th>\n\t\t\t\t<th>" . __("New Value") . "</th>\n\t\t\t</tr>\n\t</thead>\n\t<tbody>\n";
// suppressing errors for when there is a fake data set in place
foreach ($result as $logitem) {
switch ($logitem->Action) {
case 1:
开发者ID:sengkoil,项目名称:openDCIM,代码行数:31,代码来源:report_logging.php
示例17: __
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Map Selector");
if (!$person->SiteAdmin) {
// No soup for you.
header("Location: " . redirect());
exit;
}
$dc = new DataCenter();
$cab = new Cabinet();
$cab->CabinetID = $_REQUEST["cabinetid"];
$cab->GetCabinet();
$dc->DataCenterID = $cab->DataCenterID;
$dc->GetDataCenter();
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "Submit") {
$cab->MapX1 = intval($_REQUEST["x1"]);
$cab->MapX2 = intval($_REQUEST["x2"]);
$cab->MapY1 = intval($_REQUEST["y1"]);
$cab->MapY2 = intval($_REQUEST["y2"]);
$cab->FrontEdge = $_REQUEST["frontedge"];
$cab->UpdateCabinet();
$url = redirect("cabnavigator.php?cabinetid={$cab->CabinetID}");
header("Location: {$url}");
}
$height = 0;
$width = 0;
if (strlen($dc->DrawingFileName) > 0) {
$mapfile = "drawings/{$dc->DrawingFileName}";
if (file_exists($mapfile)) {
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:mapmaker.php
示例18: initWeibo
public function initWeibo()
{
$this->weibo = DataCenter::getWeiboClient();
}
开发者ID:hzh123,项目名称:my_yaf,代码行数:4,代码来源:HaloModel.php
注:本文中的DataCenter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论