예제 #1
0
        } 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);
} 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
예제 #2
0
파일: roles.php 프로젝트: sistlind/admidio
 // 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"
                          alt="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" title="' . $gL10n->get('ROL_LEADER_EDIT_MEMBERS') . '" />';
예제 #3
0
파일: fields.php 프로젝트: sistlind/admidio
$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) {
        $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') . '" />';
예제 #4
0
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     // set auto page breaks
     $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
     $pdf->SetMargins(10, 20, 10);
     $pdf->SetHeaderMargin(10);
     $pdf->SetFooterMargin(0);
     // headline for PDF
     $pdf->SetHeaderData('', '', $headline, '');
     // set font
     $pdf->SetFont('times', '', 10);
     // add a page
     $pdf->AddPage();
     // Create table object for display
     $table = new HtmlTable('adm_lists_table', $pdf, $hoverRows, $datatable, $classTable);
     $table->addAttribute('border', '1');
     $table->addTableHeader();
     $table->addRow();
     $table->addAttribute('align', 'center');
     $table->addColumn($headline, array('colspan' => $list->countColumns() + 1));
     $table->addRow();
 } elseif ($getMode === 'html') {
     $datatable = true;
     $hoverRows = true;
     // create html page object
     $page = new HtmlPage();
     if ($getFullScreen == true) {
         $page->hideThemeHtml();
     }
     $page->setTitle($title);
     $page->setHeadline($headline);
예제 #5
0
파일: messages.php 프로젝트: bash-t/admidio
    $EmailMenu->addItem('admMenuItemNewEmail', $g_root_path . '/adm_program/modules/messages/messages_write.php', $gL10n->get('MAI_SEND_EMAIL'), '/email.png');
}
// link to write new PM
if ($gPreferences['enable_pm_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewPm', $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_type=PM', $gL10n->get('PMS_SEND_PM'), '/pm.png');
}
// link to Chat
if ($gPreferences['enable_chat_module'] == 1) {
    $EmailMenu->addItem('admMenuItemNewChat', $g_root_path . '/adm_program/modules/messages/messages_chat.php', $gL10n->get('MSG_CHAT'), '/chat.png');
}
if ($gCurrentUser->isWebmaster()) {
    $EmailMenu->addItem('admMenuItemPreferences', $g_root_path . '/adm_program/modules/preferences/preferences.php?show_option=messages', $gL10n->get('SYS_MODULE_PREFERENCES'), 'options.png', 'right');
}
$table = new HtmlTable('adm_lists_table', $page, true, true);
$table->setColumnAlignByArray(array('left', 'left', 'left', 'left', 'right'));
$table->addAttribute('border', '0');
$table->addTableHeader();
$table->addRowHeadingByArray(array($gL10n->get('SYS_CATEGORY'), $gL10n->get('MAI_SUBJECT'), $gL10n->get('MSG_OPPOSITE'), $gL10n->get('SYS_DATE'), $gL10n->get('SYS_FEATURES')));
$key = 0;
$part1 = '<a class="admidio-icon-link" data-toggle="modal" data-target="#admidio_modal" href="' . $g_root_path . '/adm_program/system/popup_message.php?type=msg&amp;element_id=row_message_';
$part2 = '"><img src="' . THEME_PATH . '/icons/delete.png" alt="' . $gL10n->get('MSG_REMOVE') . '" title="' . $gL10n->get('MSG_REMOVE') . '" /></a>';
$href = 'href="' . $g_root_path . '/adm_program/modules/messages/messages_write.php?msg_id=';
// open some additonal functions for messages
$modulemessages = new ModuleMessages();
//find all own Email messages
$result = $modulemessages->msgGetUserEmails($gCurrentUser->getValue('usr_id'));
if (isset($result)) {
    while ($row = $gDb->fetch_array($result)) {
        $ReceiverName = "";
        if (strpos($row['user'], '|') == true) {
            $reciversplit = explode('|', $row['user']);