本文整理汇总了PHP中direction函数的典型用法代码示例。如果您正苦于以下问题:PHP direction函数的具体用法?PHP direction怎么用?PHP direction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了direction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_bargraph
function create_bargraph($value, $maximum, $b, $type = "")
{
global $webpath;
$textdir = direction();
$imgpath = 'modules/System/templates/' . TEMPLATE_SET . '/images/';
$maximum == 0 ? $barwidth = 0 : ($barwidth = round(100 / $maximum * $value) * $b);
$red = 90 * $b;
$yellow = 75 * $b;
if (!file_exists("/modules/System/templates/" . TEMPLATE_SET . "/images/nobar_left.gif")) {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_middle.gif" width="1" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif" alt="">';
} elseif (file_exists("/modules/System/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && $barwidth > $yellow && $barwidth < $red) {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'yellowbar_' . $textdir['right'] . '.gif" alt="">';
} elseif ($barwidth < $red || $type == "iso9660" || $type == "CDFS") {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif" alt="">';
} else {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif" alt="">';
}
} else {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_middle.gif" width="' . 100 * $b . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif" alt="">';
} elseif (file_exists("/modules/System/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && $barwidth > $yellow && $barwidth < $red) {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_middle.gif" width="' . (100 * $b - $barwidth) . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif" alt="">';
} elseif ($barwidth < $red || $type == "iso9660" || $type == "CDFS") {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_middle.gif" width="' . (100 * $b - $barwidth) . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif" alt="">';
} elseif ($barwidth == 100 * $b) {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_middle.gif" width="' . 100 * $b . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif" alt="">';
} else {
return '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_middle.gif" width="' . (100 * $b - $barwidth) . '" alt="">' . '<img height="' . BAR_HEIGHT . '" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif" alt="">';
}
}
}
示例2: html_hddtemp
function html_hddtemp()
{
global $XPath;
global $text;
global $sensor_program;
$textdir = direction();
$scale_factor = 2;
$_text = "";
$maxvalue = "+60";
if ($XPath->match("/phpsysinfo/HDDTemp")) {
for ($i = 1, $max = sizeof($XPath->getDataParts("/phpsysinfo/HDDTemp")); $i < $max; $i++) {
if ($XPath->getData("/phpsysinfo/HDDTemp/Item[" . $i . "]/Value") != 0) {
$_text .= " <tr>\n";
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/HDDTemp/Item[" . $i . "]/Model") . "</font></td>\n";
$_text .= " <td align=\"" . $textdir['left'] . "\" valign=\"top\" nowrap><font size=\"-1\">";
$_text .= create_bargraph($XPath->getData("/phpsysinfo/HDDTemp/Item[" . $i . "]/Value"), $maxvalue, $scale_factor);
$_text .= temperature($XPath->getData("/phpsysinfo/HDDTemp/Item[" . $i . "]/Value")) . "</font></td>\n";
$_text .= " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . temperature($maxvalue) . "</font></td></tr>\n";
}
}
}
if (strlen($_text) > 0 && empty($sensor_program)) {
$_text = " <tr>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['s_limit'] . "</b></font></td>\n" . " </tr>" . $_text;
}
return $_text;
}
示例3: html_filesystems
function html_filesystems()
{
global $XPath;
global $text;
global $show_mount_point;
$textdir = direction();
$arrSum = array("size" => 0, "used" => 0, "free" => 0);
$arrCounteddevlist = array();
$intScalefactor = 2;
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n";
$_text .= " <tr>\n";
if ($show_mount_point) {
$_text .= " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\"><b>" . $text['mount'] . "</b></font></td>\n";
}
$_text .= " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\"><b>" . $text['type'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\"><b>" . $text['partition'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\"><b>" . $text['percent'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\"><b>" . $text['free'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\"><b>" . $text['used'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\"><b>" . $text['size'] . "</b></font></td>\n </tr>\n";
for ($i = 1, $max = sizeof($XPath->getDataParts("/phpsysinfo/FileSystem")); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPointID")) {
if (!$XPath->match("/phpsysinfo/FileSystem/Mount[" . $i . "]/Options") || !stristr($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Options"), "bind")) {
if (!in_array($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name"), $arrCounteddevlist)) {
$arrSum['size'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Size");
$arrSum['used'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Used");
$arrSum['free'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Free");
if (PHP_OS != "WINNT") {
$arrCounteddevlist[] = $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name");
}
}
}
$_text .= " <tr>\n";
if ($show_mount_point) {
$_text .= " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/MountPoint") . "</font></td>\n";
}
$_text .= " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Type") . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Device/Name") . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . create_bargraph($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Used"), $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Size"), $intScalefactor, $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Type")) . " " . $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Percent") . "%";
if ($XPath->match("/phpsysinfo/FileSystem/Mount[" . $i . "]/Inodes")) {
$_text .= " (" . $XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Inodes") . "%)";
}
$_text .= "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Free")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Used")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[" . $i . "]/Size")) . "</font></td>\n" . " </tr>\n";
}
}
$_text .= " <tr>\n";
if ($show_mount_point) {
$_text .= " <td class=\"tabdata\" colspan=\"3\" align=\"" . $textdir['right'] . "\" valign=\"top\"><i>" . $text['totals'] . " : </i></font></td>\n";
} else {
$_text .= " <td class=\"tabdata\" colspan=\"2\" align=\"" . $textdir['right'] . "\" valign=\"top\"><i>" . $text['totals'] . " : </i></font></td>\n";
}
$_text .= " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . create_bargraph($arrSum['used'], $arrSum['size'], $intScalefactor) . " ";
if ($arrSum['size'] == 0) {
$_text .= "0";
} else {
$_text .= round(100 / $arrSum['size'] * $arrSum['used']);
}
$_text .= "%" . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($arrSum['free']) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($arrSum['used']) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($arrSum['size']) . "</font></td>\n </tr>\n" . "</table>\n";
return $_text;
}
示例4: create_bargraph
function create_bargraph ($value, $maximum, $b, $type = "") {
global $webpath;
$textdir = direction();
$imgpath = $webpath . 'templates/' . TEMPLATE_SET . '/images/';
$maximum == 0 ? $barwidth = 0 : $barwidth = round((100 / $maximum) * $value) * $b;
$red = 90 * $b;
$yellow = 75 * $b;
if (!file_exists(APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/nobar_left.gif")) {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="1">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif">';
} elseif ( file_exists( APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && ( $barwidth > $yellow ) && ( $barwidth < $red ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['right'] . '.gif">';
} elseif ( ( $barwidth < $red ) || ( $type == "iso9660" ) || ( $type == "CDFS" ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['right'] . '.gif">';
} else {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif">';
}
} else {
if ($barwidth == 0) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( 100 * $b ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( file_exists( APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif" ) && ( $barwidth > $yellow ) && ( $barwidth < $red ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'yellowbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( ( $barwidth < $red ) || ( $type == "iso9660" ) || ( $type == "CDFS" ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'bar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
} elseif ( $barwidth == ( 100 * $b ) ) {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . ( 100 * $b ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['right'] . '.gif">';
} else {
return '<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_' . $textdir['left'] . '.gif">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'redbar_middle.gif" width="' . $barwidth . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_middle.gif" width="' . ( ( 100 * $b ) - $barwidth ) . '">'
.'<img height="' . BAR_HEIGHT . '" alt="" src="' . $imgpath . 'nobar_' . $textdir['right'] . '.gif">';
}
}
}
示例5: html_vitals
function html_vitals()
{
global $webpath;
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 2;
$strLoadbar = "";
$uptime = "";
if ($XPath->match("/phpsysinfo/Vitals/CPULoad")) {
$strLoadbar = "<br>" . create_bargraph($XPath->getData("/phpsysinfo/Vitals/CPULoad"), 100, $scale_factor) . " " . $XPath->getData("/phpsysinfo/Vitals/CPULoad") . "%";
}
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['hostname'] . "</font></td>\n" . " <td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Hostname") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['ip'] . "</font></td>\n" . " <td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/IPAddr") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['kversion'] . "</font></td>\n" . " <td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Kernel") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['dversion'] . "</font></td>\n" . " <td><img width=\"16\" height=\"16\" alt=\"\" src=\"" . $webpath . "images/" . $XPath->getData("/phpsysinfo/Vitals/Distroicon") . "\"> <font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Distro") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['uptime'] . "</font></td>\n" . " <td><font size=\"-1\">" . uptime($XPath->getData("/phpsysinfo/Vitals/Uptime")) . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['users'] . "</font></td>\n" . " <td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Users") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td valign=\"top\"><font size=\"-1\">" . $text['loadavg'] . "</font></td>\n" . " <td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/LoadAvg") . $strLoadbar . "</font></td>\n" . " </tr>\n" . "</table>\n";
return $_text;
}
示例6: html_vitals
function html_vitals()
{
global $webpath;
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 2;
$loadbar = "";
$uptime = "";
if ($XPath->match("/phpsysinfo/Vitals/CPULoad")) {
$loadbar = "<br/>" . create_bargraph($XPath->getData("/phpsysinfo/Vitals/CPULoad"), 100, $scale_factor) . " " . $XPath->getData("/phpsysinfo/Vitals/CPULoad") . "%";
}
$_text = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" width=\"100%\" " . " <tr>\n" . " <td width=20% align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['hostname'] . "</font></td>\n" . " <td width=80% class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Hostname") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['ip'] . "</font></td>\n" . " <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/IPAddr") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['kversion'] . "</font></td>\n" . " <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Kernel") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['dversion'] . "</font></td>\n" . " <td class=\"cellText small\"><img width=\"16\" height=\"16\" alt=\"\" src=\"modules/System/images/" . $XPath->getData("/phpsysinfo/Vitals/Distroicon") . "\"> <font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Distro") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['uptime'] . "</font></td>\n" . " <td class=\"cellText small\"><font size=\"-1\">" . uptime($XPath->getData('/phpsysinfo/Vitals/Uptime')) . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['users'] . "</font></td>\n" . " <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/Users") . "</font></td>\n" . " </tr>\n" . " <tr>\n" . " <td align=right class=\"cellLabel small\" valign=\"top\"><font size=\"-1\">" . $text['loadavg'] . "</font></td>\n" . " <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Vitals/LoadAvg") . $loadbar . "</font></td>\n" . " </tr>\n" . "</table>\n";
return $_text;
}
示例7: html_memory
function html_memory()
{
global $XPath;
global $text;
$textdir = direction();
$scale_factor = 1;
$strRam = create_bargraph($XPath->getData("/phpsysinfo/Memory/Used"), $XPath->getData("/phpsysinfo/Memory/Total"), $scale_factor);
$strRam .= " " . $XPath->getData("/phpsysinfo/Memory/Percent") . "% ";
if ($XPath->match("/phpsysinfo/Swap/Total")) {
$strSwap = create_bargraph($XPath->getData("/phpsysinfo/Swap/Used"), $XPath->getData("/phpsysinfo/Swap/Total"), $scale_factor);
$strSwap .= " " . $XPath->getData("/phpsysinfo/Swap/Percent") . "% ";
}
if ($XPath->match("/phpsysinfo/Memory/AppPercent")) {
$strApp = create_bargraph($XPath->getData("/phpsysinfo/Memory/App"), $XPath->getData("/phpsysinfo/Memory/Total"), $scale_factor);
$strApp .= " " . $XPath->getData("/phpsysinfo/Memory/AppPercent") . "% ";
}
if ($XPath->match("/phpsysinfo/Memory/BuffersPercent")) {
$strBuffers = create_bargraph($XPath->getData("/phpsysinfo/Memory/Buffers"), $XPath->getData("/phpsysinfo/Memory/Total"), $scale_factor);
$strBuffers .= " " . $XPath->getData("/phpsysinfo/Memory/BuffersPercent") . "% ";
}
if ($XPath->match("/phpsysinfo/Memory/CachedPercent")) {
$strCached = create_bargraph($XPath->getData("/phpsysinfo/Memory/Cached"), $XPath->getData("/phpsysinfo/Memory/Total"), $scale_factor);
$strCached .= " " . $XPath->getData("/phpsysinfo/Memory/CachedPercent") . "% ";
}
$_text = "<table border=\"0\" width=\"100%\" align=\"center\">\n" . " <tr>\n" . " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $text['type'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $text['percent'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . $text['free'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . $text['used'] . "</b></font></td>\n" . " <td class=\"tabhead\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . $text['size'] . "</b></font></td>\n" . " </tr>\n" . " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $text['phymem'] . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strRam . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/Free")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/Used")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/Total")) . "</font></td>\n" . " </tr>\n";
if (isset($strApp)) {
$_text .= " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">- " . $text['app'] . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strApp . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/App")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " </tr>\n";
}
if (isset($strBuffers)) {
$_text .= " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">- " . $text['buffers'] . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strBuffers . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/Buffers")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " </tr>\n";
}
if (isset($strCached)) {
$_text .= " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">- " . $text['cached'] . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strCached . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Memory/Cached")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\"> </font></td>\n" . " </tr>\n";
}
if (isset($strSwap)) {
$_text .= " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $text['swap'] . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strSwap . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swap/Free")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swap/Used")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swap/Total")) . "</font></td>\n" . " </tr>\n";
}
if (($max = sizeof($XPath->getDataParts("/phpsysinfo/Swapdevices"))) > 2) {
for ($i = 1; $i < $max; $i++) {
$strSwapdev = create_bargraph($XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Used"), $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Size"), $scale_factor);
$strSwapdev .= " " . $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Percent") . "% ";
$_text .= " <tr>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\"> - " . $XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Device/Name") . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['left'] . "\" valign=\"top\">" . $strSwapdev . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Free")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Used")) . "</font></td>\n" . " <td class=\"tabdata\" align=\"" . $textdir['right'] . "\" valign=\"top\">" . format_bytesize($XPath->getData("/phpsysinfo/Swapdevices/Mount[" . $i . "]/Size")) . "</font></td>\n" . " </tr>\n";
}
}
$_text .= "<tr><td> </td><td></td><td></td><td></td><td></td></tr>";
$_text .= "</table>";
return $_text;
}
示例8: html_network
function html_network()
{
global $XPath;
global $text;
$textdir = direction();
$_text = "<table border=\"0\" cellspacing=0 cellpadding=5 width=\"100%\" align=\"center\">\n" . " <tr>\n" . " <td width=40% class=\"colHeader small\" align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['device'] . "</b></font></td>\n" . " <td width=20% class=\"colHeader small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['received'] . "</b></font></td>\n" . " <td width=20% class=\"colHeader small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['sent'] . "</b></font></td>\n" . " <td width=20% class=\"colHeader small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\"><b>" . $text['errors'] . "</b></font></td>\n" . " </tr>\n";
for ($i = 1, $max = sizeof($XPath->getDataParts("/phpsysinfo/Network")); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/Network/NetDevice[{$i}]/Name")) {
$_text .= " <tr>\n";
$_text .= " <td class=\"listTableRow small\" align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Network/NetDevice[{$i}]/Name") . "</font></td>\n";
$_text .= " <td class=\"listTableRow small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize($XPath->getData("/phpsysinfo/Network/NetDevice[{$i}]/RxBytes") / 1024) . "</font></td>\n";
$_text .= " <td class=\"listTableRow small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . format_bytesize($XPath->getData("/phpsysinfo/Network/NetDevice[{$i}]/TxBytes") / 1024) . "</font></td>\n";
$_text .= " <td class=\"listTableRow small\" align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Network/NetDevice[{$i}]/Errors") . '/' . $XPath->getData("/phpsysinfo/Network/NetDevice[{$i}]/Drops") . "</font></td>\n";
$_text .= " </tr>\n";
}
}
$_text .= "</table>";
return $_text;
}
示例9: die
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
// $Id: system_footer.php,v 1.51.4.1 2007/08/19 09:22:21 xqus Exp $
if (!defined('IN_PHPSYSINFO')) {
die("No Hacking");
}
$arrDirection = direction();
if (!$hide_picklist) {
echo "<center>\n";
$update_form = "<form method=\"POST\" action=\"" . htmlentities($_SERVER['PHP_SELF']) . "\">\n" . "\t" . $text['template'] . ": \n" . "\t<select name=\"template\">\n";
$resDir = opendir(APP_ROOT . '/templates/');
while (false !== ($strFile = readdir($resDir))) {
if ($strFile != 'CVS' && $strFile[0] != '.' && is_dir(APP_ROOT . '/templates/' . $strFile)) {
$arrFilelist[] = $strFile;
}
}
closedir($resDir);
asort($arrFilelist);
foreach ($arrFilelist as $strVal) {
if ($_COOKIE['template'] == $strVal) {
$update_form .= "\t\t<option value=\"" . $strVal . "\" SELECTED>" . $strVal . "</option>\n";
} else {
示例10: html_mbvoltage
function html_mbvoltage()
{
global $text;
global $mbinfo;
$textdir = direction();
$_text = "<table width=\"100%\">\n";
$_text .= " <tr>\n" . " <td><font size=\"-1\"><b>" . $text['s_label'] . "</b></font></td>\n" . " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_value'] . "</b></font></td>\n" . " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_min'] . "</b></font></td>\n" . " <td align=\"" . $textdir['right'] . "\"><font size=\"-1\"><b>" . $text['s_max'] . "</b></font></td>\n" . " </tr>\n";
$data = $mbinfo->voltage();
for ($i = 0, $max = sizeof($data); $i < $max; $i++) {
$_text .= " <tr>\n" . " <td align=\"" . $textdir['left'] . "\" valign=\"top\"><font size=\"-1\">" . $data[$i]['label'] . "</font></td>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $data[$i]['value'] . " " . $text['voltage_mark'] . "</font></td>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $data[$i]['min'] . " " . $text['voltage_mark'] . "</font></td>\n" . " <td align=\"" . $textdir['right'] . "\" valign=\"top\"><font size=\"-1\">" . $data[$i]['max'] . " " . $text['voltage_mark'] . "</font></td>\n" . " </tr>\n";
}
$_text .= "</table>\n";
return $_text;
}
示例11: html_hardware
function html_hardware()
{
global $XPath;
global $text;
$pci_devices = "";
$ide_devices = "";
$usb_devices = "";
$scsi_devices = "";
$textdir = direction();
for ($i = 1, $max = sizeof($XPath->getDataParts('/phpsysinfo/Hardware/PCI')); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/Hardware/PCI/Device[{$i}]/Name")) {
$pci_devices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/PCI/Device[{$i}]/Name") . "</font></td></tr>";
}
}
for ($i = 1, $max = sizeof($XPath->getDataParts('/phpsysinfo/Hardware/IDE')); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/Hardware/IDE/Device[{$i}]")) {
$ide_devices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/IDE/Device[{$i}]/Name");
if ($XPath->match("/phpsysinfo/Hardware/IDE/Device[{$i}]/Capacity")) {
$ide_devices .= " (" . $text['capacity'] . ": " . format_bytesize($XPath->getData("/phpsysinfo/Hardware/IDE/Device[{$i}]/Capacity") / 2) . ")";
}
$ide_devices .= "</font></td></tr>";
}
}
for ($i = 1, $max = sizeof($XPath->getDataParts('/phpsysinfo/Hardware/SCSI')); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/Hardware/SCSI/Device[{$i}]")) {
$scsi_devices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/SCSI/Device[{$i}]/Name");
if ($XPath->match("/phpsysinfo/Hardware/SCSI/Device[{$i}]/Capacity")) {
$scsi_devices .= " (" . $text['capacity'] . ": " . format_bytesize($XPath->getData("/phpsysinfo/Hardware/SCSI/Device[{$i}]/Capacity") / 2) . ")";
}
$scsi_devices .= "</font></td></tr>";
}
}
for ($i = 1, $max = sizeof($XPath->getDataParts('/phpsysinfo/Hardware/USB')); $i < $max; $i++) {
if ($XPath->match("/phpsysinfo/Hardware/USB/Device[{$i}]/Name")) {
$usb_devices .= "<tr><td valign=\"top\"><font size=\"-1\">-</font></td><td><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/USB/Device[{$i}]/Name") . "</font></td></tr>";
}
}
$_text = "<table cellspacing=0 cellpadding=5 border=\"0\" width=\"100%\" align=\"center\">\n";
if ($XPath->match("/phpsysinfo/Hardware/CPU/Number")) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['numcpu'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/CPU/Number") . "</font></td>\n </tr>\n";
}
if ($XPath->match("/phpsysinfo/Hardware/CPU/Model")) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['cpumodel'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/CPU/Model") . "</font></td>\n </tr>\n";
}
if ($XPath->match("/phpsysinfo/Hardware/CPU/Cpuspeed")) {
$tmp_speed = $XPath->getData("/phpsysinfo/Hardware/CPU/Cpuspeed");
if ($tmp_speed < 1000) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['cpuspeed'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $tmp_speed . " MHz</font></td>\n </tr>\n";
} else {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['cpuspeed'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . round($tmp_speed / 1000, 2) . " GHz</font></td>\n </tr>\n";
}
}
if ($XPath->match("/phpsysinfo/Hardware/CPU/Busspeed")) {
$tmp_speed = $XPath->getData("/phpsysinfo/Hardware/CPU/Busspeed");
if ($tmp_speed < 1000) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['busspeed'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $tmp_speed . " MHz</font></td>\n </tr>\n";
} else {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['busspeed'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . round($tmp_speed / 1000, 2) . " GHz</font></td>\n </tr>\n";
}
}
if ($XPath->match("/phpsysinfo/Hardware/CPU/Cache")) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['cache'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/CPU/Cache") . "</font></td>\n </tr>\n";
}
if ($XPath->match("/phpsysinfo/Hardware/CPU/Bogomips")) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['bogomips'] . "</font></td>\n <td class=\"cellText small\"><font size=\"-1\">" . $XPath->getData("/phpsysinfo/Hardware/CPU/Bogomips") . "</font></td>\n </tr>\n";
}
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['pci'] . "</font></td>\n <td class=\"cellText small\">";
if ($pci_devices) {
$_text .= "<table border=0 cellspacing=0 cellpadding=2>" . $pci_devices . "</table>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= "</td>\n </tr>\n";
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['ide'] . "</font></td>\n <td class=\"cellText small\">";
if ($ide_devices) {
$_text .= "<table>" . $ide_devices . "</table>";
} else {
$_text .= "<font size=\"-1\"><i>" . $text['none'] . "</i></font>";
}
$_text .= "</td>\n </tr>\n";
if ($scsi_devices) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['scsi'] . "</font></td>\n <td class=\"cellText small\"><table>" . $scsi_devices . "</table></td>\n </tr>";
}
if ($usb_devices) {
$_text .= " <tr>\n <td class=\"cellLabel small\" align=right valign=\"top\"><font size=\"-1\">" . $text['usb'] . "</font></td>\n <td class=\"cellText small\"><table>" . $usb_devices . "</table></td>\n </tr>";
}
$_text .= "</table>";
return $_text;
}
示例12: L
">
<h5 class="title fn" ><span class="rt"><input class="btn btn-primary btn-sm"type="button" value="<?php
echo L('delete');
?>
" onclick="check(<?php
echo $v['id'];
?>
, -1, '<?php
echo $v['commentid'];
?>
')" />
</span><input type="checkbox" name="id[]" value="<?php
echo $v['id'];
?>
"><?php
echo direction($v['direction']);
?>
<?php
echo $v['username'];
?>
(<?php
echo $v['ip'];
?>
) <?php
echo L('chez');
?>
<?php
echo Format::date($v['creat_at'], 1);
?>
<?php
echo L('release');
示例13: if
<div class="comment_button"><a href="?m=comment&c=comment_admin&a=lists&show_center_id=1&commentid=<?php echo $commentid?>&hot=0"<?php if (empty($hot)) {?> class="on"<?php }?>>×îÐÂ</a> <a href="?m=comment&c=comment_admin&a=lists&show_center_id=1&commentid=<?php echo $commentid?>&hot=1"<?php if ($hot==1) {?> class="on"<?php }?>>×îÈÈ</a></div>
<div class="btn"><label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label></div>
<form action="?" method="get">
<input type="hidden" name="m" value="comment">
<input type="hidden" name="c" value="check">
<input type="hidden" name="a" value="ajax_checks">
<input type="hidden" name="type" value="-1">
<input type="hidden" name="form" value="1">
<input type="hidden" name="commentid" value="<?php echo $commentid?>">
<div class="comment">
<?php if(is_array($list)) foreach($list as $v) :
?>
<div id="tbody_<?php echo $v['id']?>">
<h5 class="title fn" ><span class="rt"><input class="button" type="button" value="<?php echo L('delete')?>" onclick="check(<?php echo $v['id']?>, -1, '<?php echo $v['commentid']?>')" />
</span><input type="checkbox" name="id[]" value="<?php echo $v['id']?>"><?php echo direction($v['direction'])?> <?php echo $v['username']?> (<?php echo $v['ip']?>) <?php echo L('chez')?> <?php echo format::date($v['creat_at'], 1)?> <?php echo L('release')?> <?php echo L('support')?>£º<?php echo $v['support']?></h5>
<div class="content">
<pre><?php echo $v['content']?></pre>
</div>
<div class="bk20 hr mb8"></div>
</div>
<?php endforeach;?>
</div>
<div class="btn"><label for="check_box"><input type="checkbox" onclick="selectall('id[]');" id="check_box" style="width:0px;height: 0px;" /><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" onclick="return confirm('<?php echo L('are_you_sure_you_want_to_delete')?>')" class="button" value="<?php echo L('delete')?>" /></div>
</form>
<div id="pages"><?php echo $pages;?></div>
</div>
<script type="text/javascript">
<?php if(!isset($_GET['show_center_id'])) {?> window.top.$('#display_center_id').css('display','none');<?php }?>
function check(id, type, commentid) {
if(type == -1 && !confirm('<?php echo L('are_you_sure_you_want_to_delete')?>')) {
示例14: round
<tr>
<td>Plafond couche convective</td>
<?php
$max = $utcStop + 1;
for ($h = $utcStart; $h < $max; $h++) {
$pbltop = round($jsondata[$place][$run['day']][$h]['pbltop']);
echo "<td>{$pbltop}</td>\n";
}
?>
</td>
</tr>
<tr>
<td>Direction du vent</td>
<?php
for ($h = $utcStart; $h < $max; $h++) {
$dir = direction($jsondata[$place][$run['day']][$h]['usfc'], $jsondata[$place][$run['day']][$h]['vsfc'], $good);
echo "{$dir}\n";
}
?>
</tr>
<tr>
<td>Vitesse du vent (km/h)</td>
<?php
for ($h = $utcStart; $h < $max; $h++) {
$vit = vitesse($jsondata[$place][$run['day']][$h]['usfc'], $jsondata[$place][$run['day']][$h]['vsfc']);
echo "<td>{$vit}</td>\n";
}
?>
</tr>
<tr>
<td>Vitesse moyenne des thermiques</td>
示例15: if
<?php if($setting[code]) { ?>
<label>验证码:<input type="text" name="code" class="input-text" id="yzmText" onfocus="var offset = $(this).offset();$('#yzm').css({'left': +offset.left-8, 'top': +offset.top-$('#yzm').height()});$('#yzm').show();$('#yzmText').data('hide', 1)" onblur='$("#yzmText").data("hide", 0);setTimeout("hide_code()", 3000)' /></label>
<div id="yzm" class="yzm"><?php echo form::checkcode();?><br />点击图片更换</a></div>
<div class="bk10"></div>
<?php } ?>
<div class="btn"><input type="submit" value="发表评论" /></div> <?php if($userid) { ?><?php echo get_nickname();?> <a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=logout&forward=<?php echo urlencode(($comment[url] ? $comment[url] : $url));?>" target="_top">退出</a><?php } else { ?><a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=login&forward=<?php echo urlencode(($comment[url] ? $comment[url] : $url));?>" target="_top" class="blue">登录</a><span> | </span><a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=register" class="blue" target="_top">注册</a> <?php if(!$setting[guest]) { ?><span style="color:red">需要登陆才可发布评论</span><?php } ?><?php } ?>
</div>
</form>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"comment\" data=\"op=comment&tag_md5=71fd9313c9b343e002e68467d3174568&action=lists&commentid=%24commentid&siteid=%24siteid&page=%24_GET%5Bpage%5D&hot=%24hot&num=20\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$comment_tag = pc_base::load_app_class("comment_tag", "comment");if (method_exists($comment_tag, 'lists')) {$pagesize = 20;$page = intval($_GET[page]) ? intval($_GET[page]) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$comment_total = $comment_tag->count(array('commentid'=>$commentid,'siteid'=>$siteid,'hot'=>$hot,'limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($comment_total, $page, $pagesize, $urlrule);$data = $comment_tag->lists(array('commentid'=>$commentid,'siteid'=>$siteid,'hot'=>$hot,'limit'=>$offset.",".$pagesize,'action'=>'lists',));}?>
<?php if(!empty($data)) { ?>
<div class="comment_button"><a href="<?php echo APP_PATH;?>index.php?m=comment&c=index&a=init&commentid=<?php echo $commentid;?>&title=<?php echo urlencode(($comment[title] ? $comment[title] : $title));?>&url=<?php echo urlencode(($comment[url] ? $comment[url] : $url));?>&hot=0&iframe=1"<?php if(empty($hot)) { ?> class="on"<?php } ?>>最新</a> <a href="<?php echo APP_PATH;?>index.php?m=comment&c=index&a=init&commentid=<?php echo $commentid;?>&title=<?php echo urlencode(($comment[title] ? $comment[title] : $title));?>&url=<?php echo urlencode(($comment[url] ? $comment[url] : $url));?>&hot=1&iframe=1"<?php if($hot) { ?> class="on"<?php } ?>>最热</a></div>
<div class="comment">
<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
<h5 class="title fn"><?php echo direction($r[direction]);?> <font color="#FF0000"><?php echo format::date($r[creat_at], 1);?></font> <?php if($r[userid]) { ?><?php echo get_nickname($r[userid]);?><?php } else { ?><?php echo $r['username'];?><?php } ?> </h5>
<div class="content"><?php echo $r['content'];?>
<div class="rt"><a href="javascript:void(0)" onclick="reply(<?php echo $r['id'];?>, '<?php echo $commentid;?>')">回复</a> <a href="javascript:void(0)" onclick="support(<?php echo $r['id'];?>, '<?php echo $commentid;?>')">支持</a>(<font id="support_<?php echo $r['id'];?>"><?php echo $r['support'];?></font>)
</div>
<div id="reply_<?php echo $r['id'];?>" style="display:none"></div>
</div>
<div class="bk30 hr mb8"></div>
<?php $n++;}unset($n); ?>
</div>
<div id="pages" class="text-r"><?php echo $pages;?></div>
<?php } ?>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
<div class="bk10"></div>
<script type="text/javascript">