本文整理汇总了PHP中acl_get_squads函数的典型用法代码示例。如果您正苦于以下问题:PHP acl_get_squads函数的具体用法?PHP acl_get_squads怎么用?PHP acl_get_squads使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acl_get_squads函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate_display_field
function generate_display_field($frow, $currvalue)
{
$data_type = $frow['data_type'];
$field_id = $frow['field_id'];
$list_id = $frow['list_id'];
$s = '';
// generic selection list or the generic selection list with add on the fly
// feature, or radio buttons
if ($data_type == 1 || $data_type == 26 || $data_type == 27) {
$lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $currvalue));
$s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
} else {
if ($data_type == 2) {
$s = htmlspecialchars($currvalue, ENT_NOQUOTES);
} else {
if ($data_type == 3) {
$s = nl2br(htmlspecialchars($currvalue, ENT_NOQUOTES));
} else {
if ($data_type == 4) {
$s = htmlspecialchars(oeFormatShortDate($currvalue), ENT_NOQUOTES);
} else {
if ($data_type == 10 || $data_type == 11) {
$urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
$s = htmlspecialchars(ucwords($urow['fname'] . " " . $urow['lname']), ENT_NOQUOTES);
} else {
if ($data_type == 12) {
$pres = get_pharmacies();
while ($prow = sqlFetchArray($pres)) {
$key = $prow['id'];
if ($currvalue == $key) {
$s .= htmlspecialchars($prow['name'] . ' ' . $prow['area_code'] . '-' . $prow['prefix'] . '-' . $prow['number'] . ' / ' . $prow['line1'] . ' / ' . $prow['city'], ENT_NOQUOTES);
}
}
} else {
if ($data_type == 13) {
$squads = acl_get_squads();
if ($squads) {
foreach ($squads as $key => $value) {
if ($currvalue == $key) {
$s .= htmlspecialchars($value[3], ENT_NOQUOTES);
}
}
}
} else {
if ($data_type == 14) {
$urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
$uname = $urow['lname'];
if ($urow['fname']) {
$uname .= ", " . $urow['fname'];
}
$s = htmlspecialchars($uname, ENT_NOQUOTES);
} else {
if ($data_type == 15) {
$s = htmlspecialchars($currvalue, ENT_NOQUOTES);
} else {
if ($data_type == 21) {
$avalue = explode('|', $currvalue);
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
$count = 0;
while ($lrow = sqlFetchArray($lres)) {
$option_id = $lrow['option_id'];
if (in_array($option_id, $avalue)) {
if ($count++) {
$s .= "<br />";
}
// Added 5-09 by BM - Translate label if applicable
$s .= htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
}
}
} else {
if ($data_type == 22) {
$tmp = explode('|', $currvalue);
$avalue = array();
foreach ($tmp as $value) {
if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
$avalue[$matches[1]] = $matches[2];
}
}
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
$s .= "<table cellpadding='0' cellspacing='0'>";
while ($lrow = sqlFetchArray($lres)) {
$option_id = $lrow['option_id'];
if (empty($avalue[$option_id])) {
continue;
}
// Added 5-09 by BM - Translate label if applicable
$s .= "<tr><td class='bold' valign='top'>" . htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES) . ": </td>";
$s .= "<td class='text' valign='top'>" . htmlspecialchars($avalue[$option_id], ENT_NOQUOTES) . "</td></tr>";
}
$s .= "</table>";
} else {
if ($data_type == 23) {
$tmp = explode('|', $currvalue);
$avalue = array();
foreach ($tmp as $value) {
if (preg_match('/^([^:]+):(.*)$/', $value, $matches)) {
$avalue[$matches[1]] = $matches[2];
}
}
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
//.........这里部分代码省略.........
示例2: generate_display_field
function generate_display_field($frow, $currvalue)
{
global $ISSUE_TYPES;
$data_type = $frow['data_type'];
$field_id = isset($frow['field_id']) ? $frow['field_id'] : null;
$list_id = $frow['list_id'];
$backup_list = $frow['list_backup_id'];
$s = '';
// generic selection list or the generic selection list with add on the fly
// feature, or radio buttons
// Supports backup lists for datatypes 1,26,33
if ($data_type == 1 || $data_type == 26 || $data_type == 27 || $data_type == 33) {
$lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($list_id, $currvalue));
$s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
//if there is no matching value in the corresponding lists check backup list
// only supported in data types 1,26,33
if ($lrow == 0 && !empty($backup_list) && ($data_type == 1 || $data_type == 26 || $data_type == 33)) {
$lrow = sqlQuery("SELECT title FROM list_options " . "WHERE list_id = ? AND option_id = ?", array($backup_list, $currvalue));
$s = htmlspecialchars(xl_list_label($lrow['title']), ENT_NOQUOTES);
}
} else {
if ($data_type == 2) {
$s = nl2br(htmlspecialchars($currvalue, ENT_NOQUOTES));
} else {
if ($data_type == 3) {
$s = nl2br(htmlspecialchars($currvalue, ENT_NOQUOTES));
} else {
if ($data_type == 4) {
$s = '';
$agestr = optionalAge($frow, $currvalue);
if ($agestr) {
$s .= "<table cellpadding='0' cellspacing='0'><tr><td class='text'>";
}
if ($currvalue === '') {
$s .= ' ';
} else {
$s .= text(oeFormatShortDate($currvalue));
}
// Optional display of age or gestational age.
if ($agestr) {
$s .= "</td></tr><tr><td class='text'>" . text($agestr) . "</td></tr></table>";
}
} else {
if ($data_type == 10 || $data_type == 11) {
$urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
$s = htmlspecialchars(ucwords($urow['fname'] . " " . $urow['lname']), ENT_NOQUOTES);
} else {
if ($data_type == 12) {
$pres = get_pharmacies();
while ($prow = sqlFetchArray($pres)) {
$key = $prow['id'];
if ($currvalue == $key) {
$s .= htmlspecialchars($prow['name'] . ' ' . $prow['area_code'] . '-' . $prow['prefix'] . '-' . $prow['number'] . ' / ' . $prow['line1'] . ' / ' . $prow['city'], ENT_NOQUOTES);
}
}
} else {
if ($data_type == 13) {
$squads = acl_get_squads();
if ($squads) {
foreach ($squads as $key => $value) {
if ($currvalue == $key) {
$s .= htmlspecialchars($value[3], ENT_NOQUOTES);
}
}
}
} else {
if ($data_type == 14) {
$urow = sqlQuery("SELECT fname, lname, specialty FROM users " . "WHERE id = ?", array($currvalue));
$uname = $urow['lname'];
if ($urow['fname']) {
$uname .= ", " . $urow['fname'];
}
$s = htmlspecialchars($uname, ENT_NOQUOTES);
} else {
if ($data_type == 15) {
$s = htmlspecialchars($currvalue, ENT_NOQUOTES);
} else {
if ($data_type == 16) {
$insprovs = getInsuranceProviders();
foreach ($insprovs as $key => $ipname) {
if ($currvalue == $key) {
$s .= htmlspecialchars($ipname, ENT_NOQUOTES);
}
}
} else {
if ($data_type == 17) {
foreach ($ISSUE_TYPES as $key => $value) {
if ($currvalue == $key) {
$s .= htmlspecialchars($value[1], ENT_NOQUOTES);
}
}
} else {
if ($data_type == 18) {
$crow = sqlQuery("SELECT pc_catid, pc_catname " . "FROM openemr_postcalendar_categories WHERE pc_catid = ?", array($currvalue));
$s = htmlspecialchars($crow['pc_catname'], ENT_NOQUOTES);
} else {
if ($data_type == 21) {
$avalue = explode('|', $currvalue);
$lres = sqlStatement("SELECT * FROM list_options " . "WHERE list_id = ? ORDER BY seq, title", array($list_id));
$count = 0;
//.........这里部分代码省略.........
示例3: acl_get_squads
$sanitize_all_escapes = true;
//
//STOP FAKE REGISTER GLOBALS
$fake_register_globals = false;
//
require_once "../globals.php";
require_once "{$srcdir}/patient.inc";
require_once "{$srcdir}/acl.inc";
require_once "{$srcdir}/lists.inc";
require_once "{$srcdir}/calendar_events.inc.php";
// Temporary variable while new "propagation" logic is being tested.
// True means that missing days in the daily_fitness table default to
// the previous entry's values, if there is one.
// Otherwise the default fitness level (Fully Fit) is used (old logic).
$PROPLOGIC = true;
$squads = acl_get_squads();
$auth_notes_a = acl_check('encounters', 'notes_a');
$alertmsg = '';
// not used yet but maybe later
$form_date = fixDate($_POST['form_date'], date('Y-m-d'));
// Figure out the desired or default squad to select.
if (!empty($_POST['form_squad'])) {
$form_squad = $_POST['form_squad'];
$_SESSION['roster_squad'] = $form_squad;
} else {
if (!empty($_SESSION['roster_squad'])) {
$form_squad = $_SESSION['roster_squad'];
} else {
$form_squad = array_shift(array_keys($squads));
}
}
示例4: generate_display_field
function generate_display_field($frow, $currvalue) {
global $ISSUE_TYPES;
$data_type = $frow['data_type'];
$field_id = isset($frow['field_id']) ? $frow['field_id'] : null;
$list_id = $frow['list_id'];
$backup_list = isset($frow['list_backup_id']) ? $frow['list_backup_id'] : null;
$s = '';
// generic selection list or the generic selection list with add on the fly
// feature, or radio buttons
// Supports backup lists for datatypes 1,26,33
if ($data_type == 1 || $data_type == 26 || $data_type == 27 || $data_type == 33) {
$lrow = sqlQuery("SELECT title FROM list_options " .
"WHERE list_id = ? AND option_id = ? AND activity = 1", array($list_id,$currvalue) );
$s = htmlspecialchars(xl_list_label($lrow['title']),ENT_NOQUOTES);
//if there is no matching value in the corresponding lists check backup list
// only supported in data types 1,26,33
if ($lrow == 0 && !empty($backup_list) && ($data_type == 1 || $data_type == 26 || $data_type == 33)) {
$lrow = sqlQuery("SELECT title FROM list_options " .
"WHERE list_id = ? AND option_id = ? AND activity = 1", array($backup_list,$currvalue) );
$s = htmlspecialchars(xl_list_label($lrow['title']),ENT_NOQUOTES);
}
}
// simple text field
else if ($data_type == 2) {
$s = nl2br(htmlspecialchars($currvalue,ENT_NOQUOTES));
}
// long or multi-line text field
else if ($data_type == 3) {
$s = nl2br(htmlspecialchars($currvalue,ENT_NOQUOTES));
}
// date
else if ($data_type == 4) {
$asof = ''; //not used here, but set to prevent a php warning when call optionalAge
$s = '';
$agestr = optionalAge($frow, $currvalue, $asof);
if ($agestr) {
$s .= "<table cellpadding='0' cellspacing='0'><tr><td class='text'>";
}
if ($currvalue === '') {
$s .= ' ';
}
else {
$s .= text(oeFormatShortDate($currvalue));
}
// Optional display of age or gestational age.
if ($agestr) {
$s .= "</td></tr><tr><td class='text'>" . text($agestr) . "</td></tr></table>";
}
}
// provider
else if ($data_type == 10 || $data_type == 11) {
$urow = sqlQuery("SELECT fname, lname, specialty FROM users " .
"WHERE id = ?", array($currvalue) );
$s = htmlspecialchars(ucwords($urow['fname'] . " " . $urow['lname']),ENT_NOQUOTES);
}
// pharmacy list
else if ($data_type == 12) {
$pres = get_pharmacies();
while ($prow = sqlFetchArray($pres)) {
$key = $prow['id'];
if ($currvalue == $key) {
$s .= htmlspecialchars($prow['name'] . ' ' . $prow['area_code'] . '-' .
$prow['prefix'] . '-' . $prow['number'] . ' / ' .
$prow['line1'] . ' / ' . $prow['city'],ENT_NOQUOTES);
}
}
}
// squads
else if ($data_type == 13) {
$squads = acl_get_squads();
if ($squads) {
foreach ($squads as $key => $value) {
if ($currvalue == $key) {
$s .= htmlspecialchars($value[3],ENT_NOQUOTES);
}
}
}
}
// address book
else if ($data_type == 14) {
$urow = sqlQuery("SELECT fname, lname, specialty, organization FROM users " .
"WHERE id = ?", array($currvalue));
//ViSolve: To display the Organization Name if it exist. Else it will display the user name.
if($urow['organization'] !=""){
$uname = $urow['organization'];
}else{
$uname = $urow['lname'];
if ($urow['fname']) $uname .= ", " . $urow['fname'];
}
$s = htmlspecialchars($uname,ENT_NOQUOTES);
//.........这里部分代码省略.........