示例#1
0
function render_entity($dbc, $name, $edit = false)
{
    $query = "select * from def where name ='{$name}'";
    $result = mysqli_query($dbc, $query) or die('Error querying database2.');
    if ($row = mysqli_fetch_array($result)) {
        $def = $row[def];
    } else {
        $def = $name;
    }
    $width = $edit ? 200 : 100;
    $image_file = 'img/' . get_image_file_by_name($dbc, $name);
    echo '<div class="media">';
    echo '<a class="pull-right" href="search.php?keywords=' . $name . '">';
    echo '<img width="' . $width . '" class="media-object" src="' . $image_file . '" data-src="holder.js/64x64">';
    echo '</a>';
    echo '<div class="media-body"  align ="left">';
    echo '<h2>' . $name . '</h2>';
    echo '<h4>' . $def . '</h4>';
    echo '</div></div>';
    echo '<div  align ="left">';
    if (isset($name)) {
        render_graph($dbc, $name, $edit);
    }
    echo '</div>';
}
示例#2
0
function get_graph($cache_file_name, $html_imagename, $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $graph_date, $urlstring, $test_target_val, $date_start, $end_date)
{
    global $tmp_dir;
    global $graph_title;
    $val = explode(":", $title);
    $display_title = $val[0];
    $sHTML .= "<tr>\n\t   <td><table width=20%  border=0 cellspacing=0 cellpadding=0 align=left>\n\t  \t <tr>\n\t\t   <td rowspan=2 valign=top><span class=dashSerial>1</span></td>\n \t\t   <td nowrap><span class=genHeaderSmall>" . $graph_title . "</span></td>\n \t\t </tr>\n   \t\t <tr>\n\t\t   <td><span class=big>Horizontal Bar Chart</span> </td>\n\t\t </tr>\n\t\t</table>\n  \t   </td>\n\t</tr>\n\t<tr>\n\t   <td height=200>";
    $sHTML .= render_graph($tmp_dir . "hor_" . $cache_file_name, $html_imagename . "_hor", $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, "horizontal");
    //Commented by Minnie -- same content displayed in to graphs
    /*$sHTML .= "</td>
    	</tr>
    	<tr>
    	   <td><hr noshade='noshade' size='1' /></td>
    	</tr>";
    	
    $sHTML .= "<tr>
    	   <td><table width=20%  border=0 cellspacing=0 cellpadding=0 align=left>
    	  	 <tr>
    		   <td rowspan=2 valign=top><span class=dashSerial>2</span></td>
     		   <td nowrap><span class=genHeaderSmall>".$graph_title."</span></td>
     		 </tr>
       		 <tr>
    		   <td><span class=big>Vertical Bar Chart</span> </td>
    		 </tr>
    		</table>
      	   </td>
    	</tr>
    	<tr>
    	   <td height=200>"; 
    
    	   $sHTML .= render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical");*/
    $sHTML .= "</td>\n\t</tr>\n\t<tr>\n\t   <td><hr noshade='noshade' size='1' /></td>\n\t</tr>";
    $sHTML .= "<tr>\n\t   <td><table width=20%  border=0 cellspacing=0 cellpadding=0 align=left>\n\t  \t <tr>\n\t\t   <td rowspan=2 valign=top><span class=dashSerial>2</span></td>\n \t\t   <td nowrap><span class=genHeaderSmall>" . $graph_title . "</span></td>\n \t\t </tr>\n   \t\t <tr>\n\t\t   <td><span class=big>Pie Chart</span> </td>\n\t\t </tr>\n\t\t</table>\n  \t   </td>\n\t</tr>\n\t<tr>\n\t   <td height=200>";
    $sHTML .= render_graph($tmp_dir . "pie_" . $cache_file_name, $html_imagename . "_pie", $cnt_val, $name_val, $width, $height, 40, $right, $top, $bottom, $title, $target_val, "pie");
    $sHTML .= "</td>\n\t</tr>\n\t<tr>\n\t   <td><hr noshade='noshade' size='1' /></td>\n\t</tr>";
    return $sHTML;
}
function get_graph_homepg($cache_file_name, $html_imagename, $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, $graph_date, $urlstring, $test_target_val, $date_start, $end_date)
{
    global $tmp_dir;
    global $graph_title, $mod_strings;
    global $theme;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $val = explode(":", $title);
    $display_title = $val[0];
    $type = $_REQUEST[Chart_Type];
    if ($type == 'horizontalbarchart') {
        $sHTML .= render_graph($tmp_dir . "hor_" . $cache_file_name, $html_imagename . "_hor", $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, "horizontal");
    } elseif ($type == 'verticalbarchart') {
        $sHTML .= render_graph($tmp_dir . "vert_" . $cache_file_name, $html_imagename . "_vert", $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, "vertical");
    } elseif ($type == 'piechart') {
        $sHTML .= render_graph($tmp_dir . "pie_" . $cache_file_name, $html_imagename . "_pie", $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, "pie");
    }
    return $sHTML;
}
示例#4
0
    $html_imagename=$graph_by; //Html image name for the graph
