当前位置: 首页>>代码示例>>PHP>>正文


PHP nbsp函数代码示例

本文整理汇总了PHP中nbsp函数的典型用法代码示例。如果您正苦于以下问题:PHP nbsp函数的具体用法?PHP nbsp怎么用?PHP nbsp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了nbsp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: html_timestamp

 function html_timestamp($datetime)
 {
     $result = time::splitts($datetime);
     echo $result['date'];
     nbsp(2);
     echo '<span class="small">' . $result['time'] . '</span>';
 }
开发者ID:printedheart,项目名称:iwfms,代码行数:7,代码来源:htmlFunctions.php

示例2: connect_error

function connect_error()
{
    global $adminer, $connection, $token, $error, $drivers;
    if (DB != "") {
        header("HTTP/1.1 404 Not Found");
        page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
    } else {
        if ($_POST["db"] && !$error) {
            queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
        }
        //Encabezado y botones de la parte superior en la seleccion de bases de datos
        page_header(lang('Select database'), $error, false);
        echo "<p>\n";
        foreach (array('database' => lang('Create new database'), 'privileges' => lang('Privileges'), 'processlist' => lang('Process list'), 'variables' => lang('Variables'), 'status' => lang('Status')) as $key => $val) {
            if (support($key)) {
                echo "<a class='btn btn-xs btn-primary' href='" . h(ME) . "{$key}='>{$val}</a>\n";
            }
        }
        //Presenta informacion de la conexion
        echo "<p><i class='fa fa-exchange fa-fw'></i> " . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>" . h($connection->server_info) . "</b>", "<b>{$connection->extension}</b>") . "\n";
        echo "<p><i class='fa fa-user fa-fw'></i> " . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
        //Presenta la lista de bases de datos existentes y los encabezados
        $databases = $adminer->databases();
        if ($databases) {
            $scheme = support("scheme");
            $collations = collations();
            echo "<form action='' method='post'>\n";
            echo "<table cellspacing='0' class='checkable table table-condensed table-responsive table-hover' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
            echo "<thead><tr>" . (support("database") ? "<th>&nbsp;" : "") . "<th>" . lang('Database') . " - <a class='btn btn-default btn-xs' href='" . h(ME) . "refresh=1'><i class='fa fa-refresh fa-fw'></i> " . lang('Refresh') . "</a>" . "<th>" . lang('Collation') . "<th>" . lang('Tables') . "<th>" . lang('Size') . " - <a  class='btn btn-default btn-xs' href='" . h(ME) . "dbsize=1' onclick=\"return !ajaxSetHtml('" . js_escape(ME) . "script=connect');\">" . lang('Compute') . "</a>" . "</thead>\n";
            //Presenta la lista de bases de datos
            $databases = $_GET["dbsize"] ? count_tables($databases) : array_flip($databases);
            foreach ($databases as $db => $tables) {
                $root = h(ME) . "db=" . urlencode($db);
                echo "<tr" . odd() . ">" . (support("database") ? "\n\t\t\t\t\t<td align=center>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : "");
                echo "<th><a  href='{$root}'>" . h($db) . "</a>";
                $collation = nbsp(db_collation($db, $collations));
                echo "<td>" . (support("database") ? "<a href='{$root}" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>{$collation}</a>" : $collation);
                echo "<td align='right'><a href='{$root}&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
                echo "<td align='right' id='size-" . h($db) . "'>" . ($_GET["dbsize"] ? db_size($db) : "?");
                echo "\n";
            }
            echo "</table>\n";
            //Agrega boton de eliminar
            echo support("database") ? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n" . "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n" . "<input class='btn btn-xs btn-danger' type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n" . "</div></fieldset>\n" : "";
            echo "<script type='text/javascript'>tableCheck();</script>\n";
            echo "<input type='hidden' name='token' value='{$token}'>\n";
            echo "</form>\n";
        }
    }
    page_footer("db");
}
开发者ID:unix4you2,项目名称:pmydb,代码行数:51,代码来源:connect.inc.php

示例3: connect_error

function connect_error()
{
    global $connection, $token, $error, $drivers;
    $databases = array();
    if (DB != "") {
        page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
    } else {
        if ($_POST["db"] && !$error) {
            queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
        }
        page_header(lang('Select database'), $error, false);
        echo "<p><a href='" . h(ME) . "database='>" . lang('Create new database') . "</a>\n";
        foreach (array('privileges' => lang('Privileges'), 'processlist' => lang('Process list'), 'variables' => lang('Variables'), 'status' => lang('Status')) as $key => $val) {
            if (support($key)) {
                echo "<a href='" . h(ME) . "{$key}='>{$val}</a>\n";
            }
        }
        echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>{$connection->server_info}</b>", "<b>{$connection->extension}</b>") . "\n";
        echo "<p>" . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
        if ($_GET["refresh"]) {
            set_session("dbs", null);
        }
        $databases = get_databases();
        if ($databases) {
            $scheme = support("scheme");
            $collations = collations();
            echo "<form action='' method='post'>\n";
            echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);'>\n";
            echo "<thead><tr><td>&nbsp;<th>" . lang('Database') . "<td>" . lang('Collation') . "<td>" . lang('Tables') . "</thead>\n";
            foreach ($databases as $db) {
                $root = h(ME) . "db=" . urlencode($db);
                echo "<tr" . odd() . "><td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]));
                echo "<th><a href='{$root}'>" . h($db) . "</a>";
                echo "<td><a href='{$root}" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>" . nbsp(db_collation($db, $collations)) . "</a>";
                echo "<td align='right'><a href='{$root}&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>?</a>";
                echo "\n";
            }
            echo "</table>\n";
            echo "<script type='text/javascript'>tableCheck();</script>\n";
            echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)", 1) . ">\n";
            // 1 - eventStop
            echo "<input type='hidden' name='token' value='{$token}'>\n";
            echo "<a href='" . h(ME) . "refresh=1' onclick='eventStop(event);'>" . lang('Refresh') . "</a>\n";
            echo "</form>\n";
        }
    }
    page_footer("db");
    if ($databases) {
        echo "<script type='text/javascript'>ajaxSetHtml('" . js_adminer_escape(ME) . "script=connect');</script>\n";
    }
}
开发者ID:nishant368,项目名称:newlifeoffice-new,代码行数:51,代码来源:connect.inc.php

