Subversion-Projekte lars-tiefland.medien

Revision

Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
        <head>
                <title>{$title|default:"No title"}</title>
                <link href="../images/favicon.ico" rel="shortcut icon" type="image/x-icon">
                <link rel="stylesheet" href="../styles/Standard.css" type="text/css">
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                {literal}
                <script language="Javascript" type="text/javascript">
                        function check_album_form()
                        {
                                var a_name=document.album.a_name.value;
                                var a_pic=document.album.a_pic.value;
                                var del=document.album.del.checked;
                                var a_genre=document.album.a_genre.value;
                                var a_artist=document.album.a_artist.value;
                                if (a_name == "")
                                {
                                        window.alert({/literal}"{$L_ALBUM_NAME_EMPTY}"{literal});
                                        document.album.a_name.focus();
                                        return false;
                                }
                                if(del && a_pic.length)
                                {
                                        window.alert({/literal}"{$L_EDIT_REMOVE_PIC_ONLY}"{literal});
                                        return false;
                                }
                                if (a_genre==-1)
                                {
                                        window.alert({/literal}"{$L_GENRE_EMPTY}"{literal});
                                        return false;
                                }
                                if (a_artist==-1)
                                {
                                        window.alert({/literal}"{$L_ARTIST_EMPTY}"{literal});
                                        return false;
                                }
                        }
                        function check_artist_form()
                        {
                                var a_name=document.artist.a_name.value;
                                var a_pic=document.album.a_pic.value;
                                var del=document.album.del.checked;
                                if (a_name == "")
                                {
                                        window.alert("{$L_ARTIST_NAME_EMPTY}");
                                        document.album.a_name.focus();
                                        return false;
                                }
                                if(del && a_pic.length)
                                {
                                        window.alert({/literal}"{$L_EDIT_REMOVE_PIC_ONLY}"{literal});
                                        return false;
                                }
                        }
                        function check_cd_form()
                        {
                                var cd_name=document.cd.cd_name.value;
                                var cd_tracks=document.cd.cd_t_anz.value;
                                var cd_album=document.cd.cd_album.value;
                                if (cd_name == "")
                                {
                                        window.alert({/literal}"{$L_CD_NAME_EMPTY}"{literal});
                                        document.cd.cd_name.focus();
                                        return false;
                                }
                                if (cd_tracks=="" || cd_tracks<1)
                                {
                                        window.alert("{$L_TRACK_COUNT_INVALID}");
                                        document.cd.cd_t_anz.focus();
                                        return false;
                                }
                                if (cd_album==-1)
                                {
                                        window.alert("{$L_ALBUM_EMPTY}");
                                        return false;
                                }
                        }
                        function check_cd_track_form()
                        {
                                var cd_id=document.cd_tracks.cd_id.value;
                                var t_id=document.cd_tracks.t_id.value;
                                var track_no=document.cd_tracks.track_no.value;
                                if (cd_id==-1)
                                {
                                        window.alert({/literal}"{$L_CD_EMPTY}"{literal});
                                        return false;
                                }
                                if (t_id==-1)
                                {
                                        window.alert({/literal}"{$L_TRACK_EMPTY}"{literal});
                                        return false;
                                }
                                if (track_no=="" || track_no <=0)
                                {
                                        window.alert({/literal}"{$L_TRACK_NO_INVALID}"{literal});
                                        document.cd_tracks.track_no.focus();
                                        return false;
                                }
                        }
                        function check_genre_form()
                        {
                                var g_name=document.genre.g_name.value;
                                if (g_name == "")
                                {
                                        window.alert({/literal}"{$L_GENRE_NAME_EMPTY}"{literal});
                                        document.genre.g_name.focus();
                                        return false;
                                }
                        }
                        function check_login_form()
                        {
                                var u_name=login.username.value;
                                var u_pass=login.password.value;
                                var u_type={/literal}{$u_type}{literal};
                                if (u_name=="")
                                {
                                        window.alert({/literal}"{$L_USERNAME_EMPTY}"{literal});
                                        document.login.username.focus();
                                        return false;
                                }
                                if (u_pass=="")
                                {
                                        window.alert({/literal}"{$L_PASSWORD_EMPTY}"{literal});
                                        document.login.password.focus();
                                        return false;
                                }
                        }
                        function check_register_form()
                        {
                                var u_name=document.register.username.value;
                                var email=document.register.email.value;
                                var password=document.register.password.value;
                                var password2=document.register.password2.value;
                                var u_lang=document.register.u_lang.value;
                                if (u_name=="")
                                {
                                        window.alert({/literal}"{$L_USERNAME_EMPTY}"{literal});
                                        document.register.username.focus();
                                        return false;
                                }
                                if (email=="")
                                {
                                        window.alert({/literal}"{$L_EMAIL_EMPTY}"{literal});
                                        document.register.email.focus();
                                        return false;
                                }
                                if (password=="")
                                {
                                        window.alert({/literal}"{$L_PASSWORD_EMPTY}"{literal});
                                        document.register.password.focus();
                                        return false;
                                }
                                if (password.length<5)
                                {
                                        window.alert({/literal}"{$L_PASSWORD_TOO_SHORT}"{literal});
                                        document.register.password2.focus();
                                        return false;
                                }
                                if (password!=password2)
                                {
                                        window.alert({/literal}"{$L_PASSWORD_DIFF}"{literal});
                                        document.register.password.focus();
                                        return false;
                                }
                                if (u_lang=="no")
                                {
                                        window.alert({/literal}"{$L_LANGUAGE_EMPTY}"{literal});
                                        document.register.u_lang.focus();
                                        return false;
                                }
                        }
                        function check_track_form()
                        {
                                var t_name=document.track.t_name.value;
                                var t_min=document.track.min.value;
                                var t_sec=document.track.sec.value;
                                var t_artist=document.track.t_artist.value;
                                var t_genre=document.track.t_genre.value;
                                if(t_genre==-1)
                                {
                                        window.alert({/literal}"{$L_GENRE_EMPTY}"{literal});
                                        document.track.t_genre.focus();
                                        return false;
                                }
                                if (t_artist==-1)
                                {
                                        window.alert({/literal}"{$L_ARTIST_EMPTY}"{literal});
                                        return false;
                                }
                                if (t_name=="")
                                {
                                        window.alert({/literal}"{$L_TRACK_NAME_EMPTY}"{literal});
                                        document.track.t_name.focus();
                                        return false;
                                }
                                if(t_min==-1||t_sec==-1)
                                {
                                        window.alert({/literal}"{$L_DURATION_EMPTY}"{literal});
                                        return false;
                                }
                        }
                        function check_User_Form()
                        {
                                var u_name=document.user.u_name.value;
                                var mode=document.user.mode.value;
                                var u_pw=document.user.u_pw.value;
                                var u_pw_conf=document.user.u_pw_conf.value;
                                if (u_name.length<1)
                                {
                                        window.alert({/literal}"{$L_USERNAME_EMPTY}"{literal});
                                        document.user.u_name.focus();
                                        return false;
                                }
                                if (u_pw!="" && u_pw.length<5)
                                {
                                        window.alert({/literal}"{$L_PASSWORD_TOO_SHORT}"{literal});
                                        document.user.u_pw.focus();
                                        return false;
                                }
                                if(u_pw_conf != u_pw)
                                {
                                        window.alert({/literal}"{$L_PASSWORD_DIFF}"{literal});
                                        document.user.u_pw_conf.focus();
                                        return false;
                                }
                                if (u_lang=="no")
                                {
                                        window.alert({/literal}"{$L_LANGUAGE_EMPTY}"{literal});
                                        document.register.u_lang.focus();
                                        return false;
                                }
                        }
                </script>
                {/literal}
        </head>
        {if isset($focus)}
        <body onload="{$focus}.focus();">
        {else}
        <body>
        {/if}
        <table>
                <tr>
                        <th>{$L_LOGGED_IN_AS}</th>
                        <th>{$L_VERSION}</th>
                        <th>{$L_DATE} / {$L_TIME}</th>
                </tr>
                <tr>
                        <td align="center">{$u_name|default:"<i>[$L_NOT_LOGGED_IN]</i>"}</td>
                        <td align="center">{$version}</td>
                        <td align="center">{$date} {$L_O_CLOCK} </td>
                </tr>
        </table>
        <h1>{$h1|default:$title}</h1>
        <table>
        <tr>
                <th colspan="5">{$L_ACTIONS}</th>
        </tr>
        <tr align="center">
                <td>
                        <form action="index.php" method="post">
                                <input type="submit" class="liteoption" name="change" value="{$L_LIST_OF_ALBUMS}">
                        </form>
                </td>
                <td>
                        <form action="liste_cds.php" method="post">
                                <input type="submit" class="liteoption" name="change" value="{$L_LIST_OF_CDS}">
                        </form>
                </td>
                <td>
                        <form action="liste_artists.php" method="post">
                                <input type="submit" class="liteoption" name="change" value="{$L_LIST_OF_ARTISTS}">
                        </form>
                </td>
                <td>
                        <form action="liste_genres.php" method="post">
                                <input type="submit" class="liteoption" name="change" value="{$L_LIST_OF_GENRES}">
                        </form>
                </td>
                <td>
                        <form action="liste_tracks.php" method="post">
                                <input type="submit" class="liteoption" name="change" value="{$L_LIST_OF_TRACKS}">
                        </form>
                </td>
        </tr>
        <tr align="center">
                <td>
                        {if $u_name!=""}
                        <form action="../logout.php" method="post">
                                <input type="submit" class="liteoption" name="logout" value="{$L_LOGOUT}">
                        </form>
                        {else}
                        <form action="../login.php" method="post">
                                <input type="submit" class="liteoption" name="login" value="{$L_LOGIN}">
                        </form>
                        {/if}
                </td>
                <td>
                        {if $u_name!=""}
                        <form action="../edit_users.php" method="post">
                                <input type="hidden" name="mode" value="edit">
                                <input type="hidden" name="id" value="{$u_id}">
                                <input type="submit" class="liteoption" name="profile" value="{$L_PROFILE}">
                        </form>
                        {/if}
                </td>
                <td>
                        {if $u_name==""}
                        <form action="../register.php" method="post">
                                <input type="submit" class="liteoption" name="register" value="{$L_REGISTER}" {$disabled2}>
                        </form>
                        {/if}
                </td>
                <td>
                        {if $u_name==""}
                        <form action="../lost.php" method="post">
                                <input type="submit" class="liteoption" name="lost" value="{$L_LOST_PASSWORD}" disabled=disabled>
                        </form>
                        {/if}
                        {if $u_type==1}
                        <form action="../viewlog.php" method="post">
                                <input type="submit" class="liteoption" name="lost" value="{$L_VIEW_LOG}">
                        </form>
                        {/if}
                </td>
                <td>
                </td>
        </tr>
        <tr align="center"> 
                <td>
                        {if $u_type==1}
                        <form action="../edit_users.php" method="post">
                                <input type="submit" value="{$L_EDIT_USERS}" class="liteoption">
                        </form>
                        {/if}
                </td>
                <td colspan="4"></td>
        </tr>
</table>
{if $u_type==1}
<br>
<table>
        <tr>
                <th colspan=6>{$L_ADMIN} {$L_TASKS}</th>
        </tr>
        <tr align="center">
                <td>
                        <form action="edit_albums.php" method="post">
                                <input type="submit" value="{$L_NEW_ALBUM}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
                <td>
                        <form action="edit_artists.php" method="post">
                                <input type="submit" value="{$L_NEW_ARTIST}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
                <td>
                        <form action="edit_cds.php" method="post">
                                <input type="submit" value="{$L_NEW_CD}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
                <td>
                        <form action="edit_genres.php" method="post">
                                <input type="submit" value="{$L_NEW_GENRE}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
                <td>
                        <form action="edit_tracks.php" method="post">
                                <input type="submit" value="{$L_NEW_TRACK}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
                <td>
                        <form action="../edit_users.php" method="post">
                                <input type="submit" value="{$L_NEW_USER}" class="liteoption">
                                <input type="hidden" name="mode" value="new">
                        </form>
                </td>
        </tr>
</table>
{/if}
<br>