Example #1
0
echo $db_name;
?>
&name=<?php 
echo $file_id;
?>
"><span class="glyphicon glyphicon-plus"></span>&nbsp;添加信息</a></li>
        </ul>
    </div>
    <h1>  
        <font face="微软雅黑"><strong>
            <?php 
echo $file_id . '(' . $types_string . ')';
?>
       
        </strong>
        </font>


    </h1>

    <?php 
if (isset($file_id) && $file_id != '' && isset($id) && $id != '') {
    echo '<p><em>' . $def . '</em></p>';
    include_once "./entity_lit_graph.php";
} else {
    render_warning('该库中无相关实体信息!');
}
?>

    <?php 
include_once "./foot.php";
Example #2
0
    /*
                          if (isset($_GET['limit'])){
                          $query .= ' limit ' . $_GET['limit'];
                          } */
    $result = mysqli_query($dbc, $query) or die('Error querying database2.');
    $n = 0;
    while ($row = mysqli_fetch_array($result)) {
        echo '<li>' . render_value($dbc, $db_name, $row[subject], false) . "</li>";
        $n = $n + 1;
    }
    /*
                          if (isset($_GET['limit'])&&($n == $_GET['limit']))
                          echo '更多>>'; */
    echo '</ul>';
} else {
    render_warning('<<请在右侧选择类型以查看其实例');
}
?>


            </div>

        </div>    
    </div>
</div>




<?php 
include_once "./foot.php";
Example #3
0
                <?php 
render_relation_table($dbc, $db_name, $active_relation);
?>
            </ul>

        </div>
        <div class="col-md-9" role="main">     
            <!--
                        <div class="bs-docs-section">  
            !-->
            <div >  
                <?php 
if (isset($active_relation)) {
    include_once "./relation_manager.php";
} else {
    render_warning('<<请在右侧选择关系以查看相关陈述');
}
?>


            </div>

        </div>    
    </div>
</div>




<?php 
include_once "./foot.php";
Example #4
0
if (!empty($ids)) {
    echo '<p>您输入的疾病为:';
    foreach ($ids as $id) {
        echo '&nbsp;' . render_value($dbc, $db_name, PREFIX . $id, false);
    }
    echo '</p>';
    foreach ($ids as $id) {
        ?>
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong><?php 
        echo get_entity_name($dbc, PREFIX . $id);
        ?>
</strong>
            </div>
            <div class="panel-body">
                <?php 
        render_treatment($dbc, $db_name, $id);
        ?>
                <hr/>
                <?php 
        render_syndromes($dbc, $db_name, $id);
        ?>
            </div>

        </div>
        <?php 
    }
} else {
    render_warning('对不起!我们的知识库中尚无与"' . $keywords . '"相关的知识!');
}
Example #5
0
    echo $page_links;
    echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?keywords=' . $user_search . '&sort=' . $sort . '&page=' . $num_pages . '">尾页</a></li>';
    echo '</ul>';
}
function get_total($docs, $dbc)
{
    $query = build_query($docs, true);
    $result = mysqli_query($dbc, $query);
    $row = mysqli_fetch_array($result);
    $total = $row['count'];
    return $total;
}
if (isset($_GET['id'])) {
    $id = $_GET['id'];
} else {
    render_warning('无相关实体信息');
}
?>
<div class="container">

    <?php 
$relation_tab_id = 'docs';
include_once "./relation_header.php";
//$query = "SELECT * FROM resource where title like '%$keywords%' or description like '%$keywords%' ORDER BY title ASC LIMIT 0,10";
// Calculate pagination information
$cur_page = isset($_GET['page']) ? $_GET['page'] : 1;
$results_per_page = 10;
// number of results per page
$skip = ($cur_page - 1) * $results_per_page;
$total = get_total($docs, $dbc);
$num_pages = ceil($total / $results_per_page);
Example #6
0
    $namespace = 'http://www.example.com/';
}
$graph = new EasyRdf_Graph("http://localhost/lod/" . $onto_file);
$graph->load();
if (isset($_GET['label'])) {
    $first = true;
    foreach ($graph->resourcesMatching("rdfs:label", $_GET['label']) as $r) {
        if ($first) {
            $localname = $r->localname();
        } else {
            echo "<p>" . $r . "</p>";
        }
    }
}
if (!isset($localname)) {
    render_warning("对不起!本系统没有相关实体的信息!下面显示的是'kideny_yang_deficiency(肾阳虚)'这一示例实体。");
    $localname = 'kideny_yang_deficiency';
}
?>
<div class="container">


    <?php 