示例4: prepareSubfilterOutput

function prepareSubfilterOutput($data, $subfilter, $subfilterName)
{
    order_result($data, 'name');
    $output = array();
    foreach ($data as $id => $element) {
        $element['name'] = nbsp(CHtml::encode($element['name']));
        // is activated
        if (str_in_array($id, $subfilter)) {
            $span = new CSpan($element['name'] . SPACE . '(' . $element['count'] . ')', 'subfilter_enabled');
            $span->onClick(CHtml::encode('javascript: create_var("zbx_filter", "subfilter_set", "1", false);' . 'create_var("zbx_filter", ' . CJs::encodeJson($subfilterName . '[' . $id . ']') . ', null, true);'));
            $output[] = $span;
        } else {
            // subfilter has 0 items
            if ($element['count'] == 0) {
                $span = new CSpan($element['name'] . SPACE . '(' . $element['count'] . ')', 'subfilter_inactive');
                $output[] = $span;
            } else {
                // this level has no active subfilters
                $nspan = $subfilter ? new CSpan(SPACE . '(+' . $element['count'] . ')', 'subfilter_active') : new CSpan(SPACE . '(' . $element['count'] . ')', 'subfilter_active');
                $span = new CSpan($element['name'], 'subfilter_disabled');
                $span->onClick(CHtml::encode('javascript: create_var("zbx_filter", "subfilter_set", "1", false);' . 'create_var("zbx_filter", ' . CJs::encodeJson($subfilterName . '[' . $id . ']') . ', ' . CJs::encodeJson($id) . ', ' . 'true' . ');'));
                $output[] = $span;
                $output[] = $nspan;
            }
        }
        $output[] = ', ';
    }
    array_pop($output);
    return $output;
}
开发者ID:omidmt,项目名称:zabbix-greenplum,代码行数:30,代码来源:forms.inc.php

