append user flags for DECT calls
git-svn-id: svn://svn.cccv.de/engel-system@332 29ba0400-6e00-0410-a75a-ca02368028f8
This commit is contained in:
parent
4621bbd289
commit
d2b7899c60
|
@ -27,7 +27,10 @@ function TID2Type($TID)
|
||||||
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
return mysql_result($Erg, 0);
|
if( mysql_num_rows($Erg))
|
||||||
|
return mysql_result($Erg, 0);
|
||||||
|
else
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
include ("../../includes/config_db.php");
|
include ("../../includes/config_db.php");
|
||||||
include ("../../includes/funktion_db_list.php");
|
include ("../../includes/funktion_db_list.php");
|
||||||
|
include ("../../includes/funktion_user.php");
|
||||||
|
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
|
@ -25,7 +26,13 @@ for ($i=0; $i < $Zeilen; $i++)
|
||||||
$inuse.= "(UID = \"". mysql_result($Erg, $i, "UID"). "\")";
|
$inuse.= "(UID = \"". mysql_result($Erg, $i, "UID"). "\")";
|
||||||
}
|
}
|
||||||
if ($inuse!="")
|
if ($inuse!="")
|
||||||
|
{
|
||||||
$inuse=" WHERE (NOT (".$inuse.")) AND (DECT!='')";
|
$inuse=" WHERE (NOT (".$inuse.")) AND (DECT!='')";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$inuse=" WHERE (DECT!='')";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//##########################################################################################################
|
//##########################################################################################################
|
||||||
|
@ -35,13 +42,39 @@ $Erg = mysql_query($SQL, $con);
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
$Zeilen = mysql_num_rows($Erg);
|
||||||
for ($i=0; $i < $Zeilen; $i++)
|
for ($i=0; $i < $Zeilen; $i++)
|
||||||
{
|
{
|
||||||
|
// get DECT number
|
||||||
|
echo mysql_result($Erg, $i, "DECT"). "\t";
|
||||||
|
|
||||||
|
// get all user rights
|
||||||
$SQL_RIGHT = "SELECT * FROM UserCVS WHERE UID=". mysql_result($Erg, $i, "UID"). ";";
|
$SQL_RIGHT = "SELECT * FROM UserCVS WHERE UID=". mysql_result($Erg, $i, "UID"). ";";
|
||||||
$Erg_RIGHT = mysql_query($SQL_RIGHT, $con);
|
$Erg_RIGHT = mysql_query($SQL_RIGHT, $con);
|
||||||
|
$UserRights = mysql_fetch_array($Erg_RIGHT);
|
||||||
|
|
||||||
echo mysql_result($Erg, $i, "DECT"). "\t";
|
foreach( $UserRights as $Var => $Value)
|
||||||
echo "Info=". mysql_result($Erg_RIGHT, 0, "Info"). "\t";
|
{
|
||||||
echo "Herald=". mysql_result($Erg_RIGHT, 0, "Herald"). "\t";
|
if( (strpos( $Var, ".php") === false) AND
|
||||||
echo "Conference=". mysql_result($Erg_RIGHT, 0, "Conference"). "\t";
|
(strpos( $Var, "/") === false) AND
|
||||||
|
(strpos( $Var, "UID") === false) AND
|
||||||
|
(is_numeric($Var) === false) )
|
||||||
|
{
|
||||||
|
echo "\"".$Var. "\"=". $Value. "\t";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// get shift types
|
||||||
|
$SQL_TYPES = "SELECT TID FROM `ShiftEntry` WHERE UID=". mysql_result($Erg, $i, "UID"). " GROUP BY TID;";
|
||||||
|
$Erg_TYPES = mysql_query($SQL_TYPES, $con);
|
||||||
|
if( mysql_num_rows( $Erg_TYPES) > 0)
|
||||||
|
{
|
||||||
|
$UserTypes = mysql_fetch_array($Erg_TYPES);
|
||||||
|
foreach( $UserTypes as $Var => $Value)
|
||||||
|
{
|
||||||
|
if( is_numeric($Var) === false)
|
||||||
|
{
|
||||||
|
echo "\"". TID2Type($Value). "\"=Y\t";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue