本文整理汇总了PHP中caHTMLCheckboxInput函数的典型用法代码示例。如果您正苦于以下问题:PHP caHTMLCheckboxInput函数的具体用法?PHP caHTMLCheckboxInput怎么用?PHP caHTMLCheckboxInput使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了caHTMLCheckboxInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _t
<?php
print _t('Send email to <strong>%1</strong> when done', $vs_email);
?>
</td>
<?php
}
if (($vs_sms = trim($this->request->user->get('sms_number'))) && (bool) $this->request->config->get('enable_sms_notifications')) {
?>
<td class="caConfirmBatchExecutionPanelAlertControl">
<?php
$va_opts = array('id' => 'caSendSMSWhenDone', 'value' => 1);
if (isset($va_last_settings['sendSMS']) && $va_last_settings['sendSMS']) {
$va_opts['checked'] = 1;
}
print caHTMLCheckboxInput('send_sms_when_done', $va_opts);
?>
</td>
<td class="caConfirmBatchExecutionPanelAlertControl">
<?php
print _t('Send SMS to <strong>%1</strong> when done', $vs_sms);
?>
</td>
<?php
}
?>
</tr>
</table>
</div>
示例2: _t
<?php
print _t('Send email to <strong>%1</strong> when done', $vs_email);
?>
</td>
<?php
}
if (($vs_sms = trim($this->request->user->get('sms_number'))) && (bool) $this->request->config->get('enable_sms_notifications')) {
?>
<td class="caConfirmBatchExecutionPanelAlertControl">
<?php
$va_opts = array('id' => 'caSendSMSWhenDone', 'value' => 1);
if (isset($va_last_settings['sendSMS']) && $va_last_settings['sendSMS']) {
$va_opts['checked'] = 1;
}
print caHTMLCheckboxInput('send_sms_when_done', array('id' => 'caSendSMSWhenDone', $va_opts));
?>
</td>
<td class="caConfirmBatchExecutionPanelAlertControl">
<?php
print _t('Send SMS to <strong>%1</strong> when done', $vs_sms);
?>
</td>
<?php
}
?>
<div id="caTypeChangePanelControlButtons">
<table>
<tr>
示例3: _p
<?php
_p('More information about standard installation profiles is available on the CollectiveAccess <a href="http://docs.collectiveaccess.org/wiki/Installation_profile" target="_blank">project wiki</a>.');
?>
<br/><br/>
<?php
_p('Don\'t see a suitable profile? Browse our <a href="http://www.CollectiveAccess.org/configuration" target="_blank">installation profile library</a> for additional configurations developed by the CollectiveAccess user community. To install a new profile simply copy the file into the <i>install/profiles/xml</i> directory on your server and reload the installer in your web browser.');
?>
</div>
</div>
</div><!-- end formItem -->
<?php
if (defined('__CA_ALLOW_INSTALLER_TO_OVERWRITE_EXISTING_INSTALLS__') && __CA_ALLOW_INSTALLER_TO_OVERWRITE_EXISTING_INSTALLS__) {
?>
<div class='formItem'>
<?php
print caHTMLCheckboxInput('overwrite', array('value' => 1)) . " " . _p("Overwrite existing installation?");
?>
</div><!-- end formItem -->
<?php
}
?>
<div class="loginSubmitButton"><a href='#' onclick='jQuery("#page1form").submit();' class='form-button'><span class='form-button'><img src='<?php
print $vs_url_path;
?>
/graphics/glyphicons_206_ok_2.png' border='0' alt='<?php
_p('Begin installation');
?>
' class='form-button-left' style='padding-right: 10px;'/> <?php
_p('Begin installation');
?>
示例4: settingHTMLFormElement
/**
* Returns HTML form element for editing of setting
*
* Options:
*
* 'name' => sets the name of the HTML form element explicitly, otherwise 'setting_<name_of_setting>' is used
* 'id' => sets the id of the HTML form element explicitly, otherwise 'setting_<name_of_setting>' is used
* 'value' => sets the value of the HTML form element explicitly, otherwise the current value for the setting in the loaded row is used
* 'label_id' => sets the id of the label for the setting form element (used to link tools tips to the label); if not set then the default is to set it to 'setting_<name_of_setting>_label'
*/
public function settingHTMLFormElement($ps_setting, $pa_options = null)
{
if (!$this->isValidSetting($ps_setting)) {
return false;
}
$va_available_settings = $this->getAvailableSettings();
$va_properties = $va_available_settings[$ps_setting];
if (isset($pa_options['name'])) {
$vs_input_name = $pa_options['name'];
} else {
$vs_input_name = "setting_{$ps_setting}";
}
if (isset($pa_options['id'])) {
$vs_input_id = $pa_options['id'];
} else {
$vs_input_id = "setting_{$ps_setting}";
}
if (isset($pa_options['value'])) {
$vs_value = $pa_options['value'];
} else {
$vs_value = $this->getSetting(trim($ps_setting));
}
if (isset($pa_options['label_id'])) {
$vs_label_id = $pa_options['label_id'];
} else {
$vs_label_id = "setting_{$ps_setting}_label";
}
$vs_return = "\n" . '<div class="formLabel" id="' . $vs_input_id . '_container">' . "\n";
$vs_return .= '<span id="' . $vs_label_id . '" class="' . $vs_label_id . '">' . $va_properties['label'] . '</span>';
if ($vs_help_text = $pa_options['helpText']) {
$vs_return .= "<a href='#' onclick='jQuery(\"#" . str_replace(".", "_", $vs_label_id) . "_help_text\").slideToggle(250); return false;' class='settingsKeyButton'>" . _t('Key') . "</a>";
}
$vs_return .= '<br />' . "\n";
if ($vs_help_text) {
$vs_return .= "\n<div id='" . str_replace(".", "_", $vs_label_id) . "_help_text' class='settingsKey'>{$vs_help_text}</div>\n";
}
switch ($va_properties['displayType']) {
# --------------------------------------------
case DT_FIELD:
$vb_takes_locale = false;
if (isset($va_properties['takesLocale']) && $va_properties['takesLocale']) {
$vb_takes_locale = true;
$va_locales = ca_locales::getLocaleList(array('sort_field' => '', 'sort_order' => 'asc', 'index_by_code' => true, 'available_for_cataloguing_only' => true));
} else {
$va_locales = array('_generic' => array());
}
foreach ($va_locales as $vs_locale => $va_locale_info) {
if ($vb_takes_locale && sizeof($va_locales) > 1) {
$vs_locale_label = " (" . $va_locale_info['name'] . ")";
$vs_input_name_suffix = '_' . $vs_locale;
} else {
if ($vb_takes_locale) {
$vs_input_name_suffix = '_' . $vs_locale;
} else {
$vs_input_name_suffix = $vs_locale_label = '';
}
}
if ($vs_locale != '_generic' && is_array($vs_value)) {
// _generic means this setting doesn't take a locale
if (!($vs_text_value = $vs_value[$va_locale_info['locale_id']])) {
$vs_text_value = is_array($vs_value) && isset($vs_value[$va_locale_info['code']]) ? $vs_value[$va_locale_info['code']] : '';
}
} else {
$vs_text_value = $vs_value;
}
$vs_return .= caHTMLTextInput($vs_input_name . $vs_input_name_suffix, array('size' => $va_properties["width"], 'height' => $va_properties["height"], 'value' => $vs_text_value, 'id' => $vs_input_id)) . "{$vs_locale_label}<br/>\n";
}
break;
# --------------------------------------------
# --------------------------------------------
case DT_CHECKBOXES:
$va_attributes = array('value' => '1', 'id' => $vs_input_id);
if ((int) $vs_value === 1) {
$va_attributes['checked'] = '1';
}
if (isset($va_properties['hideOnSelect'])) {
if (!is_array($va_properties['hideOnSelect'])) {
$va_properties['hideOnSelect'] = array($va_properties['hideOnSelect']);
}
$va_ids = array();
foreach ($va_properties['hideOnSelect'] as $vs_n) {
$va_ids[] = "#" . $pa_options['id_prefix'] . "_{$vs_n}_container";
}
$va_attributes['onchange'] = 'jQuery(this).prop("checked") ? jQuery("' . join(",", $va_ids) . '").slideUp(250).find("input, textarea").val("") : jQuery("' . join(",", $va_ids) . '").slideDown(250);';
}
$vs_return .= caHTMLCheckboxInput($vs_input_name, $va_attributes, array());
break;
# --------------------------------------------
# --------------------------------------------
case DT_COLORPICKER:
//.........这里部分代码省略.........
示例5: foreach
?>
</div>
<table width="100%">
<?php
$vn_i = 0;
TooltipManager::setNamespaceCSSClass("{$vs_id_prefix}_media_tooltips", "resizeableTooltip");
foreach ($t_subject->getMediaVersions('media') as $vs_version) {
if ($t_subject->getMediaInputTypeForVersion('media', $vs_version) != 'image') {
continue;
}
// skip non-image versions
if (!$vn_i) {
print "<tr>";
}
print "<td>" . caHTMLCheckboxInput($vs_id_prefix . '_set_versions[]', array('value' => $vs_version, 'checked' => '1'));
print "<span id='{$vs_id_prefix}_media_{$vs_version}_label'>{$vs_version} (" . $t_subject->getMediaInfo('media', $vs_version, 'WIDTH') . 'x' . $t_subject->getMediaInfo('media', $vs_version, 'HEIGHT') . ")</span>";
print "</td>";
TooltipManager::add("#{$vs_id_prefix}_media_{$vs_version}_label", $t_subject->getMediaTag('media', $vs_version), "{$vs_id_prefix}_media_tooltips");
$vn_i++;
if ($vn_i > 2) {
print "</tr>\n";
$vn_i = 0;
}
}
if ($vn_i > 0) {
print "</tr>\n";
}
?>
</table>
<div class="objectRepresentationMediaDisplayDerivativeHelpText" id="<?php
示例6: caHTMLCheckboxInput
</span>
<?php
}
if ($vs_media = $this->getVar('display_media')) {
?>
<div style="float: right; margin: 5px 10px 5px 0px;"><?php
print $vs_media;
?>
</div>
<?php
}
//
// Generate "inherit" control for access where supported
//
if ($vs_bundle_name == 'access' && (bool) $t_instance->getAppConfig()->get($t_instance->tableName() . '_allow_access_inheritance') && $t_instance->hasField('access_inherit_from_parent') && $t_instance->get('parent_id') > 0) {
print "<div class='inheritFromParent'>" . caHTMLCheckboxInput($vs_id_prefix . 'access_inherit_from_parent', array('value' => 1, 'id' => $vs_id_prefix . 'access_inherit_from_parent'), array()) . ' ' . _t('Inherit from parent?') . "</div>";
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#<?php
print $vs_id_prefix;
?>
access_inherit_from_parent').bind('click', function(e) {
jQuery('#<?php
print $vs_id_prefix;
?>
access').prop('disabled', jQuery(this).prop('checked'));
}).prop('checked', <?php
print (bool) $t_instance->get('access_inherit_from_parent') ? 'true' : 'false';
?>
);
示例7: _t
</div>
</div>
<div class='bundleLabel'>
<span class="formLabelText"><?php
print _t('Testing options');
?>
</span>
<div class="bundleContainer">
<div class="caLabelList" >
<p class="formLabelPlain">
<?php
$va_attr = array('id' => 'caDryRun', 'value' => 1);
if ($va_last_settings['dryRun'] == 1) {
$va_attr['checked'] = 1;
}
print caHTMLCheckboxInput('dryRun', $va_attr) . " " . _t('Dry run');
?>
</p>
</div>
</div>
</div>
<?php
print $this->render("metadataimport/confirm_html.php");
?>
</form>
</div>
<?php
print $vs_control_box;
?>
<div class="editorBottomPadding"><!-- empty --></div>
示例8: getListAsHTMLFormElement
//.........这里部分代码省略.........
$vn_c = 0;
$vb_is_checked = false;
if (!$pa_options['value']) {
$pa_options['value'] = (string) $vn_default_val;
}
foreach ($va_options as $vm_value => $vs_label) {
if (strlen($vm_value) == 0) {
continue;
}
// don't count null values when calculating the first value for the yes/no
switch ($vn_c) {
case 0:
if ($pa_options['value'] === (string) $vm_value) {
$vb_is_checked = true;
}
$pa_attributes['value'] = $pa_options['value'] = $vm_value;
$pa_options['label'] = $vs_label;
break;
case 1:
$pa_options['returnValueIfUnchecked'] = $vm_value;
break;
default:
// exit
break 2;
}
$vn_c++;
}
if ($vb_is_checked) {
$pa_attributes['checked'] = 1;
}
if (isset($pa_options['readonly']) && $pa_options['readonly']) {
$pa_attributes['disabled'] = 1;
}
return caHTMLCheckboxInput($ps_name, $pa_attributes, $pa_options);
break;
case 'checklist':
if (!sizeof($va_options)) {
return '';
}
// return empty string if list has no values
$vn_c = 0;
$vs_buf = "<table>\n";
foreach ($va_options as $vm_value => $vs_label) {
if ($vn_c == 0) {
$vs_buf .= "<tr>";
}
$va_attributes = array('value' => $vm_value);
if (isset($va_disabled_options[$vm_value]) && $va_disabled_options[$vm_value]) {
$va_attributes['disabled'] = 1;
}
if (isset($pa_options['readonly']) && $pa_options['readonly']) {
$va_attributes['disabled'] = 1;
}
if (is_array($pa_options['value']) && in_array($vm_value, $pa_options['value'])) {
$va_attributes['checked'] = '1';
}
$vs_buf .= "<td>" . caHTMLCheckboxInput($ps_name . '_' . $vm_value, $va_attributes, $pa_options) . " {$vs_label}</td>";
$vn_c++;
if ($vn_c >= $pa_options['maxColumns']) {
$vn_c = 0;
$vs_buf .= "</tr>\n";
}
}
if ($vn_c != 0) {
$vs_buf .= "</tr>\n";
}
示例9: htmlFormElementForSearch
//.........这里部分代码省略.........
$pa_options = array();
}
if (!isset($pa_options['width'])) {
$pa_options['width'] = 30;
}
if (!isset($pa_options['values'])) {
$pa_options['values'] = array();
}
if (!isset($pa_options['values'][$ps_field])) {
$pa_options['values'][$ps_field] = '';
}
return caHTMLTextInput($ps_field . $vs_rel_types . ($vb_as_array_element ? "[]" : ""), array('value' => $pa_options['values'][$ps_field], 'size' => $pa_options['width'], 'class' => $pa_options['class'], 'id' => str_replace('.', '_', $ps_field)));
}
break;
# -------------------------------------
# -------------------------------------
case 2:
// table_name.field_name
// table_name.field_name
case 3:
// table_name.field_name.sub_element
if (!($t_instance = $this->_DATAMODEL->getInstanceByTableName($va_tmp[0], true))) {
return null;
}
if ($va_tmp[0] != $this->tableName()) {
switch (sizeof($va_tmp)) {
case 1:
return caHTMLTextInput($ps_field . ($vb_as_array_element ? "[]" : ""), array('value' => $pa_options['values'][$ps_field], 'size' => $pa_options['width'], 'class' => $pa_options['class'], 'id' => str_replace('.', '_', $ps_field)));
case 2:
case 3:
if ($ps_render = caGetOption('render', $pa_options, null)) {
switch ($ps_render) {
case 'is_set':
return caHTMLCheckboxInput($ps_field . $vs_rel_types, array('value' => '[SET]'));
break;
}
}
if (caGetOption('select', $pa_options, false)) {
$va_access = caGetOption('checkAccess', $pa_options, null);
if (!($t_instance = $this->_DATAMODEL->getInstanceByTableName($va_tmp[0], true))) {
return null;
}
$vs_label_display_field = $t_instance->getLabelDisplayField();
$va_find_params = array('parent_id' => null);
switch ($va_tmp[0]) {
case 'ca_list_items':
if ($vs_list = caGetOption('list', $pa_options, null)) {
if ($vn_list_id = caGetListID($vs_list)) {
$va_find_params = array('list_id' => $vn_list_id);
}
}
break;
}
$qr_res = call_user_func_array($va_tmp[0] . '::find', array($va_find_params, array('sort' => caGetOption('sort', $pa_options, $t_instance->getLabelTableName() . '.' . $vs_label_display_field), 'returnAs' => 'searchResult')));
$vs_pk = $t_instance->primaryKey();
$va_opts = array('-' => '');
$va_in_use_list = $vs_rel_pk = null;
if (caGetOption('inUse', $pa_options, false)) {
if (is_array($va_path = $this->_DATAMODEL->getPath($this->tableName(), $va_tmp[0]))) {
$va_path = array_keys($va_path);
if (sizeof($va_path) == 3) {
if ($t_rel = $this->_DATAMODEL->getInstanceByTableName($va_tmp[0], true)) {
$vs_table = $this->tableName();
$vs_pk = $this->primaryKey();
$va_sql_wheres = array();
$va_sql_params = array();
示例10: settingHTMLFormElement
/**
* Returns HTML form element for editing of setting
*/
public function settingHTMLFormElement($ps_setting, $pa_options = null)
{
if (!$this->isValidSetting($ps_setting)) {
return false;
}
$va_available_settings = $this->getAvailableSettings();
$va_properties = $va_available_settings[$ps_setting];
if ((int) $this->get('parent_id') > 0 && isset($va_properties['validForRootOnly']) && $va_properties['validForRootOnly']) {
return false;
}
$vs_input_name = "setting_{$ps_setting}";
if (isset($pa_options['label_id'])) {
$vs_label_id = $pa_options['label_id'];
} else {
$vs_label_id = "setting_{$ps_setting}_label";
}
$vs_return = "\n" . '<div class="formLabel">' . "\n";
$vs_return .= '<span class="' . $vs_label_id . '">' . $va_properties['label'] . '</span><br />' . "\n";
switch ($va_properties['displayType']) {
# --------------------------------------------
case DT_FIELD:
if ($va_properties["height"] == 1) {
$vs_return .= '<input name="' . $vs_input_name . '" type="text" size="' . $va_properties["width"] . '" value="' . $this->getSetting($ps_setting) . '" />' . "\n";
} else {
if ($va_properties["height"] > 1) {
$vs_return .= '<textarea name="' . $vs_input_name . '" cols="' . $va_properties["width"] . '" rows="' . $va_properties["height"] . '">' . $this->getSetting($ps_setting) . '</textarea>' . "\n";
}
}
break;
# --------------------------------------------
# --------------------------------------------
case DT_PASSWORD:
$vs_return .= '<input name="' . $vs_input_name . '" type="password" size="' . $va_properties["width"] . '" value="' . $this->getSetting($ps_setting) . '" />' . "\n";
break;
# --------------------------------------------
# --------------------------------------------
case DT_CHECKBOXES:
$va_attributes = array('value' => '1');
if (trim($this->getSetting($ps_setting))) {
$va_attributes['checked'] = '1';
}
$vs_return .= caHTMLCheckboxInput($vs_input_name, $va_attributes);
break;
# --------------------------------------------
# --------------------------------------------
case DT_SELECT:
$vn_width = isset($va_properties['width']) && strlen($va_properties['width']) > 0 ? $va_properties['width'] : "100px";
$vn_height = isset($va_properties['height']) && strlen($va_properties['height']) > 0 ? $va_properties['height'] : "50px";
if (!$vs_input_id) {
$vs_input_id = $vs_input_name;
}
if ($vn_height > 1) {
$va_attr['multiple'] = 1;
$vs_input_name .= '[]';
}
$va_opts = array('id' => $vs_input_id, 'width' => $vn_width, 'height' => $vn_height);
$vm_value = $this->getSetting($ps_setting);
if (is_array($vm_value)) {
$va_opts['values'] = $vm_value;
} else {
$va_opts['value'] = $vm_value;
if (!isset($va_opts['value'])) {
$va_opts['value'] = -1;
}
// make sure default list item is never selected
}
// reload settings form when value for this element changes
if (isset($va_properties['refreshOnChange']) && (bool) $va_properties['refreshOnChange']) {
$va_attr['onchange'] = "caSetElementsSettingsForm({ {$vs_input_id} : jQuery(this).val() }); return false;";
}
$vs_return .= caHTMLSelect($vs_input_name, $va_properties['options'], $va_attr, $va_opts);
break;
# --------------------------------------------
# --------------------------------------------
default:
break;
# --------------------------------------------
}
$vs_return .= '</div>' . "\n";
TooltipManager::add('.' . $vs_label_id, "<h3>" . $va_properties["label"] . "</h3>" . $va_properties["description"]);
return $vs_return;
}
示例11: caHTMLTextInput
print caHTMLTextInput('skip_file_list', array('value' => $va_last_settings['skipFileList'], 'id' => "caSkipFilesList"), array('width' => '700px', 'height' => '100px'));
?>
</p>
</div>
</div>
</div>
<div class='bundleLabel'>
<span class="formLabelText"><?php
print _t('Miscellaneous');
?>
</span>
<div class="bundleContainer">
<div class="caLabelList" >
<p class='formLabel'>
<?php
print caHTMLCheckboxInput('allow_duplicate_media', array('value' => 1, 'id' => 'caAllowDuplicateMedia', 'checked' => $va_last_settings['allowDuplicateMedia']), array());
print " " . _t('Allow duplicate media?');
?>
</p>
<p class='formLabel'>
<?php
print _t('Log level') . '<br/>';
print caHTMLSelect('log_level', caGetLogLevels(), array('id' => 'caLogLevel'), array('value' => $va_last_settings['logLevel']));
?>
</p>
</div>
</div>
</div>
</div>
<?php
示例12: foreach
?>
<textarea class='caItemTemplate' style='display: none;'>
<div id="<?php
print $vs_id_prefix;
?>
Item_{n}" class="labelInfo">
<span class="formLabelError">{error}</span>
<table class="objectRepresentationListItem" width="90%"><?php
$vn_c = 0;
if (sizeof($va_set_options)) {
foreach ($va_set_options as $vn_set_id => $vs_set_name) {
if ($vn_c == 0) {
print "<tr>";
}
print "<td width='33%'><div class='formLabel'>\n";
print caHTMLCheckboxInput('{fieldNamePrefix}' . $vn_set_id . '_0_{n}', array('value' => $vn_set_id, 'id' => '{fieldNamePrefix}' . $vn_set_id . '_0_{n}'), array()) . " {$vs_set_name}";
print "</div></td>";
$vn_c++;
if ($vn_c == 3) {
print "</tr>\n";
$vn_c = 0;
}
}
if ($vn_c > 0) {
print "</tr>\n";
}
} else {
print "<tr><td>" . _t('No sets are available') . "</td></tr>\n";
}
?>
</table>
示例13: _t
}
// will return null if group name is not a table name; true if it's an enabled table and false if it's a disabled table
$vs_check_all_link = '<a href="#" onclick="jQuery(\'.role_action_group_' . $vs_group . '\').attr(\'checked\', true); return false;" class="roleCheckAllNoneButton">' . _t('All') . '</a>';
$vs_check_none_link = '<a href="#" onclick="jQuery(\'.role_action_group_' . $vs_group . '\').attr(\'checked\', false); return false;" class="roleCheckAllNoneButton">' . _t('None') . '</a>';
print "<tr><td colspan='" . $vn_num_cols * 2 . "' class='formLabel roleCheckGroupHeading'><span id='group_label_" . $vs_group . "'>" . $va_group_info['label'] . "</span> <span class='roleCheckAllNoneButtons'>{$vs_check_all_link}/{$vs_check_none_link}</span></td></tr>\n";
TooltipManager::add('#group_label_' . $vs_group, "<h3>" . $va_group_info['label'] . "</h3>" . $va_group_info['description']);
foreach ($va_group_info['actions'] as $vs_action => $va_action_info) {
if ($vn_c == 0) {
print "<tr valign='top'>";
}
$va_attributes = array('value' => 1);
if (in_array($vs_action, $va_current_actions)) {
$va_attributes['checked'] = 1;
}
$va_attributes['class'] = 'role_action_group_' . $vs_group;
print "<td>" . caHTMLCheckboxInput($vs_action, $va_attributes) . "</td><td width='120'><span id='role_label_" . $vs_action . "'>" . $va_action_info['label'] . "</span></td>";
TooltipManager::add('#role_label_' . $vs_action, "<h3>" . $va_action_info['label'] . "</h3>" . $va_action_info['description']);
$vn_c++;
if ($vn_c >= $vn_num_cols) {
$vn_c = 0;
print "</tr>\n";
}
}
if ($vn_c > 0) {
print "</tr>\n";
}
$vn_c = 0;
}
?>
</table>
</div>
示例14: caNavUrl
print " (<a href='#' onclick='caMediaPanel.showPanel(\"" . caNavUrl($this->request, '', 'Sets', 'SelectRepresentations', array('object_id' => $va_item['row_id'], 'item_id' => $va_item['item_id'])) . "\", function() { jQuery(\"#selectRepsCount{$vn_item_id}\").load(\"" . caNavUrl($this->request, '', 'Sets', 'GetSelectedRepresentationCount', array('item_id' => $vn_item_id)) . "\"); }); return false;' >" . _t("change") . "</a>)" . "</div>";
# --- output special halep text if there are any audio or video reps associated with this object
$t_order_objects->load($va_item['row_id']);
if ($t_order_objects->numberOfRepresentationsOfClass("audio") || $t_order_objects->numberOfRepresentationsOfClass("video")) {
print "<p>This record contains audio and/or video materials. If this is what you are interested in purchasing please add your inquiry in the messaging system on the right of the screen.</p>";
}
print "<div class='setItemServicesForm'><form action='#' id='setItemServices<?php print {$vn_item_id}; ?>'>";
$va_service_list = $t_order_item->getFieldInfo('service', 'BOUNDS_CHOICE_LIST');
foreach ($t_order_item->getServiceGroups() as $vs_group_code => $va_group_info) {
print "<br style='clear: both;'/><div style='margin-top: 10px;'><strong>" . $va_group_info['label'] . "</strong> " . (mb_strtolower($va_group_info['label']) == "usage" ? " <a href='" . caNavUrl($this->request, "", "About", "faq") . "#usage'>" . _t("Why do I need usage?") . "</a>" : "") . "</div>\n";
foreach ($va_group_info['services'] as $vs_service_code => $va_service_info) {
$va_opts = array('value' => $vn_item_id . '|' . $vs_service_code);
if (in_array($vs_service_code, $va_item['selected_services'])) {
$va_opts['checked'] = 1;
}
print "<div class='serviceItem'><div style='float: left;'>" . caHTMLCheckboxInput('setItemServices_' . $vn_item_id, $va_opts) . "</div><div>" . $va_service_info['label'] . "</div></div>";
}
}
print "</form></div>";
?>
</div><!-- end setItemInfo -->
</div>
<div style="clear:both; height:1px;"><!-- empty --></div>
</li>
<?php
}
}
?>
</ul>
</div><!-- end setItems -->
</div><!-- leftCol -->
示例15: foreach
?>
">
<?php
foreach ($va_reps as $va_rep) {
$va_attributes = array('value' => $va_rep['representation_id']);
if (in_array($va_rep['representation_id'], $va_selected_rep_ids)) {
$va_attributes['checked'] = 1;
}
?>
<div class="caObjectRepresentationChooserRepresentation">
<?php
print $va_rep['tags']['preview170'];
?>
<?php
if (!$vb_read_only) {
print caHTMLCheckboxInput("{$vs_id_prefix}[]", $va_attributes);
}
?>
</div>
<?php
}
?>
<br class="clear"/>
</div>
<?php
} else {
?>
<div class="caObjectRepresentationChooserContainer" id="<?php
print $vs_id_prefix;
?>
">