示例#1
0
		
			<?php 
    $thispage = "db";
    include "_menu.php";
    ?>
			
<?php 
    $document = $section->getDocumentById($db_id);
    $dbh = null;
    try {
        $dbh = new PDO("sqlite:../data/exploredbs/" . $db_id);
        $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    } catch (PDOException $e) {
        echo $e->getMessage();
    }
    $g = new gRaph($dbh);
    if ($attribute = $g->getAttributeById($_GET['attribute'])) {
        if ($avaSubset = $attribute->getValueAgregated($_GET['value'])) {
            $attributeName = $attribute->name;
            $attributeRewrittenName = $attribute->getRewrittenName();
            $valueRewritten = $avaSubset->getRewrittenName();
            $color = $avaSubset->getColor();
            $nodes = $avaSubset->getNodes();
            ?>
			<div class="grid_12">
				<h2 id="page-heading">Nodes in <?php 
            echo htmlentities($document->getName());
            ?>
 <br/> where "<?php 
            echo htmlentities($attributeRewrittenName);
            ?>
示例#2
0
							</tr>
<?php 
            }
            ?>
						</table>
					</div>
				</div>
<?php 
        }
    }
    ?>
<!-- Scores -->
<?php 
    if (false) {
        //////////////////////
        $g = new gRaph($dbh);
        foreach ($g->getAttributes() as $attribute) {
            if ($attribute->type == "float") {
                ?>
				<div class="box">
					<h2>
						<a href="#"><?php 
                echo htmlentities($attribute->name);
                ?>
</a>
					</h2>
					<div class="block">
						<table class="scoretable">
							<tr>
								<th>Color</th>
								<th><?php 
示例#3
0
                 if ($attribute = $g->getAttributeById($_POST['attribute'])) {
                     $attribute->setViz($_POST['viz']);
                     if (isset($_POST['rewritedattributename'])) {
                         $attribute->setRewrittenName($_POST['rewritedattributename']);
                     }
                 }
             } catch (PDOException $e) {
                 echo $e->getMessage();
             }
         }
     }
     // Rewrite agregated values attributes
     if ($_POST['action'] == 'rewriteavas' && isset($_POST['document']) && ($document = $section->getDocumentById($_POST['document']))) {
         try {
             $dbh = new PDO("sqlite:../data/exploredbs/" . $document->getId());
             $g = new gRaph($dbh);
             foreach ($_POST as $index => $rewrittenName) {
                 if (preg_match('/rewrittenavaname_[0-9]*/i', $index)) {
                     $pieces = explode("_", $index);
                     $md5 = $pieces[1];
                     $value = $_POST['value_' . $md5];
                     $color = $_POST['rewrittenavacolor_' . $md5];
                     $g->pushRewriting($value, $rewrittenName, $color);
                 }
             }
         } catch (PDOException $e) {
             echo $e->getMessage();
         }
     }
 }
 include "pages/_managegraphs.php";