本文整理汇总了PHP中acl_check函数的典型用法代码示例。如果您正苦于以下问题:PHP acl_check函数的具体用法?PHP acl_check怎么用?PHP acl_check使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了acl_check函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: recurse_pages
function recurse_pages($pages, $spaces = 0, $layoutsBlocks = [], $pageWidgets = [], $pagesWidgets = [])
{
$data = '';
foreach ($pages as $page) {
// Блок
$currentBlock = array_get($pageWidgets, $page['id'] . '.0');
$currentPosition = array_get($pageWidgets, $page['id'] . '.1');
$data .= '<tr data-id="' . $page['id'] . '" data-parent-id="' . $page['parent_id'] . '">';
$data .= '<td>';
if (!empty($page['childs'])) {
$data .= '<div class="input-group">';
}
$data .= Form::select('blocks[' . $page['id'] . '][block]', [], $currentBlock, ['class' => 'widget-blocks form-control', 'data-layout' => $page['layout_file'], 'data-value' => $currentBlock]);
if (!empty($page['childs'])) {
$data .= "<div class=\"input-group-btn\">" . Form::button(NULL, ['data-icon' => 'level-down', 'class' => 'set_to_inner_pages btn btn-warning', 'title' => trans('widgets::core.button.select_childs')]) . '</div></div>';
}
$data .= '</td><td>';
$data .= Form::text('blocks[' . $page['id'] . '][position]', (int) $currentPosition, ['maxlength' => 4, 'size' => 4, 'class' => 'form-control text-right widget-position']);
$data .= '</td><td></td>';
if (acl_check('page::edit')) {
$data .= '<th>' . str_repeat("- ", $spaces) . link_to_route('backend.page.edit', $page['title'], [$page['id']]) . '</th>';
} else {
$data .= '<th>' . str_repeat("- ", $spaces) . $page['title'] . '</th>';
}
$data .= '</tr>';
if (!empty($page['childs'])) {
$data .= recurse_pages($page['childs'], $spaces + 5, $layoutsBlocks, $pageWidgets, $pagesWidgets);
}
}
return $data;
}
示例2: reorder
/**
* @param PagePartRepository $repository
*/
public function reorder(PagePartRepository $repository)
{
if (!acl_check('part::reorder')) {
return;
}
$ids = $this->getParameter('ids', []);
$repository->reorder($ids);
}
示例3: reorder
public function reorder()
{
if (!acl_check('parts.reorder')) {
return;
}
$ids = $this->getParameter('ids', []);
$part = new PagePart();
$part->reorder($ids);
}
示例4: changeStatus
/**
* @throws PluginContainerException
*/
public function changeStatus()
{
if (!acl_check('plugins::change_status')) {
throw new PermissionException('plugins::change_status');
}
$name = $this->getRequiredParameter('name');
$removeTable = $this->getParameter('remove_data');
if (is_null($plugin = PluginLoader::getPluginContainer($name))) {
throw new PluginContainerException("Plugin [{$name}] not found");
}
if (PluginLoader::isActivated($name)) {
PluginLoader::deactivatePlugin($name, (bool) $removeTable);
} else {
PluginLoader::activatePlugin($name);
}
$this->setContent($plugin);
}
示例5: addPage
/**
* @param ItemDecorator $page
* @param integer $priority
* @return $this
*/
public function addPage(ItemDecorator &$page, $priority = 1)
{
$priority = (int) $priority;
if (!acl_check($page->getPermissions())) {
return $this;
}
if (isset($page->priority)) {
$priority = (int) $page->priority;
}
if ($page instanceof Section) {
$this->sections[] = $page;
$page->setSection($this);
} else {
if (isset($this->pages[$priority])) {
while (isset($this->pages[$priority])) {
$priority++;
}
}
$this->pages[$priority] = $page;
}
$page->setSection($this);
return $this->update()->sort();
}
示例6: lab_results_messages
function lab_results_messages($set_pid, $rid, $provider_id = "")
{
if ($provider_id != "") {
$where = "AND id = '" . $provider_id . "'";
}
// Get all active users.
$rez = sqlStatement("select id, username from users where username != '' AND active = '1' {$where}");
for ($iter = 0; $row = sqlFetchArray($rez); $iter++) {
$result[$iter] = $row;
}
if (!empty($result)) {
foreach ($result as $user_detail) {
unset($thisauth);
// Make sure it is empty.
// Check user authorization. Only send the panding review message to authorised user.
// $thisauth = acl_check('patients', 'sign', $user_detail['username']);
// Route message to administrators if there is no provider match.
if ($provider_id == "") {
$thisauth = acl_check('admin', 'super', $user_detail['username']);
} else {
$thisauth = true;
}
if ($thisauth) {
// Send lab result message to the ordering provider when there is a new lab report.
$userauthorized = formData("userauthorized");
$pname = getPatientName($set_pid);
$link = "<a href='../../orders/orders_results.php?review=1&set_pid={$set_pid}'" . " onclick='return top.restoreSession()'>here</a>";
$note = "Patient {$pname}'s lab results have arrived. Please click {$link} to review them.<br/>";
$note_type = "Lab Results";
$message_status = "New";
// Add pnote.
$noteid = addPnote($set_pid, $note, $userauthorized, '1', $note_type, $user_detail['username']);
sqlQ("update pnotes set message_status='" . $message_status . "' where id = '{$noteid}'");
}
}
}
}
示例7: formatcyp
echo formatcyp($rowresult);
?>
</td>
</tr>
<?php
}
// End not csv export
}
// end details
$producttotal += $rowresult;
$grandtotal += $rowresult;
$productqty += $qty;
$grandqty += $qty;
}
// end function
if (!acl_check('acct', 'rep')) {
die(xl("Unauthorized access."));
}
$form_from_date = fixDate($_POST['form_from_date'], date('Y-m-d'));
$form_to_date = fixDate($_POST['form_to_date'], date('Y-m-d'));
$form_facility = $_POST['form_facility'];
if ($_POST['form_csvexport']) {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=ippf_cyp_report.csv");
header("Content-Description: File Transfer");
// CSV headers:
if ($_POST['form_details']) {
echo '"Item",';
示例8: dropdown_facility
:
</td>
<td>
<?php
dropdown_facility(strip_escape_custom($form_facility), 'form_facility');
?>
</td>
<td class='label'>
<?php
xl('Provider', 'e');
?>
:
</td>
<td>
<?php
if (acl_check('acct', 'rep_a')) {
// Build a drop-down list of providers.
//
$query = "select id, lname, fname from users where " . "authorized = 1 order by lname, fname";
$res = sqlStatement($query);
echo " <select name='form_doctor'>\n";
echo " <option value=''>-- " . xl('All Providers', 'e') . " --\n";
while ($row = sqlFetchArray($res)) {
$provid = $row['id'];
echo " <option value='{$provid}'";
if ($provid == $_POST['form_doctor']) {
echo " selected";
}
echo ">" . $row['lname'] . ", " . $row['fname'] . "\n";
}
echo " </select>\n";
示例9: acl_get_sensitivities
<tr>
<?php
$sensitivities = acl_get_sensitivities();
if ($sensitivities && count($sensitivities)) {
usort($sensitivities, "sensitivity_compare");
?>
<td class='bold' nowrap><?php
echo xlt('Sensitivity:');
?>
</td>
<td class='text'>
<select name='form_sensitivity'>
<?php
foreach ($sensitivities as $value) {
// Omit sensitivities to which this user does not have access.
if (acl_check('sensitivities', $value[1])) {
echo " <option value='" . attr($value[1]) . "'";
if ($viewmode && $result['sensitivity'] == $value[1]) {
echo " selected";
}
echo ">" . xlt($value[3]) . "</option>\n";
}
}
echo " <option value=''";
if ($viewmode && !$result['sensitivity']) {
echo " selected";
}
echo ">" . xlt('None') . "</option>\n";
?>
</select>
</td>
示例10: xl
echo $row['abook_type'];
?>
");
});
</script>
<form method='post' name='theform' action='addrbook_edit.php?userid=<?php
echo $userid;
?>
'>
<center>
<table border='0' width='100%'>
<?php
if (acl_check('admin', 'practice')) {
// allow choose type option if have admin access
?>
<tr>
<td width='1%' nowrap><b><?php
xl('Type', 'e');
?>
:</b></td>
<td>
<?php
echo generate_select_list('form_abook_type', 'abook_type', $row['abook_type'], '', 'Unassigned', '', 'typeSelect(this.value)');
?>
</td>
</tr>
<?php
}
示例11: attr
$esign = $esignApi->createFormESign($iter['id'], $formdir, $encounter);
echo "<tr>";
echo "<td style='border-bottom:1px solid'>";
// a link to edit the form
echo "<div class='form_header_controls'>";
// If the form is locked, it is no longer editable
if ($esign->isLocked()) {
echo "<a href=# class='css_button_small form-edit-button-locked' id='form-edit-button-" . attr($formdir) . "-" . attr($iter['id']) . "'><span>" . xlt('Locked') . "</span></a>";
} else {
echo "<a class='css_button_small form-edit-button' id='form-edit-button-" . attr($formdir) . "-" . attr($iter['id']) . "' target='" . "_parent" . "' href='{$rootdir}/patient_file/encounter/view_form.php?" . "formname=" . attr($formdir) . "&id=" . attr($iter['form_id']) . "' onclick='top.restoreSession()'>";
echo "<span>" . xlt('Edit') . "</span></a>";
}
if ($esign->isButtonViewable()) {
echo $esign->buttonHtml();
}
if (acl_check('admin', 'super')) {
if ($formdir != 'newpatient') {
// a link to delete the form from the encounter
echo "<a target='_parent'" . " href='{$rootdir}/patient_file/encounter/delete_form.php?" . "formname=" . $formdir . "&id=" . $iter['id'] . "&encounter=" . $encounter . "&pid=" . $pid . "' class='css_button_small' title='" . xl('Delete this form') . "' onclick='top.restoreSession()'><span>" . xl('Delete') . "</span></a>";
} else {
?>
<a href='javascript:;' class='css_button_small' style='color:gray'><span><?php
xl('Delete', 'e');
?>
</span></a><?php
}
}
echo "<div class='form_header'>";
// Figure out the correct author (encounter authors are the '$providerNameRes', while other
// form authors are the '$user['fname'] . " " . $user['lname']').
if ($formdir == 'newpatient') {
示例12: xl
xl('Invoice Refno Pool', 'e');
?>
: </td>
<td class='text'>
<?php
echo generate_select_list('irnpool', 'irnpool', '', xl('Invoice reference number pool, if used'));
?>
</td>
</tr>
<?php
}
?>
<?php
// List the access control groups if phpgacl installed
if (isset($phpgacl_location) && acl_check('admin', 'acl')) {
?>
<tr>
<td class='text'><?php
xl('Access Control', 'e');
?>
:</td>
<td><select name="access_group[]" multiple style="width:120px;">
<?php
$list_acl_groups = acl_get_group_title_list();
$default_acl_group = 'Administrators';
foreach ($list_acl_groups as $value) {
if ($default_acl_group == $value) {
// Modified 6-2009 by BM - Translate group name if applicable
echo " <option value='{$value}' selected>" . xl_gacl_group($value) . "</option>\n";
} else {
示例13: header
* @author Karl Englund <karl@mastermobileproducts.com>
* @link http://www.open-emr.org
*/
header("Content-Type:text/xml");
$ignoreAuth = true;
require_once 'classes.php';
$p_id = $_REQUEST['patientID'];
$token = $_REQUEST['token'];
$xml_array = array();
if ($userId = validateToken($token)) {
$user_data = getUserData($userId);
$user = $user_data['user'];
$emr = $user_data['emr'];
$username = $user_data['username'];
$password = $user_data['password'];
$acl_allow = acl_check('patientportal', 'portal', $username);
if ($acl_allow) {
$patient = getPatientData($p_id);
$xml_array['status'] = 0;
$xml_array['reason'] = "Success patient processing record";
if ($patient) {
$xml_array['Patient']['demographics'] = $patient;
$ethencity_query = "SELECT option_id, title FROM list_options WHERE list_id = 'ethnicity' AND `option_id` = ?";
$patientData = $patient["ethnicity"];
$ethencity_result = sqlQuery($ethencity_query, array($patientData));
if ($ethencity_result) {
$xml_array['Patient']['demographics']['ethnicityvalue'] = $ethencity_result['title'];
} else {
$xml_array['Patient']['demographics']['ethnicityvalue'] = '';
}
$p_insurance = getInsuranceData($p_id);
示例14: echoProdLine
function echoProdLine($lino, $drug_id, $del = FALSE, $units = NULL, $fee = NULL, $sale_id = 0, $billed = FALSE)
{
global $code_types, $ndc_applies, $pid, $usbillstyle, $hasCharges;
$drow = sqlQuery("SELECT name FROM drugs WHERE drug_id = ?", array($drug_id));
$code_text = $drow['name'];
$fee = sprintf('%01.2f', $fee);
if (empty($units)) {
$units = 1;
}
$units = max(1, intval($units));
// We put unit price on the screen, not the total line item fee.
$price = $fee / $units;
$strike1 = $sale_id && $del ? "<strike>" : "";
$strike2 = $sale_id && $del ? "</strike>" : "";
echo " <tr>\n";
echo " <td class='billcell'>{$strike1}" . xlt("Product") . "{$strike2}";
echo "<input type='hidden' name='prod[" . attr($lino) . "][sale_id]' value='" . attr($sale_id) . "'>";
echo "<input type='hidden' name='prod[" . attr($lino) . "][drug_id]' value='" . attr($drug_id) . "'>";
echo "<input type='hidden' name='prod[" . attr($lino) . "][billed]' value='" . attr($billed) . "'>";
echo "</td>\n";
echo " <td class='billcell'>{$strike1}" . text($drug_id) . "{$strike2}</td>\n";
if (modifiers_are_used(true)) {
echo " <td class='billcell'> </td>\n";
}
if ($billed) {
if (fees_are_used()) {
echo " <td class='billcell' align='right'>" . text(oeFormatMoney($price)) . "</td>\n";
echo " <td class='billcell' align='center'>" . text($units) . "</td>\n";
}
if (justifiers_are_used()) {
echo " <td class='billcell' align='center'{$usbillstyle}> </td>\n";
// justify
}
echo " <td class='billcell' align='center'> </td>\n";
// provider
echo " <td class='billcell' align='center'{$usbillstyle}> </td>\n";
// note codes
echo " <td class='billcell' align='center'{$usbillstyle}> </td>\n";
// auth
echo " <td class='billcell' align='center'><input type='checkbox'" . " disabled /></td>\n";
} else {
if (fees_are_used()) {
echo " <td class='billcell' align='right'>" . "<input type='text' name='prod[" . attr($lino) . "][price]' " . "value='" . attr($price) . "' size='6'";
if (acl_check('acct', 'disc')) {
echo " style='text-align:right'";
} else {
echo " style='text-align:right;background-color:transparent' readonly";
}
echo "></td>\n";
echo " <td class='billcell' align='center'>";
echo "<input type='text' name='prod[" . attr($lino) . "][units]' " . "value='" . attr($units) . "' size='2' style='text-align:right'>";
echo "</td>\n";
}
if (justifiers_are_used()) {
echo " <td class='billcell'{$usbillstyle}> </td>\n";
// justify
}
echo " <td class='billcell' align='center'> </td>\n";
// provider
echo " <td class='billcell' align='center'{$usbillstyle}> </td>\n";
// note codes
echo " <td class='billcell' align='center'{$usbillstyle}> </td>\n";
// auth
echo " <td class='billcell' align='center'><input type='checkbox' name='prod[" . attr($lino) . "][del]' " . "value='1'" . ($del ? " checked" : "") . " /></td>\n";
}
echo " <td class='billcell'>{$strike1}" . text($code_text) . "{$strike2}</td>\n";
echo " </tr>\n";
if ($fee != 0) {
$hasCharges = true;
}
}
示例15: generate_receipt
//.........这里部分代码省略.........
die($sl_err);
}
if (!$chart_id_cash) {
die("There is no COA entry for cash account '{$sl_cash_acc}'");
}
//
// Request all cash entries belonging to the invoice.
$atres = SLQuery("SELECT * FROM acc_trans WHERE " . "trans_id = {$trans_id} AND chart_id = {$chart_id_cash} ORDER BY transdate");
if ($sl_err) {
die($sl_err);
}
//
for ($irow = 0; $irow < SLRowCount($atres); ++$irow) {
$row = SLGetRow($atres, $irow);
$amount = sprintf('%01.2f', $row['amount']);
// negative
$charges += $amount;
$rowsource = $row['source'];
if (strtolower($rowsource) == 'co-pay') {
$rowsource = '';
}
receiptPaymentLine($row['transdate'], 0 - $amount, $rowsource);
}
}
// end not $INTEGRATED_AR
?>
<tr>
<td colspan='5'> </td>
</tr>
<tr>
<td> </td>
<td><b><?php
echo xlt('Balance Due');
?>
</b></td>
<td colspan='2'> </td>
<td align='right'><?php
echo text(oeFormatMoney($charges, true));
?>
</td>
</tr>
</table>
</center>
<div id='hideonprint'>
<p>
<a href='#' onclick='return printme();'><?php
echo xlt('Print');
?>
</a>
<?php
if (acl_check('acct', 'disc')) {
?>
<a href='#' onclick='return deleteme();'><?php
echo xlt('Undo Checkout');
?>
</a>
<?php
}
?>
<?php
if ($details) {
?>
<a href='pos_checkout.php?details=0&ptid=<?php
echo attr($patient_id);
?>
&enc=<?php
echo attr($encounter);
?>
'><?php
echo xlt('Hide Details');
?>
</a>
<?php
} else {
?>
<a href='pos_checkout.php?details=1&ptid=<?php
echo attr($patient_id);
?>
&enc=<?php
echo attr($encounter);
?>
'><?php
echo xlt('Show Details');
?>
</a>
<?php
}
?>
</p>
</div>
</body>
</html>
<?php
if (!$INTEGRATED_AR) {
SLClose();
}
}