AmpJuke Community

AmpJuke Community => Requests/suggestions => Topic started by: chve on 25-01-2016 16:25

Title: hello, good application
Post by: chve on 25-01-2016 16:25
Good application to local network, the jukebox mode works really well together VLC. I like, but you need a theme 100% responsive.  :-\

// 0.8.5: Avoid "not-installed-stuff":
if (!file_exists('db.php')) {
   echo 'It seems like you have not <b>installed</b> AmpJuke, yet.<br>';
   echo 'If that is true, you might try <a href="./">this link</a>.<br>';
   echo 'Please note there is a complete step-by-step installation guide <a href="">right here</a> (opens in a new window/tab.';
// 0.7.2: Generate the uuid:
function make_uuid($prefix) {
    $chars = md5(uniqid(rand()));
    $uuid  = substr($chars,0,8) . '-';
    $uuid .= substr($chars,8,4) . '-';
    $uuid .= substr($chars,12,4) . '-';
    $uuid .= substr($chars,16,4) . '-';
    $uuid .= substr($chars,20,12);
    return $prefix . $uuid;
require("db.php"); // 0.7.7: Moved here -> banned_ip's are now configurable:

// 0.7.5: Ban IP if number of failed login attempts is higher than X.
// 0.7.7: Only ban if enabled
if ((isset($max_failed_login_enabled)) && ($max_failed_login_enabled=='1')) {
   if (file_exists('./tmp/banned_ips.txt')) {
      $handle=fopen('./tmp/banned_ips.txt', 'r');
      while (!feof($handle)) {
         if (trim($line)==trim($_SERVER["REMOTE_ADDR"])) {
      if ($count>$max_failed_login_attempts) {
         die('Sorry, too many wrong login attempts. IP-address is banned.');

// 0.6.3: Remember login ?? Don't display anything - simply redirect right away:
// 0.8.1: ...but ONLY if "login_hide_keep_me_signed_in" isn't set:
if ((isset($_COOKIE['ampjuke_remember_all'])) && ((!isset($login_hide_keep_me_signed_in)) || ($login_hide_keep_me_signed_in<>'1'))) {
   echo '<form name="login" method="POST" action="loginvalidate.php">';
   echo '<input type="text" name="login" value="'.$def_navn.'">';
   echo '<input type="password" name="password" value="'.$def_pass.'">';
   echo '<input type="hidden" name="remember_login" value="1">';
   echo '<input type="hidden" name="saved_url_params" value="'.$_SERVER["QUERY_STRING"].'">';

   // 0.7.2: Create temporary file, so loginvalidate.php knows we were here:
    $uuid  = './tmp/'.make_uuid('').'.tmp';
    echo '<input type="hidden" name="uuid" value="'.$uuid.'">';
   print '<script language="JavaScript"> document.login.submit(); </script>';
// 0.6.1: Login.php now uses css-definitions to ease customization of the loginpage.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AmpJuke - Login</title>
<link rel="stylesheet" type="text/css" href="./bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./ampstyles_responsive.css">
<div class="container">
<h3 align="center"><font color="red">Please turn on JavaScript - AmpJuke relies on it</h3>
 <div class="logo_img">
  <img src="./ampjukeicons/ampjuke_login.jpg" class="img-responsive" alt="AmpJuke Jukebox">

 <form role="form" name="login" method="POST" action="loginvalidate.php">
// Create temporary file, so loginvalidate.php knows we were here (-> attempt to avoid POSTing from remote site):
$uuid  = './tmp/'.make_uuid('').'.tmp';
echo '<input type="hidden" name="uuid" value="'.$uuid.'">';
  <div class="form-group">
    <label for="usuario">USUARIO</label>
    <input type="text" name="login" tabindex=1 class="form-control" id="usuario"
           placeholder="Introduce tu nombre de Usuario">
if (isset($demo)) { echo ' <i>Demo, - use: <b>ampjuke</b></i>'; }
// 0.8.4: User-registration enabled ?
if ((isset($user_reg_enabled)) && ($user_reg_enabled==1)) {
   echo '<a href="./userreg.php?act=new&uuid='.str_replace('./tmp/','',$uuid);
   echo '">'.$user_reg_display_text.'</a>';

  <div class="form-group">
    <label for="pass">CONTRASEƑA</label>
    <input type="password" name="password" tabindex=2 class="form-control" id="pass"
           placeholder="Introduce tu ContraseƱa">
if (isset($demo)) { echo ' <i>Demo, - use: <b>ampjuke</b></i>'; }
// 0.8.4: Enable retrieval of password ?
if ((isset($enable_email_with_lost_password)) && ($enable_email_with_lost_password==1)) {
   echo '<a href="./userreg.php?act=forgot_passwd&uuid='.str_replace('./tmp/','',$uuid).'">';
   echo $enable_email_with_lost_password_text.'</a>';
<!-- 0.6.3: New, AmpJuke offers "Keep me logged in" -->
// 0.8.1: This is always displayed, UNLESS 'Hide "Keep me signed in"' is configured in miscellaneous sttings:
if ((!isset($login_hide_keep_me_signed_in)) || ($login_hide_keep_me_signed_in<>'1')) {
  echo '<div class="checkbox">';
  echo '<p>Activa esta casilla para ser Recordado.</p>';
  echo '<label>';
  echo '<input type="checkbox" name="remember_login" tabindex=3> Activo durante 2 Semanas si no deslogeas.';
  echo '</label>';
  echo '</div>';   

  <button type="submit" name="Submit" class="btn btn-default" tabindex=4>ACCEDER</button>


NOTE: Do _not_ remove the link to the AmpJuke site below.

Michael H. Iversen. -->

 <p class="text-right">
  <a href="" target="_blank">AmpJuke Version 0.8.8</a>

if (isset($demo)) {
   echo '<p class="text-center"><a href=""><h4> <-- Return to homepage </h4></a></p>';

print '<form name="login_anonymous" method="POST" action="loginvalidate.php">';
if (isset($allow_anonymous) && ($allow_anonymous==1)) {
   echo '<p class="text-center"><br><hr><br>';
   echo '<input type="hidden" name="login" value="anonymous">';
   echo '<input type="hidden" name="password" value="anonymous">';
    echo '<input type="hidden" name="uuid" value="'.$uuid.'">'; // 0.7.3   
   echo '<input type="submit" name="Submit" value="Login Anonimo (Invitado)" ';
   echo '</p>';

echo '</div>';
print '<script language="JavaScript"> document.forms[0].login.focus(); </script>';

.logo_img {
   width: 307px;
        margin: 5% auto 10% auto;
   border: 0;

Title: Re: hello, good application
Post by: chve on 31-01-2016 16:38
Michael, you can offer me information on the structure of contents, that content close tables and cells. I have read that you use the structure GetSimple cms, but i don't know.  ;)

Title: Re: hello, good application
Post by: devilking on 25-11-2016 09:51
yaa it's really nice application
Title: Re: hello, good application
Post by: Daisy22 on 16-02-2017 13:25
Yes! i agreed with you really amazing application,i used it then i replied here.
Title: Re: hello, good application
Post by: weatherley on 12-03-2018 10:31
Totally agree. The jukebox mode works really well together VLC
Title: Re: hello, good application
Post by: martingail on 02-04-2018 12:51
Totally agree with you guys !