Пример #1
0
    // set headline
    if ($getItemId == $gCurrentUser->getValue('inv_id')) {
        $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE');
    } else {
        $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $inventory->getValue('FIRST_NAME'), $inventory->getValue('LAST_NAME'));
    }
    $gNavigation->addUrl(CURRENT_URL, $headline);
    // create html page object
    $page = new HtmlPage($headline);
    // add back link to module menu
    $profilePhotoMenu = $page->getMenu();
    $profilePhotoMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
    // show form
    $form = new HtmlForm('upload_files_form', $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=upload&inv_id=' . $getItemId, $page, array('enableFileUpload' => true));
    $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />');
    $form->addFileUpload('userfile', $gL10n->get('PRO_CHOOSE_PHOTO'), array('helpTextIdLabel' => 'profile_photo_up_help'));
    $form->addSubmitButton('btn_upload', $gL10n->get('PRO_UPLOAD_PHOTO'), array('icon' => THEME_PATH . '/icons/photo_upload.png', 'class' => ' col-sm-offset-3'));
    // add form to html page and show page
    $page->addHtml($form->show(false));
    $page->show();
} elseif ($getMode == 'upload') {
    /*****************************Foto zwischenspeichern bestaetigen***********************************/
    //Dateigroesse
    if ($_FILES['userfile']['error'][0] == 1) {
        $gMessage->show($gL10n->get('PRO_PHOTO_FILE_TO_LARGE', round(admFuncMaxUploadSize() / pow(1024, 2))));
    }
    //Kontrolle ob Fotos ausgewaehlt wurden
    if (file_exists($_FILES['userfile']['tmp_name'][0]) == false) {
        $gMessage->show($gL10n->get('PRO_PHOTO_NOT_CHOOSEN'));
    }
    //Dateiendung
    if ($getUserId == $gCurrentUser->getValue('usr_id')) {
        $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE');
    } else {
        $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $user->getValue('FIRST_NAME'), $user->getValue('LAST_NAME'));
    }
    $gNavigation->addUrl(CURRENT_URL, $headline);
    // create html page object
    $page = new HtmlPage($headline);
    // add back link to module menu
    // @ptabaden: Changed Back Icon
    $profilePhotoMenu = $page->getMenu();
    $profilePhotoMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), '<i class="fa fa-arrow-left" alt="' . $gL10n->get('SYS_BACK') . '" title="' . $gL10n->get('SYS_BACK') . '"></i><div class="iconDescription">' . $gL10n->get('SYS_BACK') . '</div>', '');
    // show form
    $form = new HtmlForm('upload_files_form', $g_root_path . '/adm_program/modules/profile/profile_photo_edit.php?mode=upload&amp;usr_id=' . $getUserId, $page, array('enableFileUpload' => true));
    $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="profile_photo_show.php?usr_id=' . $getUserId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />');
    $form->addFileUpload('foto_upload_file', $gL10n->get('PRO_CHOOSE_PHOTO'), array('allowedMimeTypes' => array('image/jpeg', 'image/png'), 'helpTextIdLabel' => 'profile_photo_up_help'));
    $form->addSubmitButton('btn_upload', $gL10n->get('PRO_UPLOAD_PHOTO'), array('icon' => THEME_PATH . '/icons/photo_upload.png', 'class' => ' col-sm-offset-3'));
    // add form to html page and show page
    $page->addHtml($form->show(false));
    $page->show();
} elseif ($getMode === 'upload') {
    /*****************************Foto zwischenspeichern bestaetigen***********************************/
    // File size
    if ($_FILES['userfile']['error'][0] == 1) {
        $gMessage->show($gL10n->get('PRO_PHOTO_FILE_TO_LARGE', round(admFuncMaxUploadSize() / pow(1024, 2))));
    }
    // Kontrolle ob Fotos ausgewaehlt wurden
    if (!file_exists($_FILES['userfile']['tmp_name'][0])) {
        $gMessage->show($gL10n->get('PRO_PHOTO_NOT_CHOOSEN'));
    }
    // File ending
Пример #3
0
    $form_values = $_SESSION['import_request'];
    unset($_SESSION['import_request']);
} else {
    $form_values['user_import_mode'] = 1;
    $form_values['import_coding'] = 'iso-8859-1';
    $form_values['import_role_id'] = 0;
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$importMenu = $page->getMenu();
$importMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('import_users_form', $g_root_path . '/adm_program/modules/members/import_function.php', $page, array('enableFileUpload' => true));
$form->addStaticControl('format', $gL10n->get('MEM_FORMAT'), 'CSV');
$form->addFileUpload('userfile', $gL10n->get('MEM_CHOOSE_FILE'), array('property' => FIELD_REQUIRED, 'allowedMimeTypes' => array('text/comma-separated-values')));
$selectBoxEntries = array('iso-8859-1' => $gL10n->get('SYS_ISO_8859_1'), 'utf-8' => $gL10n->get('SYS_UTF8'));
$form->addSelectBox('import_coding', $gL10n->get('MEM_CODING'), $selectBoxEntries, array('property' => FIELD_REQUIRED, 'defaultValue' => $form_values['import_coding']));
// add a selectbox to the form where the user can choose a role from all roles he could see
// first read all relevant roles from database and create an array with them
$condition = '';
if (!$gCurrentUser->manageRoles()) {
    // keine Rollen mit Rollenzuordnungsrecht anzeigen
    $condition .= ' AND rol_assign_roles = 0 ';
}
if (!$gCurrentUser->isWebmaster()) {
    // Webmasterrolle nicht anzeigen
    $condition .= ' AND rol_webmaster = 0 ';
}
$sql = 'SELECT * FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
         WHERE rol_valid   = 1
Пример #4
0
    $form_values = $_SESSION['import_request'];
    unset($_SESSION['import_request']);
} else {
    $form_values['user_import_mode'] = 1;
    $form_values['import_coding'] = 'iso-8859-1';
    $form_values['import_role_id'] = 0;
}
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$importMenu = $page->getMenu();
$importMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('import_users_form', $g_root_path . '/adm_program/modules/members/import_function.php', $page, array('enableFileUpload' => true));
$form->addStaticControl('format', $gL10n->get('MEM_FORMAT'), 'CSV');
$form->addFileUpload('userfile', $gL10n->get('MEM_CHOOSE_FILE'), array('property' => FIELD_REQUIRED));
$selectBoxEntries = array('iso-8859-1' => $gL10n->get('SYS_ISO_8859_1'), 'utf-8' => $gL10n->get('SYS_UTF8'));
$form->addSelectBox('import_coding', $gL10n->get('MEM_CODING'), $selectBoxEntries, array('property' => FIELD_REQUIRED, 'defaultValue' => $form_values['import_coding']));
// add a selectbox to the form where the user can choose a role from all roles he could see
// first read all relevant roles from database and create an array with them
$condition = '';
if ($gCurrentUser->manageRoles() == false) {
    // keine Rollen mit Rollenzuordnungsrecht anzeigen
    $condition .= ' AND rol_assign_roles = 0 ';
}
if ($gCurrentUser->isWebmaster() == false) {
    // Webmasterrolle nicht anzeigen
    $condition .= ' AND rol_webmaster = 0 ';
}
$sql = 'SELECT * FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
         WHERE rol_valid   = 1
Пример #5
0
     $form->addInput('mailfrom', $gL10n->get('MAI_YOUR_EMAIL'), $form_values['mailfrom'], array('maxLength' => 50, 'property' => FIELD_REQUIRED));
 }
 // show option to send a copy to your email address only for registered users because of spam abuse
 if ($gValidLogin) {
     $form->addCheckbox('carbon_copy', $gL10n->get('MAI_SEND_COPY'), $form_values['carbon_copy']);
 }
 // if preference is set then show a checkbox where the user can request a delivery confirmation for the email
 if ($gCurrentUser->getValue('usr_id') > 0 && $gPreferences['mail_delivery_confirmation'] == 2 || $gPreferences['mail_delivery_confirmation'] == 1) {
     $form->addCheckbox('delivery_confirmation', $gL10n->get('MAI_DELIVERY_CONFIRMATION'), $form_values['delivery_confirmation']);
 }
 $form->closeGroupBox();
 $form->openGroupBox('gb_mail_message', $gL10n->get('SYS_MESSAGE'));
 $form->addInput('subject', $gL10n->get('MAI_SUBJECT'), $form_values['subject'], array('maxLength' => 77, 'property' => FIELD_REQUIRED));
 // Nur eingeloggte User duerfen Attachments anhaengen...
 if ($gValidLogin && $gPreferences['max_email_attachment_size'] > 0 && ini_get('file_uploads') == '1') {
     $form->addFileUpload('btn_add_attachment', $gL10n->get('MAI_ATTACHEMENT'), array('enableMultiUploads' => true, 'multiUploadLabel' => $gL10n->get('MAI_ADD_ATTACHEMENT'), 'hideUploadField' => true, 'helpTextIdLabel' => array('MAI_MAX_ATTACHMENT_SIZE', Email::getMaxAttachementSize('mb'))));
 }
 // add textfield or ckeditor to form
 if ($gValidLogin == true && $gPreferences['mail_html_registered_users'] == 1) {
     $form->addEditor('msg_body', null, $form_values['msg_body'], array('property' => FIELD_REQUIRED));
 } else {
     $form->addMultilineTextInput('msg_body', $gL10n->get('SYS_TEXT'), null, 10, array('property' => FIELD_REQUIRED));
 }
 $form->closeGroupBox();
 // if captchas are enabled then visitors of the website must resolve this
 if (!$gValidLogin && $gPreferences['enable_mail_captcha'] == 1) {
     $form->openGroupBox('gb_confirmation_of_input', $gL10n->get('SYS_CONFIRMATION_OF_INPUT'));
     $form->addCaptcha('captcha', $gPreferences['captcha_type']);
     $form->closeGroupBox();
 }
 $form->addSubmitButton('btn_send', $gL10n->get('SYS_SEND'), array('icon' => THEME_PATH . '/icons/email.png'));
Пример #6
0
    $gMessage->show($gL10n->get('SYS_SERVER_NO_UPLOAD'));
}
$gNavigation->addUrl(CURRENT_URL, $headline);
if (isset($_SESSION['download_request'])) {
    $form_values = strStripSlashesDeep($_SESSION['download_request']);
    unset($_SESSION['download_request']);
} else {
    $form_values['new_name'] = null;
    $form_values['new_description'] = null;
}
try {
    // get recordset of current folder from databse
    $folder = new TableFolder($gDb);
    $folder->getFolderForDownload($getFolderId);
} catch (AdmException $e) {
    $e->showHtml();
}
$parentFolderName = $folder->getValue('fol_name');
// create html page object
$page = new HtmlPage($headline);
// add back link to module menu
$downloadUploadMenu = $page->getMenu();
$downloadUploadMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
$page->addHtml('<p class="lead">' . $gL10n->get('DOW_UPLOAD_TO_FOLDER', $parentFolderName) . '</p>');
// show form
$form = new HtmlForm('upload_files_form', $g_root_path . '/adm_program/modules/downloads/download_function.php?mode=1&amp;folder_id=' . $getFolderId, $page, array('enableFileUpload' => true));
$form->addFileUpload('add_files', $gL10n->get('DOW_CHOOSE_FILE'), array('enableMultiUploads' => true, 'multiUploadLabel' => $gL10n->get('DOW_UPLOAD_ANOTHER_FILE')));
$form->addSubmitButton('btn_upload', $gL10n->get('SYS_UPLOAD'), array('icon' => THEME_PATH . '/icons/page_white_upload.png', 'class' => ' col-sm-offset-3'));
// add form to html page and show page
$page->addHtml($form->show(false));
$page->show();