示例5: _printFolderOptions

    function _printFolderOptions($dir = NULL, $indent = '')
    {
        if (is_null($dir)) {
            $dir = $this->_rootpath;
        }
        $di = new DirectoryIterator($dir);
        if (!$di->valid()) {
            return;
        }
        // nothing to list
        $currentprinted = $this->getPrintedDir();
        foreach ($di as $fileinfo) {
            if ($fileinfo->isDir() && !$fileinfo->isDot()) {
                $printed_dir = $this->getPrintedDir($fileinfo->getPath() . '/' . $fileinfo->getFilename());
                $sel = $printed_dir == $currentprinted ? ' selected="seelected"' : '';
                ?>
				<option value="<?php 
                echo ents($printed_dir);
                ?>
"<?php 
                echo $sel;
                ?>
><?php 
                echo nbsp(ents($indent . $fileinfo->getFilename()));
                ?>
</option>
				<?php 
                if (strlen($indent) < 3) {
                    // going too far down into the tree is too slow, limit ourselves to depth 4
                    $this->_printFolderOptions($dir . '/' . $fileinfo->getFilename(), $indent . '   ');
                }
            }
        }
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:34,代码来源:view_9_documents.class.php

示例6: nbsp

echo nbsp($TD["size"]);
?>
</pre></td>
			<td height="1" align="center" class="<?php 
echo $StyleClass;
?>
"><pre><?php 
echo nbsp($TD["info"]);
?>
</pre></td>
<?if($AllowWrite && isset($TD["write"])){?>
                        <td height="1" align="center" class="<?php 
echo $StyleClass;
?>
"><pre><?php 
echo nbsp($TD["write"]);
?>
</pre></td>
<?}?>
		</tr>
<?}?>
		<tr>
			<td class="DataRow1">&nbsp;</td>
			<td class="DataRow1">&nbsp;</td>
			<td class="DataRow1">&nbsp;</td>
			<td class="DataRow1">&nbsp;</td>
<?if($AllowWrite){?>
                        <td class="DataRow1">&nbsp;</td>
<?}?>
		</tr>
	</table>
开发者ID:szenekonzept,项目名称:php-FileManager,代码行数:31,代码来源:index.php

示例7: isset

<?php

$status = isset($_GET["status"]);
page_header($status ? lang('Status') : lang('Variables'));
$variables = $status ? show_status() : show_variables();
if (!$variables) {
    echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
    echo "<table cellspacing='0'>\n";
    foreach ($variables as $key => $val) {
        echo "<tr>";
        echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
        echo "<td>" . nbsp($val);
    }
    echo "</table>\n";
}
开发者ID:ly95,项目名称:adminer,代码行数:16,代码来源:variables.inc.php

