示例#1
0
            $columnValues[] = $columnHeader;
        }
    }
}
// End-For
if ($getMode === 'csv') {
    $str_csv = $str_csv . "\n";
} elseif ($getMode === 'html' || $getMode === 'print') {
    $table->setColumnAlignByArray($columnAlign);
    $table->addRowHeadingByArray($columnValues);
} elseif ($getMode === 'pdf') {
    $table->setColumnAlignByArray($columnAlign);
    $table->addTableHeader();
    $table->addRow();
    $table->addAttribute('align', 'center');
    $table->addColumn($headline, array('colspan' => count($arrValidColumns)));
    $table->addRow();
    // Write valid column headings
    for ($column = 0; $column < count($arrValidColumns); ++$column) {
        $table->addColumn($arrValidColumns[$column], array('style' => 'text-align: ' . $columnAlign[$column] . ';font-size:14;background-color:#C7C7C7;'), 'th');
    }
} else {
    $table->addTableBody();
}
$lastGroupHead = -1;
// Mark for change between leader and member
$listRowNumber = 1;
foreach ($membersList as $member) {
    if ($getMode !== 'csv') {
        // in print preview and pdf we group the role leaders and the members and
        // add a specific header for them
示例#2
0
$categoryId = 0;
$userField = new TableUserField($gDb);
// Intialize variables
$description = '';
$hidden = '';
$disable = '';
$mandatory = '';
$usfSystem = '';
while ($row = $statement->fetch()) {
    $userField->clear();
    $userField->setArray($row);
    if ($categoryId != $userField->getValue('cat_id')) {
        $block_id = 'admCategory' . $userField->getValue('usf_cat_id');
        $table->addTableBody();
        $table->addRow('', array('class' => 'admidio-group-heading'));
        $table->addColumn('<span id="caret_' . $block_id . '" class="caret"></span>' . $userField->getValue('cat_name'), array('id' => 'group_' . $block_id, 'colspan' => '8'), 'td');
        $table->addTableBody('id', $block_id);
        $categoryId = $userField->getValue('usf_cat_id');
    }
    // cut long text strings and provide tooltip
    if (strlen($userField->getValue('usf_description')) > 22) {
        $description = substr($userField->getValue('usf_description', 'database'), 0, 22) . '
            <a data-toggle="modal" data-target="#admidio_modal"
                href="' . $g_root_path . '/adm_program/system/msg_window.php?message_id=user_field_description&amp;message_var1=' . $userField->getValue('usf_name_intern') . '&amp;inline=true"><span  data-html="true" data-toggle="tooltip" data-original-title="' . str_replace('"', '\'', $userField->getValue('usf_description')) . '">[..]</span></a>';
    } elseif ($userField->getValue('usf_description') === '') {
        $description = '&nbsp;';
    } else {
        $description = $userField->getValue('usf_description');
    }
    if ($userField->getValue('usf_hidden') == 1) {
        $hidden = '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/eye_gray.png" alt="' . $gL10n->get('ORG_FIELD_HIDDEN') . '" title="' . $gL10n->get('ORG_FIELD_HIDDEN') . '" />';
示例#3
0
    } else {
        $usf_id = 0;
        $columnHeader = $arr_col_name[$column->getValue('lsc_special_field')];
        $columnAlign[] = 'left';
    }
    // show hidden fields only for user with rights
    if ($usf_id == 0 || $gCurrentUser->editUsers() || $gProfileFields->getPropertyById($usf_id, 'usf_hidden') == 0) {
        if ($getMode === 'csv') {
            if ($columnNumber == 1) {
                // add serial
                $str_csv = $str_csv . $valueQuotes . $gL10n->get('SYS_ABR_NO') . $valueQuotes;
            }
            $str_csv = $str_csv . $separator . $valueQuotes . $columnHeader . $valueQuotes;
        } elseif ($getMode === 'pdf') {
            if ($columnNumber == 1) {
                $table->addColumn($gL10n->get('SYS_ABR_NO'), array('style' => 'text-align: ' . $columnAlign[$columnNumber - 1] . ';font-size:14;background-color:#C7C7C7;'), 'th');
            }
            $table->addColumn($columnHeader, array('style' => 'text-align: ' . $columnAlign[$columnNumber - 1] . ';font-size:14;background-color:#C7C7C7;'), 'th');
        } elseif ($getMode === 'html' || $getMode === 'print') {
            $columnValues[] = $columnHeader;
        }
    }
}
// End-For
if ($getMode === 'csv') {
    $str_csv = $str_csv . "\n";
} elseif ($getMode === 'html' || $getMode === 'print') {
    $table->setColumnAlignByArray($columnAlign);
    $table->addRowHeadingByArray($columnValues);
} else {
    $table->addTableBody();
示例#4
0
 }
 // if user is flagged as leader than check the ckeckbox ;)
 if ($row['mem_leader'] > 0) {
     $leaderChecked = ' checked="checked" ';
 }
 // the leader of webmaster role can only be set by a webmaster
 if ($role->getValue('rol_webmaster') == 1 && !$gCurrentUser->isWebmaster()) {
     $leaderDisabled = ' disabled="disabled" ';
 }
 $columnValues = array('<input type="checkbox" id="role-' . $role->getValue('rol_id') . '" name="role-' . $role->getValue('rol_id') . '" ' . $memberChecked . $memberDisabled . ' onclick="javascript:profileJS.unMarkLeader(this);" value="1" />', '<label for="role-' . $role->getValue('rol_id') . '">' . $role->getValue('rol_name') . '</label>', $role->getValue('rol_description'));
 // if new category than display a category header
 if ($category != $role->getValue('cat_id')) {
     $block_id = 'admCategory' . $role->getValue('cat_id');
     $table->addTableBody();
     $table->addRow('', array('class' => 'admidio-group-heading', 'id' => 'group_' . $block_id));
     $table->addColumn();
     $table->addAttribute('colspan', '4', 'td');
     $table->addData('<span id="caret_' . $block_id . '" class="caret"></span>' . $role->getValue('cat_name'));
     $table->addTableBody('id', $block_id);
     $category = $role->getValue('cat_id');
 }
 $leaderRights = '<input type="checkbox" id="leader-' . $role->getValue('rol_id') . '" name="leader-' . $role->getValue('rol_id') . '" ' . $leaderChecked . $leaderDisabled . ' onclick="javascript:profileJS.markLeader(this);" value="1" />';
 // show icon that leaders have no additional rights
 if ($role->getValue('rol_leader_rights') == ROLE_LEADER_NO_RIGHTS) {
     $leaderRights .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/info.png"
                          alt="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" title="' . $gL10n->get('ROL_LEADER_NO_ADDITIONAL_RIGHTS') . '" />
                              <img class="admidio-icon-link" src="' . THEME_PATH . '/icons/dummy.png" alt="dummy" />';
 }
 // show icon with edit user right if leader has this right
 if ($role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_EDIT || $role->getValue('rol_leader_rights') == ROLE_LEADER_MEMBERS_ASSIGN_EDIT) {
     $leaderRights .= '<img class="admidio-icon-info" src="' . THEME_PATH . '/icons/profile_edit.png"
示例#5
0
$categoryId = 0;
$userField = new TableUserField($gDb);
// Intialize variables
$description = '';
$hidden = '';
$disable = '';
$mandatory = '';
$usfSystem = '';
while ($row = $statement->fetch()) {
    $userField->clear();
    $userField->setArray($row);
    if ($categoryId != $userField->getValue('cat_id')) {
        $block_id = 'admCategory' . $userField->getValue('inf_cat_id');
        $table->addTableBody();
        $table->addRow();
        $table->addColumn('', array('class' => 'admidio-group-heading', 'id' => 'group_' . $block_id), 'td');
        $table->addAttribute('colspan', '8');
        $table->addData('<span id="caret_' . $block_id . '" class="caret"></span>' . $userField->getValue('cat_name'));
        $table->addTableBody('id', $block_id);
        $categoryId = $userField->getValue('inf_cat_id');
    }
    // cut long text strings and provide tooltip
    if (strlen($userField->getValue('inf_description')) > 22) {
        $description = substr($userField->getValue('inf_description', 'database'), 0, 22) . '
            <a class="colorbox-dialog" data-html="true" data-toggle="tooltip" data-original-title="' . str_replace('"', '\'', $userField->getValue('inf_description')) . '" href="' . $g_root_path . '/adm_program/system/msg_window.php?message_id=user_field_description&amp;message_var1=' . $userField->getValue('inf_name_intern') . '&amp;inline=true">[..]</a>';
    } elseif (strlen($userField->getValue('inf_description') == 0)) {
        $description = '&nbsp;';
    } else {
        $description = $userField->getValue('inf_description');
    }
    if ($userField->getValue('inf_hidden') == 1) {