Initial commit
This commit is contained in:
54
lieder/suchopt_status_search.php
Normal file
54
lieder/suchopt_status_search.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
require_once("../config.inc.php");
|
||||
|
||||
$db = dbconnect();
|
||||
|
||||
if (isset($_GET['action'])) {
|
||||
$action = $_GET['action'];
|
||||
} else {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
if ($action == '') {
|
||||
//A=Auch in Aufführungsreife Lieder, P=Probebestand, U=Unbekannte Lieder, K=Keine Statuseinschränkung/alle
|
||||
$result_lied_status = $db->query("SELECT lied_status
|
||||
FROM profil
|
||||
WHERE user = '$user_admin'");
|
||||
$row_lied_status = $result_lied_status->fetch_array();
|
||||
$status = $row_lied_status['lied_status'];
|
||||
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<style type=\"text/css\">
|
||||
select{
|
||||
width:250px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form action=?action=save method=\"POST\" name=\"wort_erf\">
|
||||
<select name='status' onchange=\"this.form.submit()\">
|
||||
<option value=\"K\"";if($status == 'K'){ echo " selected";} echo">Keine Statusbeschränkung</option>
|
||||
<option value=\"A\"";if($status == 'A'){ echo " selected";} echo">Aufführbare Lieder</option>
|
||||
<option value=\"P\"";if($status == 'P'){ echo " selected";} echo">Übphase</option>
|
||||
<option value=\"U\"";if($status == 'U'){ echo " selected";} echo">Unbekannte Lieder</option>
|
||||
</select>
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
if ($action == 'save') {
|
||||
$status = $_POST["status"];
|
||||
echo "<script language=\"javascript\">
|
||||
top.frames[2].location.href = \"lieder_personalisieren.php\";
|
||||
</script>";
|
||||
$db->query("UPDATE profil
|
||||
SET lied_status='$status'
|
||||
WHERE user='$user_admin'");
|
||||
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; URL=".$_SERVER['PHP_SELF'] ."\">";
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user