示例8: echo

  <?if ($ss_prmev[ro]=="M")
	 {
	 // bouton ajouter en modif
	  echo (nbsp(3));?>  
	  <a href="#" onclick="javascript:popup('popup_fichpext.php?TE=A');" title="Ajouter une personne"><img src="../images/ajout_pers.gif" border="0"></a>
      <? echo (nbsp(3));?>
		  <a href="#" onclick="javascript:popup('popup_fichste.php?TE=A');" title="Ajouter une structure"><img src="../images/ajout_struct.gif" border="0"></a>
	  <?
	  } // fin si en modif
   } // fin si assez de lignes à afficher
  // gestion des boutons suivant et précédent
  if ($FirstPers>0) {
    echo "<A HREF=\"list_pext.php?lc_FirstPers=".max(0,$FirstPers-$NbLigPPP)."\" title=\"afficher les $NbLigPPP enregistrements précédents\"><img src=\"../../intranet/partage/IMAGES/preced.gif\" border=\"0\"></A>&nbsp;&nbsp;&nbsp;";
    }
  if (($FirstPers+$NbLigPPP)<$nbrows) {
    echo "&nbsp;&nbsp;&nbsp;<A HREF=\"list_pext.php?lc_FirstPers=".($FirstPers+$NbLigPPP)."\" title=\"afficher les $NbLigPPP enregistrements suivants\"><img src=\"../../intranet/partage/IMAGES/suivant.gif\" border=\"0\"></A>";
    }
	?> </td></tr><?
	} // fin si nbrows >0
  ?>
<tr><td colspan="2" align="center">
<? if ($ss_prmev[aff_pop]=="Y") {  // Bouton fermer si affichage en popup, depuis page accueil intranet ?> 
	<a href="#" onclick="javascript:self.close()"><img src="../../intranet/partage/IMAGES/bout_fermer.gif" border="0" alt="fermer cette fenêtre"></A>
  <? echo (nbsp(3));} ?>
  <a href="req_rech_pext.php"><img src="../../../intranet/partage/IMAGES/retour.gif" border="0" title="retour à la grille de requête" onmouseover="self.status='Retour';return true" width="70" height="11"></a>
</td></tr></table>
</BODY>
</HTML>

开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:28,代码来源:list_pext.php

示例9: print_widget


//.........这里部分代码省略.........
" size="4" maxlength="4" value="<?php 
            echo $year_val;
            ?>
" placeholder="YYYY"/>
			</span>
			<?php 
            break;
        case 'reference':
            if (!empty($params['references'])) {
                $where = array();
                if (!empty($params['filter']) && is_array($params['filter'])) {
                    $where = $params['filter'];
                }
                $where_logic = array_get($params, 'filter_logic', 'AND');
                $options = $GLOBALS['system']->getDBObjectData($params['references'], $where, $where_logic, array_get($params, 'order_by'));
                $dummy = new $params['references']();
                $our_val = is_array($value) ? $value : (empty($value) ? array() : array($value));
                if (!empty($params['filter']) && is_callable($params['filter'])) {
                    foreach ($options as $i => $o) {
                        $dummy->populate($i, $o);
                        if (!in_array($i, $our_val) && !$params['filter']($dummy)) {
                            unset($options[$i]);
                        }
                    }
                }
                $params['options'] = array();
                foreach ($options as $k => $details) {
                    $dummy->populate($k, $details);
                    $params['options'][$k] = $dummy->toString();
                }
                $params['type'] = 'select';
                print_widget($name, $params, $value);
            }
            break;
        case 'bitmask':
            $value = (int) $value;
            ?>
			<div class="bitmask-boxes">
			<?php 
            $percol = false;
            $cols = 3;
            require_once 'include/size_detector.class.php';
            if (SizeDetector::getWidth()) {
                if (SizeDetector::isNarrow()) {
                    $cols = 1;
                } else {
                    if (SizeDetector::isMedium()) {
                        $cols = 2;
                    }
                }
            }
            if ($cols > 1) {
                $percol = ceil(count($params['options']) / $cols);
                ?>
				<div class="bitmask-column" <?php 
                echo $attrs;
                ?>
 >
				<?php 
            }
            $i = 0;
            foreach ($params['options'] as $k => $v) {
                $checked_exp = ($value & (int) $k) == $k ? 'checked="checked"' : '';
                // the empty onclick below is to make labels work on iOS
                // see http://stackoverflow.com/questions/5421659/html-label-command-doesnt-work-in-iphone-browser
                ?>
				<label class="checkbox" onclick="">
					<input type="checkbox" name="<?php 
                echo ents($name);
                ?>
[]" value="<?php 
                echo ents($k);
                ?>
" <?php 
                echo $checked_exp;
                ?>
>
					<?php 
                echo nbsp(ents($v));
                ?>
				</label>
				<?php 
                if ($percol && ++$i % $percol == 0) {
                    ?>
					</div>
					<div>
					<?php 
                }
            }
            if ($percol) {
                ?>
				</div>
				<?php 
            }
            ?>
			</div>
			<?php 
            break;
    }
}
开发者ID:brightmore,项目名称:jethro-pmm,代码行数:101,代码来源:general.php

