Source

evalnke / index.php

Full commit
<html>
<head>
                <META http-equiv="Content-Type" content="text/html; charset=utf-8">
                <title> NKE-Evaluation: within 10 Categories </title>
                <link rel="stylesheet" href="css/style.css" type="text/css" />
                <link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery.ui.all.css" rel="stylesheet" />
                <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
                <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js"></script>
                <script type="text/javascript" src="js/posneg_example.js"></script>
</head>

<body>
<?php
include("inc/func.inc");
$categories = array("Olympic_cross-country_skiers_of_Romania","2009_elections_in_the_Caribbean","Carbapenem_antibiotics","Heritage_railway_stations_in_Wales","1932_in_Australia",
                "Commercial_transistors","Lists_of_fictional_books","1983_in_space_exploration",
                "Wrestlers_at_the_1938_British_Empire_Games","Festivals_in_Nova_Scotia");
//$categories2 = getCategories(100,100);
//var_dump($categories2);
?>
<div id="wrapper">           
    <!-- Category Menu-->            
    <div id="category">
                 <h3> Search </h3> 
                <div id="search-text-1">
                <form name="search-solr" action="index.php" method="get">
                            Search [solr]: <input type="text" name="keysolr">
                            <input type="submit" value="Go">
                </form>
                </div>
                <div id="search-text-2">
                <form name="search-contains" action="index.php" method="get">
                            Search [contains|regex]: <input type="text" name="keyreg">
                            <input type="submit" value="Go">
                </form>
                </div>
                <div id="search-cat">
                <form name="search-cat" action="index.php" method="get">
                            Search [Categories]: <input type="text" name="keycat">
                            <input type="submit" value="Go">
                </form>
                </div>        
    <hr>
    <h3> Categories </h3>
    <ol>            
                <?php            
                foreach ($categories as $cat)
                {
                   $catreplaced = str_replace("_"," ",$cat);
                   $catreplaced = str_replace("-"," ",$catreplaced);
                ?>
                <li><a href='index.php?cat=<? echo $cat; ?>'><?php echo $catreplaced ; ?></a></i>
                <?php        
                }
                ?>
    </ol>
    <hr>
    <h3> Matching Diagram [all combination keywords from a name category] </h3> 
    <div>
        <form name="chart_solr" action="index.php" method="get">
                <div align="left">
                <select name="solrcat">
                <?php
                     foreach($categories as $cat) {
                        $catreplaced = str_replace("_"," ",$cat);
                        $catreplaced = str_replace("-"," ",$catreplaced);
                        
                ?>
                <option value="<?= $cat ?>"><?= $catreplaced ?></option>
                <?php } ?>
                </select>
                <INPUT TYPE=SUBMIT VALUE="Go">
                <a href='index.php?chart=history'><b>[Chart-solr]</b> : Show the last Chart</a><br/>
                </div>
        </form>
    </div>
    <hr>        
        <div>
        <form name="chart_contains" action="index.php" method="get">
                <div align="left">
                <select name="regcat">
                <?php
                     foreach($categories as $cat) {
                        $catreplaced = str_replace("_"," ",$cat);
                        $catreplaced = str_replace("-"," ",$catreplaced);
                        
                ?>
                <option value="<?= $cat ?>"><?= $catreplaced ?></option>
                <?php } ?>
                </select>
                <INPUT TYPE=SUBMIT VALUE="Go">
                <a href='index.php?chart_contains=history'><b>[Chart-contains]</b> : Show the last Chart [contains]</a><br/>
                </div>
        </form>
        </div>
        <!-- Examples [+] [-] block-->
    <hr>    
    <div id="examples">
                <h3> Your collected items</h3>
                <div id="infornegative">Negative list was sent</div>
                <div id="infornegative2"></div>
                <div><div style="float:left;color:green;"><b>Positive examples [+]</b>: </div> <div class="plus">0</div></div>
                <div><div style="float:left;color:red"><b>Negative examples [-]</b>: </div> <div class="minus">0</div></div>
                <div style="float:left;color:green;">*<b>Positive Examples</b>:<div id="showpositive"></div></div>
                <div style="float:left;color:red">*<b>Negative Examples</b>:<div id="shownegative"></div></div>
                
    </div>
    <!-- End of Examples [+] [-] block-->
  </div>
    <!-- End of Category Menu-->
    
    <!-- List Instances-->
    <div id="list-instances">
    <?php include("list-instances.php");?>
    </div>
    <!-- End of List Instances -->
    <!-- List Results from Solr -->
    <div id="results-search-solr">
    <?php include("search/search-solr.php");?>
    </div>
    <!-- End of List Instances-->
    
    <!-- List Results from bif:contains -->
    <div id="results-search-regex">
    <?php include("search/search-regex.php");?>
    </div>
    <!-- End of List Instances-->
    
    <!-- List Results from categories -->
    <div id="results-search-cat">
    <?php include("search/search-cat.php");
    ?>
    </div>
    <!-- End of List Instances-->
    <div id="chart">
    <?php include("apigooglechart/chart.php");
    ?>
    </div>
    <div id="chart-contains">
    <?php include("apigooglechart/chart_contains.php");
    ?>
    </div>
    <div id="solrloop">
    <?php
    if(isset($_GET["solrcat"])&& ($_GET["solrcat"]!=null))
    {include("exechart.php");}
    ?>
    </div>
        <div id="regloop">
    <?php
    if(isset($_GET["regcat"])&& ($_GET["regcat"]!=null))
    {include("exechart.php");}
    ?>
    </div>         
</div>
</body>