updated script for input recordings

master
Angeliki 5 years ago
parent decbf0c083
commit 97e0d749ca

@ -145,7 +145,8 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
echo '<div class=file>';
echo '<audio src='.$url.' controls></audio><br />';
echo '<div class="filename">'.$item['name'].'</div>';
echo '</div>';
echo '<div class="file_date">'.$item['date'].'</div>';
echo '</div><br />';
}
?>
@ -240,7 +241,7 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<script>
function upload(){
var name = prompt('Enter a name for your sound clip?','My unnamed clip');
var name = prompt('Enter a title or/and your name','Unnamed clip');
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
@ -258,7 +259,7 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
});
// var person = prompt("Please enter a title or a name");
// var person = prompt("Enter a title or a name");
// if (person != null) {
// document.getElementById("name").innerHTML =
// person;

@ -128,12 +128,24 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<br />
<h3>VISITORS' RECORDINGS</h3>
<?php
$files = glob("uploads/2/*");
for ($i=0; $i<count($files); $i++)
{$num = $files[$i];
$var1 = $_GET["files"]["name"];
echo '<audio src='.$num.' controls></audio><br />';
echo date("d/m/Y",filemtime($num)).'<br /><br />'; }
$items=array();
$handle=fopen('./uploads/2/index.jsons','r');
if ($handle) {
while (($line=fgets($handle)) !== false) {
$item=json_decode($line,true);
$items[]=$item;
}
}
$items=array_reverse($items);
foreach($items as $item) {
$url=substr($item['file'],3);
echo '<div class=file>';
echo '<audio src='.$url.' controls></audio><br />';
echo '<div class="filename">'.$item['name'].'</div>';
echo '<div class="file_date">'.$item['date'].'</div>';
echo '</div><br />';
}
?>
</div>
@ -226,22 +238,23 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<script>
function upload(){
var name = prompt('Enter a title or/and your name','Unnamed clip');
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
$.ajax({
type: "POST",
url: "scripts/uploadMp3_2.php",
data: {
base64: dataURL
base64: dataURL,
name: name
}
}).done(function(o) {
console.log('saved');
document.getElementById("saved_msg").innerHTML = "Saved '*|o.o/*' You can now refresh and see your voice message in the list below :<";
document.getElementById("saved_msg").innerHTML = "Uploaded!! Refresh and see your voice message in the list below :<";
});
}
}
</script>

@ -125,12 +125,24 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<br />
<h3>VISITORS' RECORDINGS</h3>
<?php
$files = glob("uploads/3/*");
for ($i=0; $i<count($files); $i++)
{$num = $files[$i];
$var1 = $_GET["files"]["name"];
echo '<audio src='.$num.' controls></audio><br />';
echo date("d/m/Y",filemtime($num)).'<br /><br />'; }
$items=array();
$handle=fopen('./uploads/3/index.jsons','r');
if ($handle) {
while (($line=fgets($handle)) !== false) {
$item=json_decode($line,true);
$items[]=$item;
}
}
$items=array_reverse($items);
foreach($items as $item) {
$url=substr($item['file'],3);
echo '<div class=file>';
echo '<audio src='.$url.' controls></audio><br />';
echo '<div class="filename">'.$item['name'].'</div>';
echo '<div class="file_date">'.$item['date'].'</div>';
echo '</div><br />';
}
?>
</div>
@ -223,6 +235,7 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<script>
function upload(){
var name = prompt('Enter a title or/and your name','Unnamed clip');
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
@ -230,15 +243,16 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
type: "POST",
url: "scripts/uploadMp3_3.php",
data: {
base64: dataURL
base64: dataURL,
name: name
}
}).done(function(o) {
console.log('saved');
document.getElementById("saved_msg").innerHTML = "Saved '*|o.o/*' You can now refresh and see your voice message in the list below :<";
document.getElementById("saved_msg").innerHTML = "Uploaded!! Refresh and see your voice message in the list below :<";
});
}
}
</script>

