本文整理汇总了PHP中get_temp函数的典型用法代码示例。如果您正苦于以下问题:PHP get_temp函数的具体用法?PHP get_temp怎么用?PHP get_temp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_temp函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_stats
function get_stats() {
$stats['cpu'] = cpu_usage();
$stats['mem'] = mem_usage();
$stats['uptime'] = get_uptime();
$stats['states'] = get_pfstate();
$stats['temp'] = get_temp();
$stats['datetime'] = update_date_time();
$stats['interfacestatistics'] = get_interfacestats();
$stats['interfacestatus'] = get_interfacestatus();
$stats['gateways'] = get_gatewaystats();
$stats = join("|", $stats);
return $stats;
}
示例2: get_stats
function get_stats()
{
$stats['cpu'] = cpu_usage();
$stats['mem'] = mem_usage();
$stats['uptime'] = get_uptime();
$stats['states'] = get_pfstate();
$stats['temp'] = get_temp();
$stats['datetime'] = update_date_time();
$stats['interfacestatistics'] = get_interfacestats();
$stats['interfacestatus'] = get_interfacestatus();
$stats['cpufreq'] = get_cpufreq();
$stats['load_average'] = get_load_average();
$stats['mbuf'] = get_mbuf();
$stats['mbufpercent'] = get_mbuf(true);
$stats['statepercent'] = get_pfstate(true);
$stats = join("|", $stats);
return $stats;
}
示例3: while
$content = "";
while ($item = $data->fetch_array($frontsql)) {
if ($item['type'] == 0) {
if (get_auth($item['item'], 1) == 1) {
$pagesql = $data->select_query("static_content", "WHERE id = '{$item['item']}' AND trash=0");
$stuff = $data->fetch_array($pagesql);
$content .= "<div class=\"frontpage\">" . censor($stuff['content']) . "</div>";
}
} elseif ($item['type'] == 1) {
$funsql = $data->select_query("functions", "where id = '{$item['item']}'");
$stuff = $data->fetch_array($funsql);
if (get_auth($stuff['code'], 0) == 1) {
if (file_exists($stuff['code'] . $phpex)) {
include $stuff['code'] . $phpex;
}
if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
$content .= "<div class=\"frontpage\">" . get_temp($pagename, $pagenum) . "</div>";
}
}
}
$content .= "<br />";
}
if ($content == "") {
$content = "No frontpage defined";
}
$add = false;
$edit = false;
$dbpage = true;
$pagename = 'frontpage';
$location = "Home Page";
$helpid = 1;
示例4: htmlspecialchars
echo htmlspecialchars($mbufstext);
?>
)</span>
</td>
</tr>
<?php
if (get_temp() != "") {
?>
<tr>
<th><?php
echo gettext("Temperature");
?>
</th>
<td>
<?php
$TempMeter = $temp = get_temp();
?>
<div id="tempPB"></div>
<span id="tempmeter"><?php
echo $temp . "°C";
?>
</span>
</td>
</tr>
<?php
}
?>
<tr>
<th><?php
echo gettext("Load average");
?>
示例5: htmlspecialchars
echo htmlspecialchars($mbufstext);
?>
)</span>
</td>
</tr>
<?php
if (get_temp() != "") {
?>
<tr>
<th><?php
echo gettext("Temperature");
?>
</th>
<td>
<?php
$temp_deg_c = get_temp();
?>
<div class="progress">
<div id="tempPB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?php
echo $temp_deg_c;
?>
" aria-valuemin="0" aria-valuemax="100" style="width: <?php
echo $temp_deg_c;
?>
%">
</div>
</div>
<span id="tempmeter"><?php
echo $temp_deg_c . "°C";
?>
</span>
示例6: get_status
?>
<br>
<!-- Display a few statuses -->
<b>Current status:</b> <?php
get_status();
?>
<br>
<b>Current vid:</b> <?php
get_currentvid();
?>
<br>
<!-- This is return output from pressing buttons -->
<b>Messages:</b> <i id="res"> </i><i id="err"> </i> <br>
<b>Temp:</b> <?php
get_temp();
?>
<!-- build Button display and actions -->
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
<button type="button" class="button" onclick="omxajax('voldown');">VOLUME -</button>
</td>
<td>
<button type="button" class="button" onclick="omxajax('play');">PLAY</button>
</td>
<td>
<button type="button" class="button" onclick="omxajax('volup');">VOLUME +</button>
</td>
</tr>
示例7: show_message
show_message("The module you are trying to access is either not a valid module, or it has been disabled");
} else {
include 'frontpage' . $phpex;
}
$tpl->assign("cpallowed", get_auth("usercp", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'usercp'")));
$tpl->assign("profileallowed", get_auth("profile", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'profile'")));
$tpl->assign("contributionallowed", get_auth("mythings", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mythings'")));
$tpl->assign("groupsallowed", get_auth("mypatrol", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'mypatrol'")));
$tpl->assign("pmallowed", get_auth("pmmain", 0) == 1 && $data->num_rows($data->select_query("functions", "WHERE active = 1 AND code = 'pmmain'")));
}
if ($pagenum == 0) {
$pagenum = 1;
}
if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
$dataC = true;
$filetouse = get_temp($pagename, $pagenum);
} elseif ($pagename == "frontpage") {
$dataC = true;
$filetouse = $content;
} elseif ($dbpage == false && $message != "" && $othermessage == false) {
$filetouse = $message;
$dataC = true;
}
if ($filetouse == "") {
$dataC = false;
$filetouse = $pagename;
}
if ((!isset($filetouse) || $filetouse == "") && (!isset($pagename) || $pagename == "")) {
$dataC = true;
show_message("That page or module could not be found");
}
示例8: get_all_disks_info
$disks = get_all_disks_info();
echo "<table class='usb_disks custom_head'><thead><tr><td>Device</td><td>Identification</td><td></td><td>Temp</td><td>FS</td><td>Size</td><td>Open files</td><td>Used</td><td>Free</td><td>Auto mount</td><td>Share</td><td>Log</td><td>Script</td></tr></thead>";
echo "<tbody>";
if (count($disks)) {
$odd = "odd";
foreach ($disks as $disk) {
$mounted = in_array(TRUE, array_map(function ($ar) {
return is_mounted($ar['device']);
}, $disk['partitions']));
$disk_name = basename($disk['device']);
$p = count($disk['partitions']) > 0 ? render_partition($disk, $disk['partitions'][0]) : FALSE;
$preclearing = $Preclear ? $Preclear->isRunning($disk_name) : false;
$is_precleared = $disk['partitions'][0]['fstype'] == "precleared" ? true : false;
$flash = $disk['partitions'][0]['fstype'] == "vfat" || $disk['partitions'][0]['fstype'] == "exfat" ? true : false;
if ($mounted || is_file($disk['partitions'][0]['command']) || $preclearing) {
$disk['temperature'] = get_temp($disk['device']);
}
$temp = my_temp($disk['temperature']);
$mbutton = make_mount_button($disk);
$preclear_link = $disk['size'] !== 0 && !$flash && !$mounted && $Preclear && !$preclearing ? " " . $Preclear->Link($disk_name, "icon") : "";
if ($p && !($is_precleared || $preclearing)) {
$add_toggle = TRUE;
$hdd_serial = "<span title='Click to view partitions/mount points.' class='exec toggle-hdd' hdd='{$disk_name}'>\n\t\t\t\t\t\t\t\t\t\t\t\t \t<i class='glyphicon glyphicon-hdd hdd'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class='glyphicon glyphicon-plus-sign glyphicon-append'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t{$disk[serial]}\n\t\t\t\t\t\t\t\t\t\t\t\t{$preclear_link}\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='preclear_{$disk_name}'></div>";
} else {
$add_toggle = FALSE;
$hdd_serial = "<span class='toggle-hdd' hdd='{$disk_name}'>\n\t\t\t\t\t\t\t\t\t\t\t\t \t<i class='glyphicon glyphicon-hdd hdd'></i>\n\t\t\t\t\t\t\t\t\t\t\t\t </span>\n\t\t\t\t\t\t\t\t\t\t\t\t <span style='margin:4px;'></span>\n\t\t\t\t\t\t\t\t\t\t\t\t {$disk[serial]}\n\t\t\t\t\t\t\t\t\t\t\t\t {$preclear_link}\n\t\t\t\t\t\t\t\t\t\t\t\t <div id='preclear_{$disk_name}'></div>";
}
echo "<tr class='{$odd} toggle-disk'>";
if ($flash || !is_file($disk['partitions'][0]['command']) && !$mounted && !$preclearing) {
echo "<td><img src='/webGui/images/green-blink.png'> {$disk_name}</td>";
} else {
示例9: curl_setopt
curl_setopt($ch, CURLOPT_URL, $tem_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$tem_data = curl_exec($ch);
curl_close($ch);
$tem_reg = '/<resvalue>(.*?)<\\/resvalue>/';
$tem_ret = is_valid($tem_data, $tem_reg);
$tag_start_len = strlen('<resvalue>');
$tag_end_len = strlen('<\\/resvalue>');
$gross_len = strlen($tem_ret);
$tem_len = $gross_len - $tag_start_len - $tag_end_len;
$tem_ret = substr($tem_ret, $tag_start_len, $tem_len + 1);
return $tem_ret;
}
// for test
$tem_ret = get_temp();
// echo $tem_ret;
function get_wet()
{
$wet_url = 'http://121.42.31.195:9071/WIFPa/ResourceData.xml/0001000054f08cfa?ResourceID=4';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $wet_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$wet_data = curl_exec($ch);
curl_close($ch);
$wet_reg = '/<resvalue>(.*?)<\\/resvalue>/';
$wet_ret = is_valid($wet_data, $wet_reg);
$tag_start_len = strlen('<resvalue>');
$tag_end_len = strlen('<\\/resvalue>');
$gross_len = strlen($wet_ret);
示例10: show_message
show_message("You do not have the required permissions to view that page", "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}");
}
} else {
$edit = adminauth("patrol", "edit") && !adminauth("patrol", "limit") || adminauth("patrol", "edit") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false;
$add = adminauth("patrol", "add") && !adminauth("patrol", "limit") || adminauth("patrol", "add") && adminauth("patrol", "limit") && user_group_id($check['id'], $patrolid) ? true : false;
$addlink = "admin.php?page=patrol&subpage=patrolcontent&action=new&pid={$patrolid}";
$editlink = "admin.php?page=patrol&subpage=patrolcontent&id={$content}&action=edit&pid={$patrolid}";
}
if ($sitecontent === false) {
show_message("That page is only accessible by members of the group", $site != NULL ? "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}&site={$site}" : "index.php?page=patrolpages&patrol={$patrolid}&menuid={$menuid}");
}
if ($pagenum == 0) {
$pagenum = 1;
}
if ($dbpage == true && isset($pagename) && $pagename != "" && $pagename != "frontpage") {
$sitecontent = get_temp($pagename, $pagenum);
} elseif (isset($pagename) && $pagename == "frontpage") {
$sitecontent = $content;
} elseif ($dbpage == false && $message != "") {
$sitecontent = $message;
$dataC = true;
$othermessage = true;
}
if ($sitecontent == "") {
$sitecontent = $pagename;
}
if ((!isset($sitecontent) || $sitecontent == "") && (!isset($pagename) || $pagename == "")) {
$sitecontent = "No Content";
}
$groupstats[0] = $data->num_rows($data->select_query("patrol_articles", "WHERE allowed=1 AND trash=0 AND patrol={$safepatrolid}"));
$groupstats[1] = $data->num_rows($data->select_query("album_track", "WHERE allowed=1 AND trash=0 AND patrol={$safepatrolid}"));
示例11: get_all_disks_info
function get_all_disks_info($bus="all") {
// $d1 = time();
$disks = get_unasigned_disks();
foreach ($disks as $key => $disk) {
if ($disk['type'] != $bus && $bus != "all") continue;
$disk['temperature'] = get_temp($key);
foreach ($disk['partitions'] as $k => $p) {
$disk['partitions'][$k] = get_partition_info($p);
}
$disks[$key] = $disk;
}
// debug("get_all_disks_info: ".(time() - $d1));
return $disks;
}
示例12: get_all_disks_info
function get_all_disks_info($bus="all") {
// $d1 = time();
$disks = get_unasigned_disks();
foreach ($disks as $key => $disk) {
if ($disk['type'] != $bus && $bus != "all") continue;
$disk['temperature'] = get_temp($key);
$disk['size'] = intval(trim(shell_exec("blockdev --getsize64 ${key} 2>/dev/null")));
$disk = array_merge($disk, get_disk_info($key));
$disks[$key] = $disk;
}
// debug("get_all_disks_info: ".(time() - $d1));
usort($disks, create_function('$a, $b','$key="device";if ($a[$key] == $b[$key]) return 0; return ($a[$key] < $b[$key]) ? -1 : 1;'));
return $disks;
}