<?php
/************************************************************************/
/* Top Music: Administration Module */
/* ================================ */
/* */
/* Copyright (c) 2004 by SergiDs.com */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='topMusic'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") {
$auth_user = 1;
}
}
if ($row2['radminsuper'] == 1 || $auth_user == 1) {
?>
<script type="text/javascript">
<!--
if(document.all)
alert('Chart administration is not compatible with Internet Explorer');
//-->
</script>
<table cellspacing="0" cellpadding="0" border="0">
<form name="chartNew" method="post" action="admin.php?op=topmusic&action=addChart">
<?php if($message!=""){ ?>
<tr>
<td colspan="2"><font color="red"><?=$message?></font></td>
</tr>
<?php } ?>
<tr>
<td><?=_TOPMUSIC_TYPE?>:</td><td>
<select name="type">
<option value="song"><?=_TOPMUSIC_SONG?></option>
<option value="album"><?=_TOPMUSIC_ALBUM?></option>
<option value="artist"><?=_TOPMUSIC_ARTIST?></option>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_TITLE?>:</td><td><input type="text" name="title" size="45"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_DESCRIPTION?>:</td><td><textarea name="description" cols="70" rows="15"></textarea></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_NUMBERELEMENTS?>:</td><td><input type="text" name="number_elements" size="10" value="10"> (<?=_TOPMUSIC_CHANGELATER?>)</td>
</tr>
<tr>
<td><?=_TOPMUSIC_DEFAULT?>:</td><td><input type="checkbox" name="default"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td><td align="right"><input type="submit" name="submit" value="<?=_TOPMUSIC_INSERT?>"></td>
</tr>
</form>
</table>
<?php
} else {
OpenTable();
echo "Access Denied";
CloseTable();
}