First version of the WordsCloud site
This commit is contained in:
commit
8a6973fcb6
13 changed files with 1656 additions and 0 deletions
43
index.php
Normal file
43
index.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
include('templates/header.php');
|
||||
include('db.php');
|
||||
|
||||
$db = new DataBase();
|
||||
if (!$db->isInit()) {
|
||||
echo 'Error db init';
|
||||
return;
|
||||
}
|
||||
$db->buildTables();
|
||||
if (isset($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
if (!$db->isCloud($id)) {
|
||||
echo 'NO CLOUD';
|
||||
return;
|
||||
}
|
||||
$nbWords = 3;
|
||||
?>
|
||||
<form method="post" action="save.php">
|
||||
<input type="hidden" id="fid" name="fid" value="<?php echo $id;?>">
|
||||
<?php
|
||||
for ($i=0;$i<$nbWords;$i++) {
|
||||
$name = 'fword' . $i;
|
||||
?>
|
||||
<label for="<?php echo $name;?>">test</label>
|
||||
<input type="text" id="<?php echo $name;?>" name="<?php echo $name;?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<p>Voulez-vous créer un nouveau nuage de mots?</p>
|
||||
<form method="post" action="create.php">
|
||||
<input type="submit" value="Créer">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
include('templates/footer.php');
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue