本文整理汇总了PHP中render_value函数的典型用法代码示例。如果您正苦于以下问题:PHP render_value函数的具体用法?PHP render_value怎么用?PHP render_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render_value函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_symptom
function render_symptom($dbc, $db_name, $id)
{
echo '<p>症状:</p>';
$diseases = array();
$values = array_merge(get_values($dbc, PREFIX . $id, "症状加(调整)"), get_values($dbc, PREFIX . $id, "症状减(调整)"));
foreach ($values as $value) {
if (array_key_exists($value, $diseases)) {
$diseases[$value] = $diseases[$value] + 1;
} else {
$diseases[$value] = 1;
}
}
arsort($diseases);
//$diseases = array_slice(array_keys($diseases), 0, 5);
$diseases = array_keys($diseases);
echo '<ul>';
foreach ($diseases as $value) {
//echo '<li class="list-group-item">';
echo '<li>';
echo render_value($dbc, $db_name, $value, true);
echo ' <a class="btn btn-xs btn-primary" href="qa.php?db_name=' . $db_name . '&keywords=' . get_entity_name($dbc, $value) . '&question_type=症状" ><span class="glyphicon glyphicon-search"></span></a>';
echo '<p/></li>';
}
echo '</ul>';
}
示例2: echo_spectrum
function echo_spectrum($operation, $path, $note, $hint = '')
{
$io = get_io_by_name($operation['id'], $path, $note);
$allSame = true;
echo render_value($io[0], null, $allSame, $hint);
echo "<br/>";
}
示例3: get_herb_plus
function get_herb_plus($dbc, $db_name, $value)
{
$herb_links = array();
$herbs = array_merge(get_values($dbc, $value, '中药加(调整)'));
foreach ($herbs as $herb) {
$herb_links[] = render_value($dbc, $db_name, $herb, false);
}
$herb_title = '';
if (count($herb_links) != 0) {
$herb_title = '加' . implode(', ', $herb_links);
}
return $herb_title;
}
示例4: render
function render($dbc, $db_name, $name, $property)
{
$query = "select * from graph where subject ='{$name}' and property='{$property}'";
$result = mysqli_query($dbc, $query) or die('Error querying database2.');
if (mysqli_num_rows($result) != 0) {
echo '<p><a href="#">[' . $property . ']</a> ';
while ($row = mysqli_fetch_array($result)) {
//$property = $row[property];
$value = $row[value];
echo render_value($dbc, $db_name, $value, false);
}
echo "</p>";
}
}
示例5: hypo_render_treatment
function hypo_render_treatment($dbc, $db_name, $id)
{
$query = "SELECT subject, count(*) as count FROM hypo where value = '" . PREFIX . "{$id}' and property = '治疗' group by subject order by count desc";
$result = mysqli_query($dbc, $query) or die('Error querying database2.');
$values = array();
while ($row = mysqli_fetch_array($result)) {
$values[$row[0]] = $row[1];
}
//arsort($values);
$values = array_slice(array_keys($values), 0, 5);
foreach ($values as $value) {
echo '<li>';
echo render_value($dbc, $db_name, $value, true);
$url = 'hypo.php?db_name=' . $db_name . '&subject=' . $value . '&predicate=' . '治疗' . '&object=' . PREFIX . $id;
echo ' <a class="btn btn-primary btn-xs" href="' . $url . '">推理依据</a>';
echo '<p/></li>';
}
}
示例6: get_instance_summary
function get_instance_summary($dbc, $db_name, $row)
{
$ids = explode('|', $row['instances']);
$i = 0;
$arr = array();
while ($i < min(array(10, count($ids)))) {
$q1 = "select * from graph where id = '{$ids[$i]}'";
$r1 = mysqli_query($dbc, $q1) or die('Error querying database2.');
if ($row1 = mysqli_fetch_array($r1)) {
$s = '(' . render_value($dbc, $db_name, $row1['subject'], false) . ' ';
$s .= $row1['property'] . ' ';
$s .= render_value($dbc, $db_name, $row1['value'], false) . ')';
$arr[] = $s;
}
$i = $i + 1;
}
return implode(', ', $arr) . '<br><a class="btn btn-link" target="blank" href="sn_triple_type.php?db_name=' . $db_name . '&type=' . $row['id'] . '">更多>></a>';
}
示例7: render_treatment
function render_treatment($dbc, $db_name, $id)
{
echo '<p>系统为您推荐如下的方剂:</p>';
$formulas = array();
$values = array_merge(get_subjects($dbc, PREFIX . $id, "治疗"), get_values($dbc, PREFIX . $id, "被...治疗"));
foreach ($values as $value) {
if (array_key_exists($value, $formulas)) {
$formulas[$value] = $formulas[$value] + 1;
} else {
$formulas[$value] = 1;
}
}
arsort($formulas);
//$formulas = array_slice(array_keys($formulas), 0, 5);
$formulas = array_keys($formulas);
echo '<ol>';
foreach ($formulas as $value) {
//echo '<li class="list-group-item">';
echo '<li>';
echo render_value($dbc, $db_name, $value, true);
echo '<p/></li>';
}
echo '</ol>';
}
示例8: url_for
?>
<functionRelation xlink:href="<?php
echo url_for(array($item, 'module' => 'function'), true);
?>
" xlink:type="simple">
<relationEntry><?php
echo render_title($item->subject);
?>
</relationEntry>
<?php
echo sfEacPlugin::renderDates($item);
if (0 < count($date = $item->getNotesByType(array('noteTypeId' => QubitTerm::RELATION_NOTE_DATE_ID)))) {
?>
<descriptiveNote>
<?php
echo render_value('<p>' . $date[0]) . '</p>';
?>
</descriptiveNote>
<?php
}
?>
</functionRelation>
<?php
}
?>
</relations>
</cpfDescription>
</eac-cpf>
示例9: render_show
<?php
echo render_show(__('Maintenance notes'), render_value($isdiah->maintenanceNotes));
?>
<?php
echo render_show(__('Priority'), render_value($isdiah->priorities[$isdiah->ehriPriority]));
?>
<div class="field">
<h3><?php
echo __('Copyright Issue');
?>
</h3>
<div>
<?php
echo render_value($isdiah->ehriCopyrightIssue ? "Yes" : "No");
?>
</div>
</div>
</div>
<?php
if (QubitAcl::check($resource, array('update', 'delete', 'create'))) {
?>
<div class="actions section">
<h2 class="element-invisible"><?php
echo __('Actions');
?>
</h2>
示例10: render_title
<div class="page">
<h1><?php
echo render_title($resource->getTitle(array('cultureFallback' => true)));
?>
</h1>
<div>
<?php
echo render_value($resource->getContent(array('cultureFallback' => true)));
?>
</div>
<?php
if (SecurityCheck::hasPermission($sf_user, array('module' => 'staticpage', 'action' => 'update'))) {
?>
<div class="actions section">
<h2 class="element-invisible"><?php
echo __('Actions');
?>
</h2>
<div class="content">
<ul class="links">
<li><?php
echo link_to(__('Edit'), array($resource, 'module' => 'staticpage', 'action' => 'edit'), array('title' => __('Edit this page')));
?>
</li>
</ul>
</div>
示例11: render_show_repository
?>
<?php
echo render_show_repository(__('Relation (isLocatedAt)'), $resource);
?>
<?php
foreach ($dc->coverage as $item) {
?>
<?php
echo render_show(__('Coverage (spatial)'), link_to(render_title($item), array($item, 'module' => 'term', 'action' => 'browseTerm')));
}
?>
<?php
echo render_show(__('Rights'), render_value($resource->getAccessConditions(array('cultureFallback' => true))));
?>
<div class="section" id="rightsArea">
<?php
echo link_to_if(QubitAcl::check($resource, 'update'), '<h2>' . __('Rights area') . '</h2>', array($resource, 'module' => 'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea', 'title' => __('Edit rights area')));
?>
<?php
echo get_component('right', 'relatedRights', array('resource' => $resource));
?>
</div> <!-- /.section#rightsArea -->
<?php
示例12: render_show
</li>
<?php
}
?>
</ul>
</div>
</div>
<?php
}
?>
<?php
if ($doc->levelOfDescription) {
?>
<?php
echo render_show(__('Level of description'), render_value($doc->levelOfDescription));
?>
<?php
}
?>
<?php
if (sfConfig::get('app_multi_repository') && null != $doc->repositoryId) {
?>
<?php
echo render_show(__('Repository'), link_to($doc->repositoryName, array('slug' => $doc->repositorySlug, 'module' => 'repository')));
?>
<?php
}
?>
示例13: render_title
</td><td>
<?php
if ($item->getCollectionRoot()->id != $item->id) {
?>
<?php
echo render_title($item->getCollectionRoot());
?>
<?php
}
?>
</td><td>
<?php
if (null != ($accessConditions = $item->getAccessConditions(array('cultureFallback' => true)))) {
?>
<?php
echo render_value($accessConditions);
?>
<?php
} else {
?>
<?php
echo _('None');
?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
示例14: link_to
echo $date->getType(array('cultureFallback' => true));
?>
)
<?php
if (isset($date->actor)) {
?>
<?php
echo link_to(render_title($date->actor), array($date->actor, 'module' => 'actor'));
?>
<?php
}
?>
</li>
<?php
}
?>
</ul>
</td><td>
<?php
echo render_value($item->getAccessConditions(array('cultureFallback' => true)));
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
echo get_partial('default/pager', array('pager' => $pager));
示例15: foreach
<?php
foreach ($resource->scriptOfDescription as $code) {
?>
<li><?php
echo format_script($code);
?>
</li>
<?php
}
?>
</ul>
</div>
</div>
<?php
echo render_show(__('Sources'), render_value($resource->getSources(array('cultureFallback' => true))));
?>
</div> <!-- /.section -->
<div class="section" id="rightsArea">
<?php
echo link_to_if(QubitAcl::check($resource, 'update'), '<h2>' . __('Rights area') . '</h2>', array($resource, 'module' => 'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea', 'title' => __('Edit rights area')));
?>
<?php
echo get_component('right', 'relatedRights', array('resource' => $resource));
?>
</div> <!-- /.section#rightsArea -->