示例10: support

     echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name));
     if ($view) {
         echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized View') : lang('View')) . '</a>';
         echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
     } else {
         foreach (array("Engine" => array(), "Collation" => array(), "Data_length" => array("create", lang('Alter table')), "Index_length" => array("indexes", lang('Alter indexes')), "Data_free" => array("edit", lang('New item')), "Auto_increment" => array("auto_increment=1&create", lang('Alter table')), "Rows" => array("select", lang('Select data'))) as $key => $link) {
             $id = " id='{$key}-" . h($name) . "'";
             echo $link ? "<td align='right'>" . (support("table") || $key == "Rows" || support("indexes") && $key != "Data_length" ? "<a href='" . h(ME . "{$link['0']}=") . urlencode($name) . "'{$id} title='{$link['1']}'>?</a>" : "<span{$id}>?</span>") : "<td id='{$key}-" . h($name) . "'>&nbsp;";
         }
         $tables++;
     }
     echo support("comment") ? "<td id='Comment-" . h($name) . "'>&nbsp;" : "";
 }
 echo "<tr><td>&nbsp;<th>" . lang('%d in total', count($tables_list));
 echo "<td>" . nbsp($jush == "sql" ? $connection->result("SELECT @@storage_engine") : "");
 echo "<td>" . nbsp(db_collation(DB, collations()));
 foreach (array("Data_length", "Index_length", "Data_free") as $key) {
     echo "<td align='right' id='sum-{$key}'>&nbsp;";
 }
 echo "</table>\n";
 if (!information_schema(DB)) {
     $vacuum = "<input type='submit' value='" . lang('Vacuum') . "'" . on_help("'VACUUM'") . "> ";
     $optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'" . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'") . "> ";
     echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>" . ($jush == "sqlite" ? $vacuum : ($jush == "pgsql" ? $vacuum . $optimize : ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'" . on_help("'ANALYZE TABLE'") . "> " . $optimize . "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("'CHECK TABLE'") . "> " . "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("'REPAIR TABLE'") . "> " : ""))) . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . "> " . "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . on_help("'DROP TABLE'") . ">\n";
     $databases = support("scheme") ? $adminer->schemas() : $adminer->databases();
     if (count($databases) != 1 && $jush != "sqlite") {
         $db = isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB);
         echo "<p>" . lang('Move to other database') . ": ";
         echo $databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">';
         echo " <input type='submit' name='move' value='" . lang('Move') . "'>";
         echo support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "";
开发者ID:mbezhanov,项目名称:adminer,代码行数:31,代码来源:db.inc.php

示例11: foreach

<form action="" method="post">
<table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable">
<?php 
// HTML valid because there is always at least one process
$i = -1;
foreach (process_list() as $i => $row) {
    if (!$i) {
        echo "<thead><tr lang='en'>" . (support("kill") ? "<th>&nbsp;" : "");
        foreach ($row as $key => $val) {
            echo "<th>{$key}" . doc_link(array('sql' => "show-processlist.html#processlist_" . strtolower($key), 'pgsql' => "monitoring-stats.html#PG-STAT-ACTIVITY-VIEW", 'oracle' => "../b14237/dynviews_2088.htm"));
        }
        echo "</thead>\n";
    }
    echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : "");
    foreach ($row as $key => $val) {
        echo "<td>" . ($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "" || $jush == "pgsql" && $key == "current_query" && $val != "<IDLE>" || $jush == "oracle" && $key == "sql_text" && $val != "" ? "<code class='jush-{$jush}'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Clone') . '</a>' : nbsp($val));
    }
    echo "\n";
}
?>
</table>
<script type='text/javascript'>tableCheck();</script>
<p>
<?php 
if (support("kill")) {
    echo $i + 1 . "/" . lang('%d in total', max_connections());
    echo "<p><input type='submit' value='" . lang('Kill') . "'>\n";
}
?>
<input type="hidden" name="token" value="<?php 
echo $token;
开发者ID:djmattyg007,项目名称:adminer,代码行数:31,代码来源:processlist.inc.php

