source: Dev/trunk/classes/DashboardCreationDatabaseInterface.php @ 100

Last change on this file since 100 was 100, checked in by basvannuland, 14 years ago

application bug multiple values fixed
more dashboard rdf work

File size: 1.6 KB
Line 
1<?php
2
3// Survey database interface class as intermediate for storing data from the site to the RDF database
4require_once 'rdfConstants.php';
5
6// Include RAP Library to write RDF files
7include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
8
9class DashboardCreationDatabaseInterface
10{   
11    protected $dashboardRDFWriter;
12    protected $dashboardRDFReader;
13   
14    public function __construct($dashID)
15    {
16        if($dashID == null)
17            $dashboardID = md5( uniqid(rand(), true) );
18        else
19            $dashboardID = $dashID;
20       
21        $this->dashboardRDFWriter = new DashboardRDFWriter($dashboardID);
22        $this->dashboardRDFReader = new DashboardRDFReader($dashboardID);
23    }
24   
25    public function setDashboardInfo($dashboard,$user)
26    {
27        $dTitle = $dashboard['dashboardTitle'];
28        $dDescription = $dashboard['dashboardDescription'];
29       
30        $dCreatorID = $user['username'];
31       
32        $this->dashboardRDFWriter->createDashboard($dTitle, $dDescription, $dCreatorID);
33       
34        $gNumber = 1;
35        while (isset($dashboard['graphTitle'.$gNumber]))
36        {
37            if (isset($dashboard['graphID'.$gNumber]))
38                $gID = $dashboard['graphID'.$gNumber];
39            else
40                $gID = md5( uniqid(rand(), true) );
41            $gTitle = $dashboard['graphTitle'.$gNumber];
42            $gDescription = $dashboard['graphDescription'.$gNumber];
43           
44            $gTypes = array();
45            $tNumber = 1;
46            while(isset($dashboard['g'.$gNumber.'type'.$tNumber]))
47            {
48               
49            }
50           
51        }
52    }
53}
54
55?>
Note: See TracBrowser for help on using the repository browser.