$me = $graph->resource($namespace . $localname);
//echo "<h1>" . $localname . "</h1>";
echo "<h1>" . get_title($me) . "</h1>";
render_literals($graph, $me, 'rdfs:comment');
echo '<div class="panel panel-info">';
echo '<div class="panel-heading"> 基本信息 </div>';
echo "<table class=\"table table-bordered\"><tbody>";
echo "<tr><td width='10%'>中文标签:</td><td>" . $me->label('zh') . "</td></tr>";
Example #7
0
    $result = mysqli_query($dbc, $query) or die('Error querying database1.');
    if ($row = mysqli_fetch_array($result)) {
        //$image_id = $row3['id'];
        $image_file = $row['file'];
        echo '<h3>' . FIGURE . $row['id'] . '.' . $row['name'] . '</h3>';
        echo '<p>' . $row[description];
        echo '<div class="row-fluid">';
        echo '<ul class="thumbnails">';
        echo '<li class="span12">';
        echo '<div class="thumbnail">';
        echo '<img src="' . IMG_UPLOADPATH . $image_file . '"  alt="" />';
        echo '<div class="caption">';
        echo '</div></div></li></ul></div>';
    }
} else {
    render_warning('无相关信息!');
}
$query = "select * from segment where images like '%|{$image_id}|%'";
$result = mysqli_query($dbc, $query) or die('Error querying database.');
$segments = array();
$first = true;
while ($row = mysqli_fetch_array($result)) {
    if ($first) {
        echo '<h3>该图表出现于如下的文献中:</h3>';
        echo '<hr>';
        $first = false;
    }
    render_segment_summary($dbc, $row);
}
echo '</div>';
include_once "./foot.php";
Example #8
0
        echo '<td><a  href="article.php?id=' . $row['id'] . '">' . $row['title'] . '</a>';
        if ($recycle) {
            echo '&nbsp;<a  href="' . $_SERVER['PHP_SELF'] . '?recycle=' . $row['id'] . '"><i class="icon-share"></i></a>';
        }
        echo '</td>';
        echo '<td>' . get_abstract($dbc, $row['id']) . '</td>';
        echo '<td>' . $row['create_time'] . '</td>';
        //echo '<a class="btn" href="article.php?id=' . $row['id'] . '"><i class="icon-edit"></i></a>';
        if ($role == 'creator') {
            if ($recycle) {
                echo '<td><a   href="' . $_SERVER['PHP_SELF'] . '?delete=' . $row['id'] . '"><i class="icon-trash"></i></a>';
            } else {
                echo '<td><a  href="' . $_SERVER['PHP_SELF'] . '?recycle=' . $row['id'] . '"><i class="icon-trash"></i></a></td></tr>';
            }
        }
        if ($role == 'publisher') {
            if (is_published($dbc, $row['id'])) {
                echo '<td><a  href="' . $_SERVER['PHP_SELF'] . '?revoke=' . $row['id'] . '"><i class="icon-thumbs-down"></i></a></td></tr>';
            } else {
                echo '<td><a  href="' . $_SERVER['PHP_SELF'] . '?publish=' . $row['id'] . '"><i class="icon-thumbs-up"></i></a></td></tr>';
            }
        }
    }
    ?>
        </tbody>
    </table>

    <?php 
} else {
    render_warning('没有可显示的综述!您可以创建新的综述。');
}
Example #9
0
                        }
                    }
                }
            }
        }
    }
    //mysqli_close($dbc);
    ?>
                </ul>
            </div>

            <div class="span9">
                
                    <?php 
    if ($article_info[deleted]) {
        render_warning("本文已被放入回收站!");
    }
    ?>
                <div class="well">
                    <h2><font face="微软雅黑" ><?php 
    echo $article_info[title];
    ?>
 </font></h2>
                    <font size ="2">
                    <p></p>
                    <p>&nbsp;&nbsp;<strong>创建者:&nbsp;</strong>
    <?php 
    echo render_authors($dbc, $id, 'creator', ',&nbsp;&nbsp;');
    ?>
;&nbsp;&nbsp;
                        <strong>作者:&nbsp;</strong>
Example #10
0
    $color = true;
    while ($row = mysqli_fetch_array($result)) {
        if ($color) {
            echo '<tr>';
        } else {
            echo '<tr class="info">';
        }
        $color = !$color;
        $segment_id = $row['id'];
        echo '<td>' . $row_num++ . '</td>';
        echo '<td>';
        echo "<a href=\"editor.php?act=edit&id={$segment_id}\">" . $row[title] . "</a>";
        echo '</td>';
        echo '<td>' . render_articles_by_seg($dbc, $row['id']) . '</td>';
        echo '<td>' . tcmks_substr($row['content']) . '</td>';
        echo '<td>' . render_tags($dbc, $row['id']) . '</td>';
        echo '<td>' . $row[create_time] . '</td>';
        echo '<td>';
        if (!is_segment_used($dbc, $row['id'])) {
            echo '<a   href="' . $_SERVER['PHP_SELF'] . '?delete_segment=' . $row['id'] . '"><i class="icon-trash"></i></a>';
        }
        echo '</td>';
    }
    ?>
        </tbody>
    </table>

    <?php 
} else {
    render_warning('没有可显示的综述段落!您可以创建新的综述段落。');
}