示例12: getTriggersOverview

/**
 * Creates and returns the trigger overview table for the given hosts.
 *
 * @param array  $hostIds
 * @param string $application	name of application to filter
 * @param string $pageFile		the page where the element is displayed
 * @param int    $viewMode		table display style: either hosts on top, or host on the left side
 * @param string $screenId		the ID of the screen, that contains the trigger overview table
 *
 * @return CTableInfo
 */
function getTriggersOverview($hostIds, $application, $pageFile, $viewMode = null, $screenId = null)
{
    if (is_null($viewMode)) {
        $viewMode = CProfile::get('web.overview.view.style', STYLE_TOP);
    }
    // get application ids
    $applicationIds = null;
    if ($application !== '') {
        $dbApplications = API::Application()->get(array('hostids' => $hostIds, 'filter' => array('name' => $application), 'output' => array('applicationid')));
        $applicationIds = zbx_objectValues($dbApplications, 'applicationid');
        $hostIds = null;
    }
    // get triggers
    $dbTriggers = API::Trigger()->get(array('hostids' => $hostIds, 'applicationids' => $applicationIds, 'monitored' => true, 'skipDependent' => true, 'output' => API_OUTPUT_EXTEND, 'selectHosts' => array('hostid', 'name'), 'sortfield' => 'description'));
    // get hosts
    $hostIds = array();
    foreach ($dbTriggers as $trigger) {
        $host = reset($trigger['hosts']);
        $hostIds[$host['hostid']] = $host['hostid'];
    }
    $hosts = API::Host()->get(array('output' => array('name', 'hostid', 'status'), 'hostids' => $hostIds, 'preservekeys' => true, 'selectScreens' => $viewMode == STYLE_LEFT ? API_OUTPUT_COUNT : null));
    $triggers = array();
    $hostNames = array();
    foreach ($dbTriggers as $trigger) {
        $host = reset($trigger['hosts']);
        $host['name'] = get_node_name_by_elid($host['hostid'], null, NAME_DELIMITER) . $host['name'];
        $trigger['description'] = CMacrosResolverHelper::resolveTriggerReference($trigger['expression'], $trigger['description']);
        $hostNames[$host['hostid']] = $host['name'];
        // a little tricky check for attempt to overwrite active trigger (value=1) with
        // inactive or active trigger with lower priority.
        if (!isset($triggers[$trigger['description']][$host['name']]) || ($triggers[$trigger['description']][$host['name']]['value'] == TRIGGER_VALUE_FALSE && $trigger['value'] == TRIGGER_VALUE_TRUE || ($triggers[$trigger['description']][$host['name']]['value'] == TRIGGER_VALUE_FALSE || $trigger['value'] == TRIGGER_VALUE_TRUE) && $trigger['priority'] > $triggers[$trigger['description']][$host['name']]['priority'])) {
            $triggers[$trigger['description']][$host['name']] = array('hostid' => $host['hostid'], 'triggerid' => $trigger['triggerid'], 'value' => $trigger['value'], 'lastchange' => $trigger['lastchange'], 'priority' => $trigger['priority'], 'flags' => $trigger['flags'], 'url' => $trigger['url'], 'hosts' => array($host));
        }
    }
    $triggerTable = new CTableInfo(_('No triggers found.'));
    if (empty($hostNames)) {
        return $triggerTable;
    }
    $triggerTable->makeVerticalRotation();
    order_result($hostNames);
    if ($viewMode == STYLE_TOP) {
        // header
        $header = array(new CCol(_('Triggers'), 'center'));
        foreach ($hostNames as $hostName) {
            $header[] = new CCol($hostName, 'vertical_rotation');
        }
        $triggerTable->setHeader($header, 'vertical_header');
        // data
        foreach ($triggers as $description => $triggerHosts) {
            $columns = array(nbsp($description));
            foreach ($hostNames as $hostName) {
                $columns[] = getTriggerOverviewCells(isset($triggerHosts[$hostName]) ? $triggerHosts[$hostName] : null, $pageFile, $screenId);
            }
            $triggerTable->addRow($columns);
        }
    } else {
        // header
        $header = array(new CCol(_('Host'), 'center'));
        foreach ($triggers as $description => $triggerHosts) {
            $header[] = new CCol($description, 'vertical_rotation');
        }
        $triggerTable->setHeader($header, 'vertical_header');
        // data
        $scripts = API::Script()->getScriptsByHosts(zbx_objectValues($hosts, 'hostid'));
        foreach ($hostNames as $hostId => $hostName) {
            $name = new CSpan($hostName, 'link_menu');
            $name->setMenuPopup(getMenuPopupHost($hosts[$hostId], $scripts[$hostId]));
            $columns = array($name);
            foreach ($triggers as $triggerHosts) {
                $columns[] = getTriggerOverviewCells(isset($triggerHosts[$hostName]) ? $triggerHosts[$hostName] : null, $pageFile, $screenId);
            }
            $triggerTable->addRow($columns);
        }
    }
    return $triggerTable;
}
开发者ID:SandipSingh14,项目名称:Zabbix_,代码行数:87,代码来源:triggers.inc.php

