First version of the WordsCloud site
This commit is contained in:
commit
8a6973fcb6
13 changed files with 1656 additions and 0 deletions
36
create.php
Normal file
36
create.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
include('templates/header.php');
|
||||
include('db.php');
|
||||
$db = new DataBase();
|
||||
if (!$db->isInit()) {
|
||||
echo 'Error db init';
|
||||
return;
|
||||
}
|
||||
|
||||
$db->cleanCloud();
|
||||
|
||||
$length = 6;
|
||||
$token = bin2hex(random_bytes($length));
|
||||
|
||||
while (!$db->createCloud($token)) {
|
||||
$token = bin2hex(random_bytes($length));
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="cloud_links">
|
||||
<div id="cloud_links_results" class="cloud_link">
|
||||
<span class="label">Voici le lien pour visualiser le nuage de mots</span>
|
||||
<span class="link">
|
||||
<a href="result.php?id=<?php echo $token ?>">id=<?php echo $token ?></a>
|
||||
</span>
|
||||
</div>
|
||||
<div id="cloud_links_vote" class="cloud_link">
|
||||
<span class="label">Voici le lien pour participer au nuage</span>
|
||||
<span class="link">
|
||||
<a href="index.php?id=<?php echo $token ?>">id=<?php echo $token ?></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include('templates/footer.php');
|
Loading…
Add table
Add a link
Reference in a new issue