GradeComment::create($user, $userComment, $songComment, $agreement); } } # Process notarize artist /** * * @author Antoine De Gieter * */ if (isset($_SESSION['online']) && (isset($_POST['agree']) || isset($_POST['disagree'])) && isset($_POST['cause']) && isset($_POST['artist'])) { $agreement = isset($_POST['disagree']) ? 0 : 1; $user = $_SESSION['user']->getId(); $artist = $_GET['id']; $cause = $_POST['cause']; $cause = $agreement == 1 ? 7 : $cause; NotarizeArtist::create($user, $artist, $agreement, $cause); } # Process notarize album /** * * @author Antoine De Gieter * */ if (isset($_SESSION['online']) && (isset($_POST['agree']) || isset($_POST['disagree'])) && isset($_POST['cause']) && isset($_POST['album'])) { $agreement = isset($_POST['disagree']) ? 0 : 1; $user = $_SESSION['user']->getId(); $album = $_GET['id']; $cause = $_POST['cause']; $cause = $agreement == 1 ? 7 : $cause; NotarizeAlbum::create($user, $album, $agreement, $cause); }
</span> </button> </form> <form method="post" action="<?php print $album->getUrl(); ?> " id="notarizeDisagree" style="display:inline;"> <input type="hidden" name="album"> <input type="hidden" name="disagree"> <input type="hidden" id="cause" name="cause" value="0"> <button class="btn btn-danger dropdown-toggle" data-toggle="dropdown" type="button" title="Wrong informations" <?php print $album->isDisagreedBy($_SESSION['user']->getId()) ? 'disabled' : ''; ?> > <span class="glyphicon glyphicon-ban-circle"> <?php print NotarizeAlbum::countDisagreeByAlbum($album->getId()); ?> </span> <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <?php foreach (Cause::all() as $cause) { if ((int) $cause->getId() !== 7) { ?> <li><a href="#" onclick="javascript:$('#cause').val('<?php print $cause->getId(); ?> '); $('#notarizeDisagree').submit();"><?php print $cause; ?>