forked from tgc-dk/Musikteam
-
Notifications
You must be signed in to change notification settings - Fork 1
/
abilities.php
41 lines (38 loc) · 1.74 KB
/
abilities.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
if (isset($_SESSION['logget_ind'])) {
?>
<div id="Evner">
<table id="musiker_table" cellspacing="0" cellpadding="3" width="780">
<tr><td bgcolor="#f2f2f2"><strong>Eksisterende evner/instrumenter</strong></td></tr>
<?php
$query = "SELECT RolleID,Navn FROM Rolle ORDER BY RolleID";
$result = doSQLQuery($query);
$colour = "";
while ($line = db_fetch_array($result)) {
$roleID = $line["RolleID"];
$roleName = $line["Navn"];
echo " <tr><td".$colour.">\n";
echo " <form id=\"abilityform".$roleID."\" name=\"abilityform".$roleID."\" method=\"post\" action=\"main.php?page=teams&subpage=abilities&id=".$roleID."\">\n";
echo " <input type=\"text\" size=\"30\" value=\"".$roleName."\" name=\"ability\"> \n";
echo " <input class=\"submit_btn\" type=\"submit\" name=\"Submit\" value=\"Gem ændringer\" /> \n";
echo " <button name=\"send\" value=\"Slet evne\" class=\"submit_btn_2\" onClick=\"javascript:deleteAbility(".$roleID.");document.abilityform".$roleID.".submit();\"> Slet evne </button>\n";
echo " </form>\n";
echo " </td></tr>\n";
if ($colour == "") {
$colour = " bgcolor=\"#f2f2f2\"";
} else {
$colour = "";
}
}
echo " <tr><td".$colour.">\n";
echo " <form id=\"newabilityform\" name=\"newabilityform\" method=\"post\" action=\"main.php?page=teams&subpage=abilities\">\n";
echo " <input type=\"hidden\" name=\"newability\" id=\"newability\" value=\"\">\n";
echo " <button name=\"send\" value=\"Opret ny evne\" class=\"submit_btn_2\" onClick=\"javascript:return newAbility();\"> Opret ny evne </button>\n";
echo " </form>\n";
echo " </td></tr>\n";
?>
</table>
</div> <!-- Evner -->
<?php
} // session
?>