Пример #1
0
</select></td>
</tr>

<?php 
if ($GLOBALS['restrict_user_facility']) {
    ?>
<tr>
 <td colspan=2>&nbsp;</td>
 <td><span class=text><?php 
    xl('Schedule Facilities:', 'e');
    ?>
</td>
 <td>
  <select name="schedule_facility[]" multiple style="width:150px;" >
<?php 
    $userFacilities = getUserFacilities($_GET['id']);
    $ufid = array();
    foreach ($userFacilities as $uf) {
        $ufid[] = $uf['id'];
    }
    $fres = sqlStatement("select * from facility where service_location != 0 order by name");
    if ($fres) {
        while ($frow = sqlFetchArray($fres)) {
            ?>
   <option <?php 
            echo in_array($frow['id'], $ufid) || $frow['id'] == $iter['facility_id'] ? "selected" : null;
            ?>
      value="<?php 
            echo $frow['id'];
            ?>
"><?php 
Пример #2
0
    <tr>
      <td nowrap><b><?php 
xl('Facility', 'e');
?>
:</b></td>
      <td>
      <select name="facility" id="facility" >
      <?php 
// ===========================
// EVENTS TO FACILITIES
//(CHEMED) added service_location WHERE clause
// get the facilities
/***************************************************************
   $qsql = sqlStatement("SELECT * FROM facility WHERE service_location != 0");
   ***************************************************************/
$facils = getUserFacilities($_SESSION['authId']);
$qsql = sqlStatement("SELECT id, name FROM facility WHERE service_location != 0");
/**************************************************************/
while ($facrow = sqlFetchArray($qsql)) {
    /*************************************************************
       $selected = ( $facrow['id'] == $e2f ) ? 'selected="selected"' : '' ;
       echo "<option value={$facrow['id']} $selected>{$facrow['name']}</option>";
       *************************************************************/
    if ($_SESSION['authorizedUser'] || in_array($facrow, $facils)) {
        $selected = $facrow['id'] == $e2f ? 'selected="selected"' : '';
        echo "<option value={$facrow['id']} {$selected}>{$facrow['name']}</option>";
    } else {
        $selected = $facrow['id'] == $e2f ? 'selected="selected"' : '';
        echo "<option value={$facrow['id']} {$selected}>{$facrow['name']}</option>";
    }
    /************************************************************/
Пример #3
0
<div id="bigCalHeader">
</div>

<div id="providerPicker">
<?php  xl('Providers','e');  ?>
<div>
<?php 
// ==============================
// FACILITY FILTERING (lemonsoftware)
/*********************************************************************
$facilities = getFacilities();
*********************************************************************/
if ($_SESSION['authorizeduser'] == 1) {
  $facilities = getFacilities();
} else {
  $facilities = getUserFacilities($_SESSION['authId']); // from users_facility
  if (count($facilities) == 1)
    $_SESSION['pc_facility'] = key($facilities);
}
/********************************************************************/
if (count($facilities) > 1) {
    echo "   <select name='pc_facility' id='pc_facility' class='view1' >\n";
    if ( !$_SESSION['pc_facility'] ) $selected = "selected='selected'";
    // echo "    <option value='0' $selected>"  .xl('All Facilities'). "</option>\n";
    if (!$GLOBALS['restrict_user_facility']) echo "    <option value='0' $selected>" . xl('All Facilities') . "</option>\n";
    foreach ($facilities as $fa) {
        $selected = ( $_SESSION['pc_facility'] == $fa['id']) ? "selected='selected'" : "" ;
        echo "    <option style=background-color:".htmlspecialchars($fa['color'],ENT_QUOTES)." value='" .htmlspecialchars($fa['id'],ENT_QUOTES). "' $selected>"  .htmlspecialchars($fa['name'],ENT_QUOTES). "</option>\n";
    }
    echo "   </select>\n";
}