Skip to content

Commit 03d0e1a

Browse files
authored
Add files via upload
1 parent 05c2e29 commit 03d0e1a

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

mid3TagMp3Genre.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>Genre list of mid3v2 (Mutagen)</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7+
<meta property="og:url" content="https://smolka.lima-city.de/">
8+
<meta name="author" content="Jürgen Smolka">
9+
<style type="text/css">
10+
body { margin-left:5%; margin-right:5%; font-size:1.1em; }
11+
td { padding-left:11px; padding-right:11px; vertical-align:top; }
12+
h4 { color:red; font-weight:bold; }
13+
.u { white-space:nowrap; font-weight:bold; }
14+
</style>
15+
</head>
16+
<body>
17+
<h2>Genre list of mid3v2</h2>
18+
<table border="1">
19+
<tr><td>
20+
<?php
21+
$genre = "";
22+
$shellBefehl = "mid3v2 -L";
23+
exec($shellBefehl, $genre);
24+
if(!$genre)
25+
echo '<h4>No data fetched ...</h4><p>Try <b>mid3v2 -L</b> on konsole!</p>';
26+
foreach ( $genre as $strKey => $strValue ) {
27+
echo '<span class="u">' . $strValue . '</span><br>' . "\n";
28+
if($strKey == 49 || $strKey == 99 || $strKey == 149 || $strKey == 199)
29+
echo '</td><td>';
30+
}
31+
?>
32+
</td></tr>
33+
</table>
34+
</body>
35+
</html>

mid3TagMp3ListTags.php

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>View existing tags</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7+
<meta property="og:url" content="https://smolka.lima-city.de/">
8+
<meta name="author" content="Jürgen Smolka">
9+
<script type="text/javascript" src="dhtml.js"></script>
10+
</head>
11+
12+
<body onload="ladenaus();">
13+
<a name="top"></a>
14+
<noscript style="text-align:center;"><h1>Please activate JavaScript</h1></noscript>
15+
<?php
16+
ini_set('display_errors', 1);
17+
error_reporting(E_ALL);
18+
19+
$relpfad = ""; //"./"; //"./test/";
20+
$viewonly = null;
21+
$execute = null;
22+
23+
$artist = "";
24+
$album = "";
25+
$titel = "";
26+
$track = "";
27+
$genre = "";
28+
$comment = "";
29+
30+
$fileTyp = array("mp3");
31+
$dateien = array();
32+
$onlyDir = "";
33+
$batch = "";
34+
35+
include_once("mid3TagMp3.inc.php");
36+
37+
if (isset($_POST["relpfad"]))
38+
$relpfad = $_POST["relpfad"];
39+
40+
if(!empty($_POST["artist"]))
41+
$artist = $_POST["artist"];
42+
if(!empty($_POST["album"]))
43+
$album = $_POST["album"];
44+
if(!empty($_POST["titel"]))
45+
$titel = $_POST["titel"];
46+
if(!empty($_POST["track"]))
47+
$track = $_POST["track"];
48+
if(!empty($_POST["genre"]))
49+
$genre = $_POST["genre"];
50+
51+
?>
52+
53+
<form method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>" style="margin-left:11%;" onsubmit="ladenein();">
54+
<fieldset style="width:900px;">
55+
<legend><span style="font-weight:700;">List Tags</legend>
56+
<p>
57+
(rel)path: <input type="text" name="relpfad" style="width:777px;" value="<?php echo $relpfad ?>" placeholder="./folder/" required />
58+
</p>
59+
<p style="display:none">
60+
viewonly: <input type="checkbox" name="viewonly" checked />
61+
</p>
62+
<!--
63+
<p>
64+
executeit: <input type="checkbox" name="execute" />
65+
</p>
66+
-->
67+
</fieldset>
68+
<p>
69+
<input type="submit" name="submit" value="submit" style="width:930px;" />
70+
</p>
71+
</form>
72+
<p style="margin-left:11%;"><img name="load" src="loading.gif" width="44" height="44" alt="loading"></p>
73+
<script type="text/javascript">
74+
function ladenaus() { document.load.style.display = "none"; }
75+
function ladenein() { document.load.style.display = "block"; }
76+
</script>
77+
78+
<?php
79+
// App-Steuerung
80+
if (isset($_POST["submit"])) {
81+
if(isset($_POST["relpfad"]))
82+
$relpfad = $_POST["relpfad"];
83+
if(isset($_POST["viewonly"]))
84+
$viewonly = $_POST["viewonly"];
85+
if(isset($_POST["execute"]))
86+
$execute = $_POST["execute"];
87+
88+
$batch = scan_dir($relpfad, $fileTyp, TRUE, FALSE, TRUE, $onlyDir, $dateien);
89+
90+
if($batch == false) {
91+
echo '<dir style="margin-left:8%; font-weight:bold;">';
92+
echo '<p style="color:red;">No mp3 files or <u>&nbsp;folder&nbsp;</u> not existent!</p>';
93+
echo "\n <p>$relpfad</p>";
94+
echo '</dir>';
95+
exit();
96+
}
97+
98+
if($viewonly)
99+
$ausgabe = buildSites1($batch);
100+
echo '<dir style="text-align:center;"><p><a href="#top">top</a><br><br></p></dir>';
101+
}
102+
?>
103+
104+
</body>
105+
</html>

0 commit comments

Comments
 (0)