示例13: printFieldValue

    /**
     * Print the value of a field to the HTML interface
     *
     * Subclasses should add links and other HTML markup by overriding this
     */
    public function printFieldValue($name, $value = null)
    {
        if (!isset($this->fields[$name])) {
            trigger_error('Cannot get value for field ' . ents($name) . ' - field does not exist', E_USER_WARNING);
            return NULL;
        }
        if (is_null($value)) {
            $value = $this->values[$name];
        }
        if ($name == 'history' && !empty($value)) {
            ?>
			<table class="history table table-full-width table-striped">
			<?php 
            foreach ($value as $time => $detail) {
                ?>
				<tr>
					<th class="narrow"><?php 
                echo format_datetime($time);
                ?>
</th>
					<td><?php 
                echo nl2br(ents($detail));
                ?>
</td>
				</tr>
				<?php 
            }
            ?>
			</table>
			<?php 
        } else {
            if ($this->fields[$name]['type'] == 'bitmask') {
                $percol = false;
                if (!empty($this->fields[$name]['cols']) && (int) $this->fields[$name]['cols'] > 1) {
                    $percol = ceil(count($this->fields[$name]['options']) / $this->fields[$name]['cols']);
                }
                $i = 0;
                foreach ($this->fields[$name]['options'] as $k => $v) {
                    $checked_exp = ($value & (int) $k) == $k ? 'checked="checked"' : '';
                    ?>
				<label class="checkbox">
					<input type="checkbox" disabled="disabled" name="<?php 
                    echo ents($name);
                    ?>
[]" value="<?php 
                    echo ents($k);
                    ?>
" id="<?php 
                    echo ents($name . '_' . $k);
                    ?>
" <?php 
                    echo $checked_exp;
                    ?>
>
					<?php 
                    echo nbsp(ents($v));
                    ?>
				</label>
				<?php 
                }
            } else {
                if ($this->fields[$name]['type'] == 'text' && array_get($this->fields[$name], 'height', 1) > 1) {
                    echo nl2br(ents($this->getFormattedValue($name, $value)));
                } else {
                    if ($this->fields[$name]['type'] == 'phone') {
                        echo '<a href="tel:' . $value . '">' . ents($this->getFormattedValue($name, $value)) . '</a>';
                    } else {
                        if ($this->fields[$name]['type'] == 'email') {
                            $personName = $this->values[$name] == $value ? $this->values['first_name'] . ' ' . $this->values['last_name'] : '';
                            echo '<a href="' . get_email_href($value, $personName) . '" ' . email_link_extras() . '>' . ents($value) . '</a>';
                        } else {
                            if ($this->fields[$name]['type'] == 'html') {
                                echo $this->getFormattedValue($name, $value);
                            } else {
                                echo ents($this->getFormattedValue($name, $value));
                            }
                        }
                    }
                }
            }
        }
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:87,代码来源:db_object.class.php

示例14: EchoTitIm1

				<td>
				<!-- <td class="grosliens" bgcolor="#A491BE"> Ancien fond-->
				<a href="http://HARAS:HARAS@195.115.122.8:81" target="_blank"><img src="../images/logo_nocia2.gif" border="0" width="63" height="50" alt="Nocia, le portail Intranet du Ministère"></a></td>
<!-- 				<td class="grosliens" bgcolor="#600F63"> ANcien fond -->	
			<td>			
			<a href="http://www.legifrance.gouv.fr/citoyen/new_officiels.ow" target="_blank"><img src="../images/logo_legifrance.gif" border="0" width="130" height="43" alt="Légifrance.gouv.fr, le service public de la diffusion du droit"></a>
				</td></tr>
			</table>
				
		</td>
		<td width="250" align="center" valign="top">
		&nbsp;</td>
<!-- 		<img src="../images/imag_mil_acc_prov2.jpg" border="0"></td>
 -->		
 	   <td width="275" align="center" valign="top" align="center">
		<? EchoTitIm1(nbsp(20)."Actualités".nbsp(20),"_b"); ?>
		<table border="0" cellpadding="0" cellspacing="5" align="center"><tr><td>
			<IFRAME SRC="actus_pa.php" frameborder="no" MARGINWIDTH="1" MARGINHEIGHT="1" 			SCROLLING="auto" width="265" height="290" align="center"></IFRAME>
			</td></tr>
		</table>

<table width="90%" border="0" cellpadding="0" cellspacing="1" align="center">
			<tr align="center"><td class="liensmoy" bgcolor="#AD9AC3">
			<a href="#" onclick="popup('../../intranet/HTML/actu_vrac.php?Emplact=DRH_notserv',500,350);">
			Notes de<br>service</a></td>
			<td bgcolor="#6C4D96" class="liensmoy">
		<a href="#" onclick="popup('../../intranet/HTML/actu_vrac.php?Emplact=DRH_txtregl',500,300);">
Textes<br>réglementaires</a></td>
			<td bgcolor="#600F63" class="liensmoy">
		<a href="#" onclick="popup('../../intranet/HTML/actu_vrac.php?Emplact=DRH_mobint',500,300);">
Mobilité</a></td>
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:accueil.php

示例15: stage1

 function stage1()
 {
     $LICENCE_FILE = 'conf/COPYING';
     $this->DISABLE_NEXT_BUTTON = !$this->getConfig('agree', false);
     return array(new CTag('div', 'yes', file_exists($LICENCE_FILE) ? new CScript(nl2br(nbsp(htmlspecialchars(file_get_contents($LICENCE_FILE))))) : 'Missing licence file. See GPL licence.', 'licence'), BR(), new CTag('div', 'yes', array(new CCheckBox('agree', $this->getConfig('agree', false), 'submit();'), 'I agree'), 'center'));
 }
开发者ID:rennhak,项目名称:zabbix,代码行数:6,代码来源:setup.inc.php


注:本文中的nbsp函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。