@ -127,12 +127,24 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
<br />
<h3>VISITORS' RECORDINGS</h3>
<?php
$files = glob("uploads/4/*");
for ($i=0; $i<count($files); $i++)
{$num = $files[$i];
$var1 = $_GET["files"]["name"];
echo '<audio src='.$num.' controls></audio><br />';
echo date("d/m/Y",filemtime($num)).'<br /><br />'; }
$items=array();
$handle=fopen('./uploads/4/index.jsons','r');
if ($handle) {
while (($line=fgets($handle)) !== false) {
$item=json_decode($line,true);
$items[]=$item;
}
}
$items=array_reverse($items);
foreach($items as $item) {
$url=substr($item['file'],3);
echo '<div class=file>';
echo '<audio src='.$url.' controls></audio><br />';
echo '<div class="filename">'.$item['name'].'</div>';
echo '<div class="file_date">'.$item['date'].'</div>';
echo '</div><br />';
}
?>
</div>
@ -223,8 +235,9 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
</script>
<script>
<script>
function upload(){
var name = prompt('Enter a title or/and your name','Unnamed clip');
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
@ -232,20 +245,22 @@ echo '<br /><a href='.$num.' download='.$var1.'>download</a></div></td>'; } ?>
type: "POST",
url: "scripts/uploadMp3_4.php",
data: {
base64: dataURL
base64: dataURL,
name: name
}
}).done(function(o) {
console.log('saved');
document.getElementById("saved_msg").innerHTML = "Saved '*|o.o/*' You can now refresh and see your voice message in the list below :<";
document.getElementById("saved_msg").innerHTML = "Uploaded!! Refresh and see your voice message in the list below :<";
});
}
}
</script>
</body>
</html>

@ -11,7 +11,7 @@ $file = UPLOAD_DIR . uniqid() . '.mp3';
$success = file_put_contents($file, $data);
# make a database of recordings
$item=array('name'=>$_POST['name'],'date'=>filemtime($file), 'file'=>$file);
$item=array('name'=>$_POST['name'],'date'=>date("d/m/Y"), 'file'=>$file);
$handle=fopen('../uploads/1/index.jsons','a');
fwrite($handle,json_encode($item)."\n");
fclose($handle);

@ -9,5 +9,11 @@ $img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.mp3';
$success = file_put_contents($file, $data);
# make a database of recordings
$item=array('name'=>$_POST['name'],'date'=>date("d/m/Y"), 'file'=>$file);
$handle=fopen('../uploads/2/index.jsons','a');
fwrite($handle,json_encode($item)."\n");
fclose($handle);
print $success ? $file : 'Unable to save the file.';
?>

@ -9,5 +9,11 @@ $img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.mp3';
$success = file_put_contents($file, $data);
# make a database of recordings
$item=array('name'=>$_POST['name'],'date'=>date("d/m/Y"), 'file'=>$file);
$handle=fopen('../uploads/3/index.jsons','a');
fwrite($handle,json_encode($item)."\n");
fclose($handle);
print $success ? $file : 'Unable to save the file.';
?>

@ -9,5 +9,11 @@ $img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.mp3';
$success = file_put_contents($file, $data);
# make a database of recordings
$item=array('name'=>$_POST['name'],'date'=>date("d/m/Y"), 'file'=>$file);
$handle=fopen('../uploads/4/index.jsons','a');
fwrite($handle,json_encode($item)."\n");
fclose($handle);
print $success ? $file : 'Unable to save the file.';
?>

@ -2,7 +2,7 @@
<p>Dear listener,</p>
you are invited to <div class="tooltip-wrap">amplify</div> parts of the podcasts that you find worthy of attention by listening, recording and repeating them, with your own voice, and upload them in the archive. The stories and sounds, you will listen to, are related to how female voices have been marginalised and what methods (rational/irrational) amplify and bring them in the front. Amplification can happen through repetition and multiplication. Your recording can become part of a gathering of multiple individual voices, that repeat fragments of situations and things that are unspeakable, and can appear as feedback to them. This online collection will be then used as an input for <a href="amplification.php" class="underline" target="_blank">workshops</a> of remixing it together with the rest of the archive, with <div class="tooltip-wrap">Wereldvrouwen <div class="tooltip-content-right" ><div>a group of women, who have migrated in Netherlands and meet at <a href="http://www.leeszaalrotterdamwest.nl/" class="underline" target="_blank">Leeszaal</a> every week to eat breakfast together and speak in Dutch</div></div></div> and other participants who their voices have become part of the podcasts.
<p>Maximum duration: 1 min</p>
<p>Best recorded from a computer. If you want to add your name at your recording send me an email at diakaggel@gmail.com</p>
<p>Best recorded from a computer</p>

Loading…
Cancel
Save