forked from bruno/pabx-app
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
2 years ago
|
|
||
|
<?
|
||
|
$id1 = $_GET["id1"];
|
||
|
$id2 = $_GET["id2"];
|
||
|
?>
|
||
|
<script language="JavaScript" type="text/JavaScript">
|
||
|
<!--
|
||
|
function MM_jumpMenu(selObj){ //v3.0
|
||
|
window.parent.document.form1.departamento.value = selObj.options[selObj.selectedIndex].value;
|
||
|
|
||
|
}
|
||
|
//-->
|
||
|
</script>
|
||
|
<link href="admin/css/forms.css" rel="stylesheet" type="text/css">
|
||
|
<style type="text/css">
|
||
|
<!--
|
||
|
body {
|
||
|
margin-left: 0px;
|
||
|
margin-top: 0px;
|
||
|
margin-right: 0px;
|
||
|
margin-bottom: 0px;
|
||
|
}
|
||
|
-->
|
||
|
</style></head>
|
||
|
|
||
|
<body bgcolor="#EAEAEA" onLoad="MM_jumpMenu(departamento.options[departamento.selectedIndex].value)">
|
||
|
<input type="hidden" name="valDepto" value="alert">
|
||
|
|
||
|
<? if ($id1 != "") { ?>
|
||
|
<select name="departamento" class="caixas" id="departamento" onChange="MM_jumpMenu(this);" onFocus="MM_jumpMenu(this)" onBlur="MM_jumpMenu(this)">
|
||
|
<?
|
||
|
$query2 = "SELECT * FROM pbx_departamentos where empresa=$id1 order by id asc";
|
||
|
$result2 = pg_query($dbcon, $query2);
|
||
|
while ($dados2 = pg_fetch_array($result2)) {
|
||
|
?>
|
||
|
<option value="<? echo $dados2['id']; ?>" <?
|
||
|
if ($id2 == $dados2['id']) {
|
||
|
echo "selected";
|
||
|
}
|
||
|
?>><? echo $dados2['nome_depto']; ?></option>
|
||
|
<? } ?>
|
||
|
</select>
|
||
|
<? } else { ?>
|
||
|
<span class="labels">SELECIONE UMA EMPRESA!</span>
|
||
|
<? } ?>
|