$graph_details=module_Chart($current_user->id,$date_start,$end_date,$query,$graph_by,$graph_title,$where,$module,$type);
*/
// Performance Optimization
$graph_details = module_Chart_HomePageDashboard($current_user);
if (!empty($graph_details) && $graph_details[1] != 0) {
    // END
    $name_val = $graph_details[0];
    $cnt_val = $graph_details[1];
    $graph_title = $graph_details[2];
    $target_val = $graph_details[3];
    $graph_date = $graph_details[4];
    $urlstring = $graph_details[5];
    $cnt_table = $graph_details[6];
    $test_target_val = $graph_details[7];
    $width = 560;
    $height = 225;
    $top = 30;
    $left = 140;
    $right = 0;
    $bottom = 120;
    $title = $graph_title;
    //Giving the Cached image name
    $cache_file_name = abs(crc32($current_user->id)) . "_" . $type . "_" . crc32($date_start . $end_date) . ".png";
    $html_imagename = "setype";
    //Html image name for the graph
    $sHTML = render_graph($tmp_dir . "vert_" . $cache_file_name, $html_imagename . "_vert", $cnt_val, $name_val, $width, $height, $left, $right, $top, $bottom, $title, $target_val, "vertical");
    echo $sHTML;
} else {
    echo $mod_strings['LBL_NO_DATA'];
}
示例#5
0
        //$image_file = 'img/NA.jpg';
        echo '<a class="pull-left" href="search.php?keywords=' . $name . '">';
        echo '<img width="' . $width . '" class="media-object" src="' . $image_file . '" data-src="holder.js/64x64">';
        echo '</a>';
    }
    echo '<div class="media-body"  align ="left">';
    echo '<h2>' . $name . '</h2>';
    echo '<h4>' . $def . '</h4>';
    echo '<strong>类型</strong>:&nbsp;' . implode(',', get_types($dbc, $name));
    render_info_by_property($dbc, $name, '定义');
    render_info_by_property($dbc, $name, '注释');
    echo '</div></div></div>';
    echo '<p></p>';
    echo '<div class ="container">';
    if (isset($name)) {
        render_graph($dbc, $name, $ontology);
    }
    ?>

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">请添加实体信息:</h3>
            </div>
            <div class="panel-body">

                <form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post" class="form-horizontal"
                      enctype="multipart/form-data">
示例#6
0
    <div class="panel-heading">
        <h3 class="panel-title">基本信息</h3>
    </div>
    <?php 
echo "<table class=\"table\"><tbody>";
//echo "<tr><td width='10%'>代码:</td><td>" . $id . "</td></tr>";
echo "<tr><td width='10%'>英文名:</td><td>";
render_info_by_property($dbc, PREFIX . $id, '英文正名');
render_info_by_property($dbc, $name, '英文正名');
render_info_by_property($dbc, PREFIX . $id, '英文异名');
render_info_by_property($dbc, $name, '英文异名');
echo "</td></tr>";
echo "<tr><td width='10%'>异名:</td><td>";
render_info_by_property($dbc, PREFIX . $id, '中文异名');
render_info_by_property($dbc, $name, '中文异名');
render_info_by_property($dbc, PREFIX . $id, '英文异名');
render_info_by_property($dbc, $name, '英文异名');
render_info_by_property($dbc, PREFIX . $id, '异名');
render_info_by_property($dbc, $name, '异名');
echo "</td></tr>";
// echo "<tr><td width='10%'>类型:</td><td>" . implode(',', get_types($dbc, $name, $id)) . "</td></tr>";
echo "</tbody></table>";
?>
  
</div>

<?php 
render_graph($dbc, $id, $ontology);
?>