Commit 1f48f7ec authored by rail rail's avatar rail rail
Browse files

fixed(warning): use DIRECTORY_SEPARATOR constant instead of DS

parent 8bd0bf0f
<?php
/* ezWEB NG
* (C)opyleft 2017-2020 ambNET (info@ambnet.biz)
* This software is licensed under GPL3:
* http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<div id="modalEdit">
<form class="form-inline" id="archive_edit_form">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="editArtist">Artist</label>
<input type="text" class="form-control" name="editArtist" id="editArtist" placeholder="artist" />
</div>
<div class="form-group">
<label for="editTitle">Title</label>
<input type="text" class="form-control" name="editTitle" id="editTitle" placeholder="title" />
</div>
<div class="form-group">
<label for="editAlbum">Album</label>
<input type="text" class="form-control" name="editAlbum" id="editAlbum" placeholder="album" />
</div>
<div class="form-group">
<label for="editComment">Comment</label>
<textarea class="form-control" name="editComment" id="editComment" placeholder="comment"></textarea>
</div>
<div class="form-group">
<label for="editHardness">Hardness</label><br />
<input id="editHardness" type="text" data-slider-min="1" data-slider-max="9" data-slider-step="1" data-slider-value="1"/><br />
</div>
<div class="form-group">
<label for="editPlaylists">Playlist(s)</label>
<input type="text" class="form-control" name="editPlaylists" id="editPlaylists"/>
</div>
<input type="hidden" name="tid" id="tid" />
<button type="submit" class="btn btn-primary btn-lg">Save</button>
<button type="reset" class="btn btn-danger btn-lg">Cancel</button>
</div>
</div>
</div>
</form>
</div>
<div id="modalAddcat">
<h4>Add a new category</h4>
<form id="archive_addcat_form">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<?php
$folders = array();
$pl = $tracks->getPlaylists();
foreach ( scandir( $cfg['mp3path'] ) as $f ) {
if ( ( is_dir( $cfg['mp3path'] .DS. $f ) ) AND ( $f !== '.' ) AND ( $f != '..' ) ) {
if ( array_search( $f, $pl ) === false ) {
array_push( $folders, $f );
}
}
}
?>
<div class="addExisting<?= count($folders) > 0 ? ' active' : ' hidden'; ?>">
<label for="addFolder">Folder</label>
<select class="form-control" id="addFolder" name="addFolder">
<?php
$found = false;
foreach ( $folders as $f ) {
?>
<option value="<?= $f; ?>"><?= $f; ?></option>
<?php
}
?>
<option value="addnewfolder">Add new folder</option>
</select>
</div>
<div class="addNew<?= count($folders) > 0 ? ' hidden' : ' active'; ?>">
<label for="addNew">Folder</label>
<input type="text" class="form-control" name="addNew" id="addNew" placeholder="New Folder / Genre" />
</div>
</div>
<button type="submit" class="btn btn-primary btn-lg btn-create">Create</button>
<button type="reset" class="btn btn-danger btn-lg btn-cancel">Cancel</button>
</div>
</div>
</div>
</form>
</div>
<div class="scrollcontainer">
<div>
<form class="form-inline" id="archive_form">
<div class="container-fluid">
<div class="row">
<div class="col-sm-5 col-xs-9">
<select id="archive_playlist" class="form-control">
<option value="0">All</option>
<?php
foreach ( $tracks->getPlaylists() as $pid => $playlist ) {
?>
<option value="<?= $pid; ?>"><?= $playlist; ?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2 col-xs-3">
<a href="#addcategory" class="btn btn-success btn-addcat" title="Add new category"><span class="glyphicon glyphicon-plus-sign"></span></a>&nbsp;<a href="#removecategory" class="btn btn-danger btn-delcat" title="Remove category" data-toggle="popover" data-content='<input type="checkbox" name="deletefiles" id="deletefiles" value="1" /> Delete files, too?<br /><button class="btn btn-danger btn-block btn-reallydelcat"><span class="glyphicon glyphicon-trash"></span></button>'><span class="glyphicon glyphicon-trash"></span></a>
</div>
<div class="col-sm-5">
<input type="text" class="form-control" id="archive_search" placeholder="search" />
</div>
</div>
<div class="row">
<div class="col-sm-12">
<ul class="listHead">
<li class="head">
<div class="container-fluid">
<div class="row">
<div class="col-xs-7">Track</div>
<div class="col-xs-2">Length</div>
<div class="col-xs-1">Weight</div>
<div class="col-xs-2 queueActions archiveActions">Actions</div>
</div>
</div>
</li>
</ul>
<ul class="listArchive">
<?php
$tr = $tracks->getFiles();
if ( is_array( $tr ) ) {
if ( count( $tr ) > 0 ) {
foreach ( $tr as $track ) {
?>
<li data-tid="<?= $track['id']; ?>">
<div class="container-fluid">
<div class="row">
<div class="col-xs-7 archiveTitle">
<button type="button" class="buttonEnqueue" name="addQueue" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-left"></span></button>
<?php
echo $tracks->getSpan( $track['id'], $track['id3_artist'] .' - '. $track['id3_title'], 'ar' );
?>
</div>
<div class="col-xs-2 archiveLength">
<?= gmdate( 'G:i:s', $track['id3_length'] ); ?>
</div>
<div class="col-xs-1 archiveWeight">
<?= $track['weight']; ?>
</div>
<div class="col-xs-2 archiveActions">
<button type="button" class="buttonUp" name="rateUp" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-up"></span></button>
<button type="button" class="buttonDown" name="rateDown" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-down"></span></button>
<button type="button" class="buttonListen" name="listen" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-headphones"></span></button><button type="button" class="buttonEdit" name="edit" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-pencil"></span></button>
</div>
</div>
</div>
</li>
<?php
}
}
}
?>
</ul>
</div>
</div>
</div>
</form>
</div>
</div>
\ No newline at end of file
<?php
/* ezWEB NG
* (C)opyleft 2017-2020 ambNET (info@ambnet.biz)
* This software is licensed under GPL3:
* http://www.gnu.org/licenses/gpl-3.0.html
*/
?>
<div id="modalEdit">
<form class="form-inline" id="archive_edit_form">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label for="editArtist">Artist</label>
<input type="text" class="form-control" name="editArtist" id="editArtist" placeholder="artist" />
</div>
<div class="form-group">
<label for="editTitle">Title</label>
<input type="text" class="form-control" name="editTitle" id="editTitle" placeholder="title" />
</div>
<div class="form-group">
<label for="editAlbum">Album</label>
<input type="text" class="form-control" name="editAlbum" id="editAlbum" placeholder="album" />
</div>
<div class="form-group">
<label for="editComment">Comment</label>
<textarea class="form-control" name="editComment" id="editComment" placeholder="comment"></textarea>
</div>
<div class="form-group">
<label for="editHardness">Hardness</label><br />
<input id="editHardness" type="text" data-slider-min="1" data-slider-max="9" data-slider-step="1" data-slider-value="1"/><br />
</div>
<div class="form-group">
<label for="editPlaylists">Playlist(s)</label>
<input type="text" class="form-control" name="editPlaylists" id="editPlaylists"/>
</div>
<input type="hidden" name="tid" id="tid" />
<button type="submit" class="btn btn-primary btn-lg">Save</button>
<button type="reset" class="btn btn-danger btn-lg">Cancel</button>
</div>
</div>
</div>
</form>
</div>
<div id="modalAddcat">
<h4>Add a new category</h4>
<form id="archive_addcat_form">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<?php
$folders = array();
$pl = $tracks->getPlaylists();
foreach ( scandir( $cfg['mp3path'] ) as $f ) {
if ( ( is_dir( $cfg['mp3path'] .DIRECTORY_SEPARATOR. $f ) ) AND ( $f !== '.' ) AND ( $f != '..' ) ) {
if ( array_search( $f, $pl ) === false ) {
array_push( $folders, $f );
}
}
}
?>
<div class="addExisting<?= count($folders) > 0 ? ' active' : ' hidden'; ?>">
<label for="addFolder">Folder</label>
<select class="form-control" id="addFolder" name="addFolder">
<?php
$found = false;
foreach ( $folders as $f ) {
?>
<option value="<?= $f; ?>"><?= $f; ?></option>
<?php
}
?>
<option value="addnewfolder">Add new folder</option>
</select>
</div>
<div class="addNew<?= count($folders) > 0 ? ' hidden' : ' active'; ?>">
<label for="addNew">Folder</label>
<input type="text" class="form-control" name="addNew" id="addNew" placeholder="New Folder / Genre" />
</div>
</div>
<button type="submit" class="btn btn-primary btn-lg btn-create">Create</button>
<button type="reset" class="btn btn-danger btn-lg btn-cancel">Cancel</button>
</div>
</div>
</div>
</form>
</div>
<div class="scrollcontainer">
<div>
<form class="form-inline" id="archive_form">
<div class="container-fluid">
<div class="row">
<div class="col-sm-5 col-xs-9">
<select id="archive_playlist" class="form-control">
<option value="0">All</option>
<?php
foreach ( $tracks->getPlaylists() as $pid => $playlist ) {
?>
<option value="<?= $pid; ?>"><?= $playlist; ?></option>
<?php
}
?>
</select>
</div>
<div class="col-sm-2 col-xs-3">
<a href="#addcategory" class="btn btn-success btn-addcat" title="Add new category"><span class="glyphicon glyphicon-plus-sign"></span></a>&nbsp;<a href="#removecategory" class="btn btn-danger btn-delcat" title="Remove category" data-toggle="popover" data-content='<input type="checkbox" name="deletefiles" id="deletefiles" value="1" /> Delete files, too?<br /><button class="btn btn-danger btn-block btn-reallydelcat"><span class="glyphicon glyphicon-trash"></span></button>'><span class="glyphicon glyphicon-trash"></span></a>
</div>
<div class="col-sm-5">
<input type="text" class="form-control" id="archive_search" placeholder="search" />
</div>
</div>
<div class="row">
<div class="col-sm-12">
<ul class="listHead">
<li class="head">
<div class="container-fluid">
<div class="row">
<div class="col-xs-7">Track</div>
<div class="col-xs-2">Length</div>
<div class="col-xs-1">Weight</div>
<div class="col-xs-2 queueActions archiveActions">Actions</div>
</div>
</div>
</li>
</ul>
<ul class="listArchive">
<?php
$tr = $tracks->getFiles();
if ( is_array( $tr ) ) {
if ( count( $tr ) > 0 ) {
foreach ( $tr as $track ) {
?>
<li data-tid="<?= $track['id']; ?>">
<div class="container-fluid">
<div class="row">
<div class="col-xs-7 archiveTitle">
<button type="button" class="buttonEnqueue" name="addQueue" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-left"></span></button>
<?php
echo $tracks->getSpan( $track['id'], $track['id3_artist'] .' - '. $track['id3_title'], 'ar' );
?>
</div>
<div class="col-xs-2 archiveLength">
<?= gmdate( 'G:i:s', $track['id3_length'] ); ?>
</div>
<div class="col-xs-1 archiveWeight">
<?= $track['weight']; ?>
</div>
<div class="col-xs-2 archiveActions">
<button type="button" class="buttonUp" name="rateUp" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-up"></span></button>
<button type="button" class="buttonDown" name="rateDown" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-chevron-down"></span></button>
<button type="button" class="buttonListen" name="listen" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-headphones"></span></button><button type="button" class="buttonEdit" name="edit" data-tid="<?= $track['id']; ?>"><span class="glyphicon glyphicon-pencil"></span></button>
</div>
</div>
</div>
</li>
<?php
}
}
}
?>
</ul>
</div>
</div>
</div>
</form>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment