本文整理汇总了PHP中ilUtil::formCheckbox方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::formCheckbox方法的具体用法?PHP ilUtil::formCheckbox怎么用?PHP ilUtil::formCheckbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::formCheckbox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fillRow
/**
* Fill a table row.
*
* This method is called internally by ilias to
* fill a table row according to the row template.
*
* @param stdClass $item
*/
protected function fillRow(stdClass $item)
{
/* Configure template rendering. */
$this->tpl->setVariable('VAL_CHECKBOX', ilUtil::formCheckbox(false, 'test_ids[]', $item->ref_id));
$this->tpl->setVariable('OBJECT_TITLE', $item->title);
$this->tpl->setVariable('OBJECT_INFO', $this->getTestPath($item));
}
示例2: fillRow
protected function fillRow($a_data)
{
$this->tpl->setVariable("PERCENTAGE", $a_data["percentage"] . "%");
$this->tpl->setVariable("VAL_CHKBOX", ilUtil::formCheckbox((int) $a_data['input']['checked'], $a_data['input']['name'], $a_data["input"]["value"]));
$this->tpl->setVariable("SOURCE", $a_data["source"]["link"] ? "<a href=\"" . $a_data["source"]["link"] . "\" target=\"_blank\">" . $a_data["source"]["title"] . "</a>" : "<span>" . $a_data["source"]["title"] . "</span>");
$this->tpl->parseCurrentBlock();
}
示例3: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
if ($this->getParentObject()->isCRUDContext()) {
$row['chb'] = ilUtil::formCheckbox(false, 'unit_ids[]', $row['unit_id']);
$sequence = new ilNumberInputGUI('', 'sequence[' . $row['unit_id'] . ']');
$sequence->setValue($this->position++ * 10);
$sequence->setMinValue(0);
$sequence->setSize(3);
$row['sequence'] = $sequence->render();
$action = new ilAdvancedSelectionListGUI();
$action->setId('asl_content_' . $row['unit_id']);
$action->setAsynch(false);
$action->setListTitle($this->lng->txt('actions'));
$ilCtrl->setParameter($this->getParentObject(), 'unit_id', $row['unit_id']);
$action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitModificationForm'));
$action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteUnit'));
$ilCtrl->setParameter($this->getParentObject(), 'unit_id', '');
$row['actions'] = $action->getHtml();
}
if ($row['unit_id'] == $row['baseunit_id']) {
$row['baseunit'] = '';
}
parent::fillRow($row);
}
示例4: prepareRow
/**
* @param array $row
* @return array
*/
protected function prepareRow(array &$row)
{
if ((int) $row['user_id']) {
$this->ctrl->setParameter($this->parent_obj, 'usr_id', '');
if ($row['user_id'] == $this->parent_obj->object->getOwner()) {
$row['checkbox'] = ilUtil::formCheckbox(false, 'usr_id[]', $row['user_id'], true);
} else {
$row['checkbox'] = ilUtil::formCheckbox(false, 'usr_id[]', $row['user_id'], (int) $row['user_id'] ? false : true);
}
} else {
$row['checkbox'] = '';
}
$user_name = '';
if (strlen($row['lastname']) > 0) {
$user_name .= $row['lastname'] . ', ';
}
if (strlen($row['firstname']) > 0) {
$user_name .= $row['firstname'];
}
$row['user_name'] = $user_name;
if ($row['xavc_status']) {
$xavc_options = array("host" => $this->parent_obj->pluginObj->txt("presenter"), "mini-host" => $this->parent_obj->pluginObj->txt("moderator"), "view" => $this->parent_obj->pluginObj->txt("participant"), "denied" => $this->parent_obj->pluginObj->txt("denied"));
if ($row['xavc_status']) {
if ($row['user_id'] == $this->parent_obj->object->getOwner()) {
$row['xavc_status'] = $this->lng->txt("owner");
} else {
$row['xavc_status'] = ilUtil::formSelect($row['xavc_status'], 'xavc_status[' . $row['user_id'] . ']', $xavc_options);
}
} else {
$row['xavc_status'] = $this->parent_obj->pluginObj->txt('user_only_exists_at_ac_server');
}
}
}
开发者ID:HochschuleLuzern,项目名称:ILIAS_AdobeConnectPlugin,代码行数:37,代码来源:class.ilXAVCParticipantsTableGUI.php
示例5: fillRow
/**
* Fill a table row.
*
* This method is called internally by ilias to
* fill a table row according to the row template.
*
* @param stdClass $container
* @internal param \ilObjTest $test
*
*/
protected function fillRow(stdClass $container)
{
$members = $this->getMembersObject($container)->getCountMembers();
$label = $this->lng->txt('rep_robj_xtov_membership_count_members');
$this->tpl->setVariable('VAL_CHECKBOX', ilUtil::formCheckbox(false, 'membership_ids[]', $container->obj_id));
$this->tpl->setVariable('OBJECT_TITLE', $container->title);
$this->tpl->setVariable('OBJECT_INFO', sprintf("%d %s", $members, $label));
$this->tpl->setVariable('OBJECT_IMG_PATH', $this->isAddedContainer($container) ? ilUtil::getImagePath('icon_ok.svg') : ilUtil::getImagePath('icon_not_ok.svg'));
}
示例6: fillRow
/**
* @param array $file_data
*/
protected function fillRow(array $file_data)
{
/**
* We need to encode this because of filenames with the following format: "anystring".txt (with ")
*/
$this->tpl->setVariable('VAL_CHECKBOX', ilUtil::formCheckbox($file_data['checked'], 'filename[]', urlencode($file_data['filename'])));
$this->tpl->setVariable('VAL_FILENAME', $this->formatValue('filename', $file_data['filename']));
$this->tpl->setVariable('VAL_FILESIZE', $this->formatValue('filesize', $file_data['filesize']));
$this->tpl->setVariable('VAL_FILECREATEDATE', $this->formatValue('filecreatedate', $file_data['filecreatedate']));
}
示例7: buildFormItem
public function buildFormItem($a_node_id, $a_type)
{
if (!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type]) {
return '';
}
switch ($this->type) {
case self::SEL_TYPE_CHECK:
return ilUtil::formCheckbox((int) $this->isItemChecked($a_node_id), $this->post_var, $a_node_id);
break;
case self::SEL_TYPE_RADIO:
return ilUtil::formRadioButton((int) $this->isItemChecked($a_node_id), $this->post_var, $a_node_id, "document.getElementById('map').submit(); return false;");
break;
}
}
示例8: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
$row['chb'] = ilUtil::formCheckbox(false, 'category_ids[]', $row['category_id']);
$action = new ilAdvancedSelectionListGUI();
$action->setId('asl_content_' . $row['category_id']);
$action->setAsynch(false);
$action->setListTitle($this->lng->txt('actions'));
$ilCtrl->setParameter($this->getParentObject(), 'category_id', $row['category_id']);
$action->addItem($this->lng->txt('un_show_units'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory'));
if ($this->getParentObject()->isCRUDContext()) {
$action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitCategoryModificationForm'));
$action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteCategory'));
} else {
$action->addItem($this->lng->txt('import'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmImportGlobalCategory'));
}
$row['title_href'] = $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory');
$ilCtrl->setParameter($this->getParentObject(), 'category_id', '');
$row['actions'] = $action->getHtml();
parent::fillRow($row);
}
示例9: editAppliedUsersObject
function editAppliedUsersObject()
{
global $rbacsystem;
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
$this->lng->loadLanguageModule('crs');
$_POST['users'] = $_SESSION['applied_users'] = $_SESSION['applied_users'] ? $_SESSION['applied_users'] : $_POST['users'];
if (!isset($_SESSION['error_post_vars'])) {
ilUtil::sendInfo($this->lng->txt('time_limit_add_time_limit_for_selected'));
}
if (!count($_POST["users"])) {
ilUtil::sendFailure($this->lng->txt("time_limit_no_users_selected"));
$this->appliedUsersObject();
return false;
}
$counter = 0;
foreach ($_POST['users'] as $usr_id) {
if ($counter) {
$title .= ', ';
}
$tmp_user =& ilObjectFactory::getInstanceByObjId($usr_id);
$title .= $tmp_user->getLogin();
++$counter;
}
if (strlen($title) > 79) {
$title = substr($title, 0, 80);
$title .= '...';
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.usr_edit_applied_users.html", "Services/User");
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
// LOAD SAVED DATA IN CASE OF ERROR
$time_limit_unlimited = $_SESSION["error_post_vars"]["au"]["time_limit_unlimited"] ? 1 : 0;
$time_limit_start = $_SESSION["error_post_vars"]["au"]["time_limit_start"] ? $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_start"]) : time();
$time_limit_end = $_SESSION["error_post_vars"]["au"]["time_limit_end"] ? $this->__toUnix($_SESSION["error_post_vars"]["au"]["time_limit_end"]) : time();
// SET TEXT VARIABLES
$this->tpl->setVariable("ALT_IMG", $this->lng->txt("obj_usr"));
$this->tpl->setVariable("TYPE_IMG", ilUtil::getImagePath("icon_usr_b.png"));
$this->tpl->setVariable("TITLE", $title);
$this->tpl->setVariable("TXT_TIME_LIMIT", $this->lng->txt("time_limit"));
$this->tpl->setVariable("TXT_TIME_LIMIT_START", $this->lng->txt("crs_start"));
$this->tpl->setVariable("TXT_TIME_LIMIT_END", $this->lng->txt("crs_end"));
$this->tpl->setVariable("CMD_SUBMIT", "updateAppliedUsers");
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("submit"));
$this->tpl->setVariable("SELECT_TIME_LIMIT_START_DAY", $this->__getDateSelect("day", "au[time_limit_start][day]", date("d", $time_limit_start)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_START_MONTH", $this->__getDateSelect("month", "au[time_limit_start][month]", date("m", $time_limit_start)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_START_YEAR", $this->__getDateSelect("year", "au[time_limit_start][year]", date("Y", $time_limit_start)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_START_HOUR", $this->__getDateSelect("hour", "au[time_limit_start][hour]", date("G", $time_limit_start)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_START_MINUTE", $this->__getDateSelect("minute", "au[time_limit_start][minute]", date("i", $time_limit_start)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_END_DAY", $this->__getDateSelect("day", "au[time_limit_end][day]", date("d", $time_limit_end)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_END_MONTH", $this->__getDateSelect("month", "au[time_limit_end][month]", date("m", $time_limit_end)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_END_YEAR", $this->__getDateSelect("year", "au[time_limit_end][year]", date("Y", $time_limit_end)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_END_HOUR", $this->__getDateSelect("hour", "au[time_limit_end][hour]", date("G", $time_limit_end)));
$this->tpl->setVariable("SELECT_TIME_LIMIT_END_MINUTE", $this->__getDateSelect("minute", "au[time_limit_end][minute]", date("i", $time_limit_end)));
if ($this->ilias->account->getTimeLimitUnlimited()) {
$this->tpl->setVariable("ROWSPAN", 3);
$this->tpl->setCurrentBlock("unlimited");
$this->tpl->setVariable("TXT_TIME_LIMIT_UNLIMITED", $this->lng->txt("crs_unlimited"));
$this->tpl->setVariable("TIME_LIMIT_UNLIMITED", ilUtil::formCheckbox($time_limit_unlimited, "au[time_limit_unlimited]", 1));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setVariable("ROWSPAN", 2);
}
}
示例10: mailMembersObject
public function mailMembersObject()
{
global $rbacreview, $ilObjDataCache;
include_once 'Services/AccessControl/classes/class.ilObjRole.php';
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_members.html', 'Services/Contact');
$this->__setSubTabs('members');
include_once "./Services/Link/classes/class.ilLink.php";
$link_to_seminar = ilLink::_getLink($this->object->getRefId());
include_once 'Services/Mail/classes/class.ilMail.php';
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$this->tpl->setVariable("MAILACTION", ilMailFormCall::getLinkTarget($this, 'mailMembers', array(), array('type' => 'role')));
$this->tpl->setVariable('ADDITIONAL_MESSAGE_TEXT', $link_to_seminar);
$this->tpl->setVariable('IMG_ARROW', ilUtil::getImagePath('arrow_downright.png'));
$this->tpl->setVariable('OK', $this->lng->txt('ok'));
$role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
$role_ids = $rbacreview->getRolesOfRoleFolder($role_folder['ref_id'], false);
foreach ($role_ids as $role_id) {
$this->tpl->setCurrentBlock('mailbox_row');
$role_addr = $rbacreview->getRoleMailboxAddress($role_id);
$this->tpl->setVariable('CHECK_MAILBOX', ilUtil::formCheckbox(1, 'roles[]', htmlspecialchars($role_addr)));
if (ilMail::_usePearMail()) {
// if pear mail is enabled, mailbox addresses are already localized in the language of the user
$this->tpl->setVariable('MAILBOX', $role_addr);
} else {
// if pear mail is not enabled, we need to localize mailbox addresses in the language of the user
$this->tpl->setVariable('MAILBOX', ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)) . ' (' . $role_addr . ')');
}
$this->tpl->parseCurrentBlock();
}
}
示例11: buildFormItem
public function buildFormItem($a_node_id, $a_type)
{
if (!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type]) {
return '';
}
$disabled = false;
if (is_array($_SESSION["clipboard"]["ref_ids"])) {
$disabled = in_array($a_node_id, $_SESSION["clipboard"]["ref_ids"]);
} else {
if ((int) $_SESSION["clipboard"]["ref_ids"]) {
$disabled = $a_node_id == $_SESSION["clipboard"]["ref_ids"];
} else {
if ($_SESSION["clipboard"]["cmd"] == 'copy' && $a_node_id == $_SESSION["clipboard"]["parent"]) {
$disabled = true;
}
}
}
switch ($this->type) {
case self::SEL_TYPE_CHECK:
return ilUtil::formCheckbox((int) $this->isItemChecked($a_node_id), $this->post_var, $a_node_id, $disabled);
break;
case self::SEL_TYPE_RADIO:
return ilUtil::formDisabledRadioButton((int) $this->isItemChecked($a_node_id), $this->post_var, $a_node_id, $disabled);
break;
}
}
示例12: view
function view()
{
global $ilAccess, $ilErr;
// MINIMUM ACCESS LEVEL = 'write'
if (!$ilAccess->checkAccess("read", '', $this->course_obj->getRefId())) {
$ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->MESSAGE);
}
$this->is_tutor = $ilAccess->checkAccess('write', '', $this->course_obj->getRefId());
$this->download_allowed = ($this->is_tutor or $this->course_obj->getArchiveType() == $this->course_obj->ARCHIVE_DOWNLOAD);
$this->course_obj->initCourseArchiveObject();
$this->course_obj->archives_obj->initCourseFilesObject();
$archives = $this->is_tutor ? $this->course_obj->archives_obj->getArchives() : $this->course_obj->archives_obj->getPublicArchives();
require_once "./Services/Table/classes/class.ilTableGUI.php";
$tbl = new ilTableGUI();
$this->__showArchivesMenu();
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
$this->tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.crs_archives_row.html", 'Modules/Course');
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$tbl->setTitle($this->lng->txt("crs_header_archives"));
if ($this->download_allowed or $this->is_tutor) {
$header_names = array('', $this->lng->txt("type"), $this->lng->txt("crs_file_name"), $this->lng->txt("crs_size"), $this->lng->txt("crs_create_date"), $this->lng->txt("crs_archive_lang"));
$header_vars = array("", "type", "name", "size", "date", "lang");
$column_width = array("1%", "9%", "30%", "20%", "20%", "20%");
$this->tpl->setVariable("COLUMN_COUNTS", 6);
} else {
$header_names = array($this->lng->txt("type"), $this->lng->txt("crs_file_name"), $this->lng->txt("crs_create_date"), $this->lng->txt("crs_size"), $this->lng->txt("crs_archive_lang"));
$header_vars = array("type", "name", "date", "size", "lang");
$column_width = array("10%", "30%", "20%", "20%", "20%");
$this->tpl->setVariable("COLUMN_COUNTS", 5);
}
$tbl->setHeaderNames($header_names);
$tbl->setHeaderVars($header_vars, array("ref_id" => $this->course_obj->getRefId(), "cmd" => "view", "cmdClass" => strtolower(get_class($this))));
$tbl->setColumnWidth($column_width);
// control
$tbl->setOrderColumn($_GET["sort_by"]);
$tbl->setOrderDirection($_GET["sort_order"]);
$tbl->setLimit($_GET["limit"]);
$tbl->setOffset($_GET["offset"]);
$tbl->disable("sort");
if ($this->download_allowed) {
$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
if ($this->is_tutor) {
// delete
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "confirmDeleteArchives");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("delete"));
$this->tpl->parseCurrentBlock();
}
// download
$this->tpl->setCurrentBlock("tbl_action_btn");
$this->tpl->setVariable("BTN_NAME", "downloadArchives");
$this->tpl->setVariable("BTN_VALUE", $this->lng->txt("download"));
$this->tpl->parseCurrentBlock();
}
$tbl->setFooter("tblfooter", $this->lng->txt("previous"), $this->lng->txt("next"));
$tbl->setMaxCount(count($archives));
$archives = array_slice($archives, $_GET['offset'], $_GET['limit']);
$tbl->render();
if (!count($archives)) {
$this->tpl->setCurrentBlock("notfound");
$this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
$this->tpl->setVariable("NUM_COLS", 6);
$this->tpl->parseCurrentBlock();
}
$counter = 0;
foreach ($archives as $archive_data) {
$this->tpl->setCurrentBlock("tbl_content");
$this->tpl->setVariable("CSS_ROW", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
if ($this->download_allowed) {
$this->tpl->setVariable("VAL_CHECK", ilUtil::formCheckbox(0, "archives[]", $archive_data['archive_id']));
}
// Type
switch ($archive_data["archive_type"]) {
case $this->course_obj->archives_obj->ARCHIVE_XML:
$type = $this->lng->txt("crs_xml");
break;
case $this->course_obj->archives_obj->ARCHIVE_HTML:
$type = $this->lng->txt("crs_html");
break;
case $this->course_obj->archives_obj->ARCHIVE_PDF:
$type = $this->lng->txt("crs_pdf");
break;
}
$this->tpl->setVariable("VAL_TYPE", $type);
// Name
if ($archive_data['archive_type'] == $this->course_obj->archives_obj->ARCHIVE_HTML) {
$link = '<a href="' . $this->course_obj->archives_obj->course_files_obj->getOnlineLink($archive_data['archive_name']) . '"' . ' target="_blank">' . $archive_data["archive_name"] . '</a>';
} else {
$link = $archive_data['archive_name'];
}
$this->tpl->setVariable("VAL_NAME", $link);
$this->tpl->setVariable("VAL_SIZE", $archive_data['archive_size']);
$this->tpl->setVariable('VAL_DATE', ilDatePresentation::formatDate(new ilDateTime($archive_data['archive_name'], IL_CAL_UNIX)));
if ($archive_data["archive_lang"]) {
$this->tpl->setVariable("VAL_LANG", $this->lng->txt('lang_' . $archive_data["archive_lang"]));
} else {
$this->tpl->setVariable("VAL_LANG", $this->lng->txt('crs_not_available'));
}
$this->tpl->parseCurrentBlock();
}
//.........这里部分代码省略.........
示例13: vatsObject
public function vatsObject()
{
global $ilAccess;
if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
$this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE);
}
include_once 'Services/Table/classes/class.ilTable2GUI.php';
$tbl = new ilTable2GUI($this, 'vats');
$tbl->setId('pay_vats_tbl');
$tbl->setFormAction($this->ctrl->getFormAction($this), 'createVat');
$tbl->setTitle($this->lng->txt('payment_tax_rates'));
$tbl->setRowTemplate('tpl.shop_vats_list_row.html', 'Services/Payment');
$tbl->setDefaultOrderField('title');
$tbl->addColumn('', 'check', '1%');
$tbl->addColumn($this->lng->txt('vat_title'), 'vat_title', '33%');
$tbl->addColumn($this->lng->txt('vat_rate'), 'vat_rate', '33%');
$tbl->addColumn('', 'commands', '33%');
$oShopVatsList = new ilShopVatsList();
$oShopVatsList->read();
$result = array();
$_SESSION['count_vats'] = $oShopVatsList->getNumItems();
if ($oShopVatsList->hasItems()) {
$tbl->enable('select_all');
$tbl->setSelectAllCheckbox('vat_id');
$counter = 0;
foreach ($oShopVatsList as $oVAT) {
$result[$counter]['check'] = ilUtil::formCheckbox(0, 'vat_id[]', $oVAT->getId());
$result[$counter]['vat_title'] = $oVAT->getTitle();
$result[$counter]['vat_rate'] = ilShopUtils::_formatVAT((double) $oVAT->getRate());
$this->ctrl->setParameter($this, 'vat_id', $oVAT->getId());
$result[$counter]['edit_text'] = $this->lng->txt('edit');
$result[$counter]['edit_url'] = $this->ctrl->getLinkTarget($this, 'editVat');
$result[$counter]['delete_text'] = $this->lng->txt('delete');
$result[$counter]['delete_url'] = $this->ctrl->getLinkTarget($this, 'confirmDeleteVat');
$this->ctrl->clearParameters($this);
++$counter;
}
$tbl->addMultiCommand('confirmDeleteVat', $this->lng->txt('delete'));
} else {
$tbl->disable('header');
$tbl->disable('footer');
$tbl->setNoEntriesText($this->lng->txt('paya_no_vats_assigned'));
}
$tbl->setData($result);
$tbl->addCommandButton('createVat', $this->lng->txt('paya_insert_vats'));
$this->tpl->setContent($tbl->getHTML());
return true;
}
示例14: show
/**
* Show list of export files
*
* @access public
*
*/
public function show($a_deliver_file = false)
{
$this->showFileList();
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.member_export.html', 'Modules/Course');
$this->tpl->setVariable('FORM_ACTION', $this->ctrl->getFormAction($this));
$this->tpl->setVariable('TXT_EXPORT_SETTINGS', $this->lng->txt('ps_export_settings'));
$this->tpl->setVariable('TXT_USER_SELECTION', $this->lng->txt('ps_user_selection'));
$this->tpl->setVariable('TXT_EXPORT_ADMIN', $this->lng->txt('ps_export_admin'));
$this->tpl->setVariable('TXT_EXPORT_MEMBER', $this->lng->txt('ps_export_member'));
$this->tpl->setVariable('TXT_EXPORT_WAIT', $this->lng->txt('ps_export_wait'));
$this->tpl->setVariable('TXT_EXPORT_SUB', $this->lng->txt('ps_export_sub'));
// Check user selection
$this->exportSettings = new ilUserFormSettings('memexp');
$this->tpl->setVariable('CHECK_EXPORT_ADMIN', ilUtil::formCheckbox($this->exportSettings->enabled('admin'), 'export_members[admin]', 1));
if ($this->type == 'crs') {
$this->tpl->setVariable('CHECK_EXPORT_TUTOR', ilUtil::formCheckbox($this->exportSettings->enabled('tutor'), 'export_members[tutor]', 1));
$this->tpl->setVariable('TXT_EXPORT_TUTOR', $this->lng->txt('ps_export_tutor'));
}
$this->tpl->setVariable('CHECK_EXPORT_MEMBER', ilUtil::formCheckbox($this->exportSettings->enabled('member'), 'export_members[member]', 1));
$this->tpl->setVariable('CHECK_EXPORT_SUB', ilUtil::formCheckbox($this->exportSettings->enabled('subscribers'), 'export_members[subscribers]', 1));
$this->tpl->setVariable('CHECK_EXPORT_WAIT', ilUtil::formCheckbox($this->exportSettings->enabled('waiting_list'), 'export_members[waiting_list]', 1));
$this->tpl->setVariable('TXT_EXPORT', $this->lng->txt('ps_perform_export'));
$this->tpl->setVariable('TXT_EXPORT_EXCEL', $this->lng->txt('ps_export_excel'));
// User Data
$this->tpl->setVariable('TXT_USER_DATA_SELECTION', $this->lng->txt('ps_export_data'));
$this->tpl->setVariable('TXT_EXPORT_USER_DATA_HEADER', $this->lng->txt('ps_export_user_data'));
include_once './Services/Booking/classes/class.ilBookingEntry.php';
if (ilBookingEntry::hasObjectBookingEntries($this->obj_id, $GLOBALS['ilUser']->getId())) {
$this->tpl->setCurrentBlock('consultation');
$this->lng->loadLanguageModule('dateplaner');
$this->tpl->setVariable('TXT_CH', $this->lng->txt('cal_ch_field_ch'));
$this->tpl->setVariable('TXT_EXPORT_CH', $this->lng->txt('cal_ch_export_apps'));
$this->tpl->setVariable('CHECK_EXPORT_CH', ilUtil::formCheckbox($this->exportSettings->enabled('consultation_hour'), 'export_members[consultation_hour]', 1));
$this->tpl->parseCurrentBlock();
}
$fields = $this->fields_info->getFieldsInfo();
foreach ($fields as $field => $exportable) {
if (!$exportable) {
continue;
}
$this->tpl->setCurrentBlock('user_data_row');
$this->tpl->setVariable('CHECK_EXPORT_USER_DATA', ilUtil::formCheckbox($this->exportSettings->enabled($field), 'export_members[' . $field . ']', 1));
$this->tpl->setVariable('TXT_EXPORT_USER_DATA', $this->lng->txt($field));
$this->tpl->parseCurrentBlock();
}
$udf = ilUserDefinedFields::_getInstance();
foreach ($exp = $udf->getExportableFields($this->obj_id) as $field_id => $udf_data) {
$this->tpl->setCurrentBlock('user_data_row');
$this->tpl->setVariable('CHECK_EXPORT_USER_DATA', ilUtil::formCheckbox($this->exportSettings->enabled('udf_' . $field_id), 'export_members[udf_' . $field_id . ']', 1));
$this->tpl->setVariable('TXT_EXPORT_USER_DATA', $udf_data['field_name']);
$this->tpl->parseCurrentBlock();
}
$cdf_fields = ilCourseDefinedFieldDefinition::_getFields($this->obj_id);
foreach ($cdf_fields as $field_obj) {
$this->tpl->setCurrentBlock('cdf_row');
$this->tpl->setVariable('CHECK_CDF_DATA', ilUtil::formCheckbox($this->exportSettings->enabled('cdf_' . $field_obj->getId()), 'export_members[cdf_' . $field_obj->getId() . ']', 1));
$this->tpl->setVariable('TXT_CDF_NAME', $field_obj->getName());
$this->tpl->parseCurrentBlock();
}
if (count($cdf_fields)) {
$this->tpl->setCurrentBlock('cdf_fields');
$this->tpl->setVariable('TXT_CDF_SELECTION', $this->lng->txt('ps_' . $this->type . '_user_fields'));
$this->tpl->parseCurrentBlock();
}
if ($a_deliver_file and 0) {
$this->tpl->setCurrentBlock('iframe');
$this->tpl->setVariable('SOURCE', $this->ctrl->getLinkTarget($this, 'deliverData'));
}
}
示例15: listUsersGroup
function listUsersGroup()
{
global $rbacsystem, $rbacreview, $tree;
$_SESSION["grp_group"] = $_POST["group"] = $_POST["group"] ? $_POST["group"] : $_SESSION["grp_group"];
// MINIMUM ACCESS LEVEL = 'administrate'
if (!$rbacsystem->checkAccess("write", $this->ref_id)) {
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilias->error_obj->MESSAGE);
}
if (!is_array($_POST["group"])) {
ilUtil::sendFailure($this->lng->txt("grp_no_groups_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html", "Modules/Group");
$this->__showButton("searchUserForm", $this->lng->txt("grp_new_search"));
// GET ALL MEMBERS
$members = array();
foreach ($_POST["group"] as $group_id) {
if (!$tree->isInTree($group_id)) {
continue;
}
if (!($tmp_obj = ilObjectFactory::getInstanceByRefId($group_id))) {
continue;
}
$members = array_merge($tmp_obj->getGroupMemberIds(), $members);
unset($tmp_obj);
}
$members = array_unique($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array();
foreach ($members as $user) {
if (!($tmp_obj = ilObjectFactory::getInstanceByObjId($user, false))) {
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil::formCheckbox(0, "user[]", $user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = ilFormat::formatDate($tmp_obj->getLastLogin());
unset($tmp_obj);
++$counter;
}
$this->__showSearchUserTable($f_result, $user_ids, "listUsersGroup");
return true;
}