本文整理汇总了PHP中CAdminCalendar类的典型用法代码示例。如果您正苦于以下问题:PHP CAdminCalendar类的具体用法?PHP CAdminCalendar怎么用?PHP CAdminCalendar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CAdminCalendar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: ___WDBPStartWorkflowParametersShow
function ___WDBPStartWorkflowParametersShow($templateId, $arWorkflowParameters, $bVarsFromForm, &$arFields)
{
$templateId = intval($templateId);
if ($templateId <= 0) {
return;
}
if (!isset($arWorkflowParameters) || !is_array($arWorkflowParameters)) {
$arWorkflowParameters = array();
}
$arParametersValues = array();
$keys = array_keys($arWorkflowParameters);
foreach ($keys as $key) {
$v = $bVarsFromForm ? $_REQUEST["bizproc" . $templateId . "_" . $key] : $arWorkflowParameters[$key]["Default"];
if (!is_array($v)) {
$arParametersValues[$key] = htmlspecialcharsbx($v);
} else {
$keys1 = array_keys($v);
foreach ($keys1 as $key1) {
$arParametersValues[$key][$key1] = htmlspecialcharsbx($v[$key1]);
}
}
}
foreach ($arWorkflowParameters as $parameterKey => $arParameter) {
$parameterKeyExt = "bizproc" . $templateId . "_" . $parameterKey;
$sData = GetMessage("BPCGDOC_INVALID_TYPE");
switch ($arParameter["Type"]) {
case "int":
case "double":
$sData = '<input type="text" name="' . $parameterKeyExt . '" size="10" value="' . $arParametersValues[$parameterKey] . '" />';
break;
case "string":
$sData = '<input type="text" name="' . $parameterKeyExt . '" size="50" value="' . $arParametersValues[$parameterKey] . '" />';
break;
case "text":
$sData = '<textarea name="' . $parameterKeyExt . '" rows="5" cols="40">' . $arParametersValues[$parameterKey] . '</textarea>';
break;
case "select":
$sData = '<select name="' . $parameterKeyExt . ($arParameter["Multiple"] ? '[]" size="5" multiple="multiple"' : '"') . '>';
if (is_array($arParameter["Options"]) && count($arParameter["Options"]) > 0) {
foreach ($arParameter["Options"] as $key => $value) {
$sData .= '<option value="' . $key . '"' . (!$arParameter["Multiple"] && $key == $arParametersValues[$parameterKey] || $arParameter["Multiple"] && is_array($arParametersValues[$parameterKey]) && in_array($key, $arParametersValues[$parameterKey]) ? ' selected="selected"' : '') . '>' . $value . '</option>';
}
}
$sData .= '</select>';
break;
case "bool":
$sData = '<select name="' . $parameterKeyExt . '">' . '<option value="Y"' . ($arParametersValues[$parameterKey] == "Y" ? ' selected="selected"' : '') . '>' . GetMessage("WD_Y") . '</option>' . '<option value="N"' . ($arParametersValues[$parameterKey] == "N" ? ' selected="selected"' : '') . '>' . GetMessage("WD_N") . '</option>' . '</select>';
break;
case "date":
case "datetime":
$sData = CAdminCalendar::CalendarDate($parameterKeyExt, $arParametersValues[$parameterKey], 19, $arParameter["Type"] == "date");
break;
case "user":
$sData = '<textarea name="' . $parameterKeyExt . '" id="id_' . $parameterKeyExt . '" rows="3" cols="40">' . $arParametersValues[$parameterKey] . '</textarea><input type="button" value="..." onclick="BPAShowSelector(\'id_' . $parameterKeyExt . '\', \'user\');" />';
break;
}
$arFields[] = array("id" => $parameterKeyExt, "required" => $arParameter["Required"], "name" => $arParameter["Name"], "tooltip" => trim($arParameter["Description"]), "type" => "custom", "value" => $sData);
}
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:59,代码来源:template.php
示例2: renderControl
/**
* @param FieldType $fieldType
* @param array $field
* @param mixed $value
* @param bool $allowSelection
* @param int $renderMode
* @return string
*/
protected static function renderControl(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
{
$name = static::generateControlName($field);
$renderResult = '';
if ($renderMode & FieldType::RENDER_MODE_ADMIN) {
require_once $_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/modules/main/interface/init_admin.php';
$renderResult = \CAdminCalendar::calendarDate($name, $value, 19);
} else {
ob_start();
$GLOBALS['APPLICATION']->includeComponent('bitrix:main.calendar', '', array('SHOW_INPUT' => 'Y', 'FORM_NAME' => $field['Form'], 'INPUT_NAME' => $name, 'INPUT_VALUE' => $value, 'SHOW_TIME' => static::getType() == FieldType::DATETIME ? 'Y' : 'N'), false, array('HIDE_ICONS' => 'Y'));
$renderResult = ob_get_contents();
ob_end_clean();
}
return $renderResult;
}
开发者ID:k-kalashnikov,项目名称:geekcon,代码行数:23,代码来源:date.php
示例3: GetMessage
?>
</span>
<input type="button" value="..." onclick="BPAShowSelector('id_absence_from', 'datetime');">
</td>
</tr>
<tr>
<td align="right" width="40%"><span style="color:#FF0000;">*</span> <?php
echo GetMessage("BPSNAA2_PD_CTO");
?>
:</td>
<td width="60%">
<span style="white-space:nowrap;"><input type="text" name="absence_to" id="id_absence_to" size="30" value="<?php
echo htmlspecialcharsbx($arCurrentValues["absence_to"]);
?>
"><?php
echo CAdminCalendar::Calendar("absence_to", "", "", true);
?>
</span>
<input type="button" value="..." onclick="BPAShowSelector('id_absence_to', 'datetime');">
</td>
</tr>
<tr>
<td align="right" width="40%"><span style="color:#FF0000;">*</span> <?php
echo GetMessage("BPSNAA2_PD_CTYPES");
?>
:</td>
<td width="60%">
<select name="absence_type" id="id_absence_type">
<?php
foreach ($arAbsenceTypes as $key => $value) {
?>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:properties_dialog.php
示例4: array
$lAdmin->AddGroupError(GetMessage("IBLIST_A_SAVE_ERROR", array("#ID#" => $ID, "#ERROR_MESSAGE#" => $obE->LAST_ERROR)), $TYPE.$ID);
}
else
{
$lAdmin->AddGroupError(GetMessage("IBLIST_A_UPDERR_ACCESS", array("#ID#" => $ID)), $TYPE.$ID);
}
}
break;
}
}
if(isset($return_url) && strlen($return_url)>0)
LocalRedirect($return_url);
}
$CAdminCalendar_ShowScript = CAdminCalendar::ShowScript();
// List header
$arHeader = array();
if ($bCatalog)
{
$arHeader[] = array(
"id" => "CATALOG_TYPE",
"content" => GetMessage("IBLIST_A_CATALOG_TYPE"),
"title" => GetMessage('IBLIST_A_CATALOG_TYPE_TITLE'),
"align" => "right",
"default" => true,
);
}
//Common
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:iblock_list_admin.php
示例5: htmlspecialcharsbx
echo $i;
?>
" value="<?php
echo htmlspecialcharsbx((string) $arCurrentValues["variable_condition_value_" . $i]);
?>
">
</td>
</tr>
<?php
}
?>
<tr id="bwfvc_addrow_tr">
<td class="adm-detail-content-cell-l"></td>
<td class="adm-detail-content-cell-r">
<?php
echo CAdminCalendar::ShowScript();
?>
<script language="JavaScript">
var bwfvc_arFieldTypes = {<?php
$fl = false;
foreach ($arProperties as $key => $value) {
if ($fl) {
echo ",";
}
echo "'" . CUtil::JSEscape($key) . "':'" . CUtil::JSEscape($value["Type"]) . "'";
$fl = true;
}
foreach ($arVariables as $key => $value) {
if ($fl) {
echo ",";
}
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:properties_dialog.php
示例6: genEditHTML
/**
* Генерирует HTML для редактирования поля
* @see AdminEditHelper::showField();
* @return mixed
*/
protected function genEditHTML()
{
return \CAdminCalendar::CalendarDate($this->getEditInputName(), ConvertTimeStamp(strtotime($this->getValue()), "FULL"), 10, true);
}
开发者ID:Reprezo,项目名称:digitalwand.admin_helper,代码行数:9,代码来源:DateTimeWidget.php
示例7: CalendarPeriod
function CalendarPeriod($sFromName, $sFromVal, $sToName, $sToVal, $sFormName="skform", $show_select="N", $field_select="class=\"typeselect\"", $field_input="class=\"typeinput\"", $size="10")
{
if(class_exists("CAdminCalendar"))
return CAdminCalendar::CalendarPeriod($sFromName, $sToName, $sFromVal, $sToVal, ($show_select=="Y"), $size, ($size > 10));
$arr = array();
$str = "";
if ($show_select=="Y")
{
$sname = $sFromName."_DAYS_TO_BACK";
$str = "
<script type=\"text/javascript\">
function ".$sFromName."_SetDate()
{
var number = document.".$sFormName.".".$sname.".selectedIndex-1;
document.".$sFormName.".".$sFromName.".disabled = false;
if (number>=0)
{
document.".$sFormName.".".$sFromName.".value = dates[number];
document.".$sFormName.".".$sFromName.".disabled = true;
}
}
</script>
";
global $$sname;
$value = $$sname;
if (strlen($value)>0 && $value!="NOT_REF") $ds="disabled";
?><script type="text/javascript">
var dates = new Array();
<?
for ($i=0; $i<=90; $i++)
{
$prev_date = GetTime(time()-86400*$i);
?>dates[<?php
echo $i;
?>
]="<?php
echo $prev_date;
?>
";<?
if (!is_array($arr["reference"])) $arr["reference"] = array();
if (!is_array($arr["reference_id"])) $arr["reference_id"] = array();
$arr["reference"][] = $i." ".GetMessage("TOOLS_DN");
$arr["reference_id"][] = $i;
}
?></script><?
$str .= SelectBoxFromArray($sname, $arr, $value , " ", "onchange=\"".$sFromName."_SetDate()\" ".$field_select);
$str .= " ";
}
$str .=
'<input '.$ds.' '.$field_input.' type="text" name="'.$sFromName.'" id="'.$sFromName.'" size="'.$size.'" value="'.htmlspecialcharsbx($sFromVal).'" /> '."\n".
Calendar($sFromName, $sFormName, $sFromName, $sToName).' ... '."\n".
'<input '.$field_input.' type="text" name="'.$sToName.'" id="'.$sToName.'" size="'.$size.'" value="'.htmlspecialcharsbx($sToVal).'" /> '."\n".
Calendar($sToName, $sFormName, $sFromName, $sToName)."\n";
return '<span style="white-space: nowrap;">'.$str.'</span>';
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:57,代码来源:tools.php
示例8: GetMessage
<td><?php
echo CAdminCalendar::CalendarDate("SUB_ACTIVE_FROM", $str_ACTIVE_FROM, 19, true);
?>
</td>
</tr>
<?php
$tabControl->EndCustomField("SUB_ACTIVE_FROM", '<input type="hidden" id="SUB_ACTIVE_FROM" name="SUB_ACTIVE_FROM" value="' . $str_ACTIVE_FROM . '">');
$tabControl->BeginCustomField("SUB_ACTIVE_TO", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_TO"), $arIBlock["FIELDS"]["ACTIVE_TO"]["IS_REQUIRED"] === "Y");
?>
<tr id="tr_SUB_ACTIVE_TO">
<td><?php
echo $tabControl->GetCustomLabelHTML();
?>
:</td>
<td><?php
echo CAdminCalendar::CalendarDate("SUB_ACTIVE_TO", $str_ACTIVE_TO, 19, true);
?>
</td>
</tr>
<?php
$tabControl->EndCustomField("SUB_ACTIVE_TO", '<input type="hidden" id="SUB_ACTIVE_TO" name="SUB_ACTIVE_TO" value="' . $str_ACTIVE_TO . '">');
if ($arTranslit["TRANSLITERATION"] == "Y") {
$tabControl->BeginCustomField("SUB_NAME", GetMessage("IBLOCK_FIELD_NAME") . ":", true);
?>
<tr id="tr_SUB_NAME">
<td><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td style="white-space: nowrap;">
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:iblock_subelement_edit.php
示例9: GetMessage
</td>
</tr>
<tr id="tr_time_type_selector_time">
<td align="right" width="40%"><?php
echo GetMessage("CPAD_DP_TIME1");
?>
:</td>
<td width="60%">
<?php
$v = "";
$v_x = trim($arCurrentValues["delay_date"]);
if (!preg_match("#^\\{=[a-z0-9_]+:[a-z0-9_]+\\}\$#i", $v_x) && substr($v_x, 0, 1) != "=") {
$v = $v_x;
$v_x = "";
}
require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/init_admin.php";
echo CAdminCalendar::CalendarDate("delay_date", $v, 19, true);
?>
<input type="text" name="delay_date_x" id="id_delay_date_x" value="<?php
echo htmlspecialcharsbx($v_x);
?>
" size="20" />
<input type="button" value="..." onclick="BPAShowSelector('id_delay_date_x', 'datetime');" />
</td>
</tr>
<script type="text/javascript">
SetDelayMode(<?php
echo !array_key_exists("delay_date", $arCurrentValues) ? "true" : "false";
?>
);
</script>
开发者ID:k-kalashnikov,项目名称:geekcon.local,代码行数:31,代码来源:properties_dialog.php
示例10: GetMessage
<td><?php
echo GetMessage("MAIN_EVENTLOG_ID");
?>
:</td>
<td><input type="text" name="find_id" size="47" value="<?php
echo htmlspecialcharsbx($find_id);
?>
"></td>
</tr>
<tr>
<td><?php
echo GetMessage("MAIN_EVENTLOG_TIMESTAMP_X");
?>
:</td>
<td><?php
echo CAdminCalendar::CalendarPeriod("find_timestamp_x_1", "find_timestamp_x_2", $find_timestamp_x_1, $find_timestamp_x_2, false, 15, true);
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("MAIN_EVENTLOG_SEVERITY");
?>
:</td>
<td><?php
echo SelectBoxMFromArray("find_severity[]", array("REFERENCE" => array("SECURITY", "WARNING"), "REFERENCE_ID" => array("SECURITY", "WARNING")), $find_severity, GetMessage("MAIN_ALL"));
?>
</td>
</tr>
<tr>
<td><?php
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:event_log.php
示例11: GetMessage
<td align="right" width="40%"><span class="adm-required-field"><?php
echo GetMessage("BPSNMA_PD_CFROM");
?>
:</span></td>
<td width="60%">
<span style="white-space:nowrap;"><input type="text" name="calendar_from" id="id_calendar_from" size="30" value="<?php
echo htmlspecialcharsbx($arCurrentValues["calendar_from"]);
?>
"><?php
echo CAdminCalendar::Calendar("calendar_from", "", "", true);
?>
</span>
<input type="button" value="..." onclick="BPAShowSelector('id_calendar_from', 'datetime');">
</td>
</tr>
<tr>
<td align="right" width="40%"><span class="adm-required-field"><?php
echo GetMessage("BPSNMA_PD_CTO");
?>
:</span></td>
<td width="60%">
<span style="white-space:nowrap;"><input type="text" name="calendar_to" id="id_calendar_to" size="30" value="<?php
echo htmlspecialcharsbx($arCurrentValues["calendar_to"]);
?>
"><?php
echo CAdminCalendar::Calendar("calendar_to", "", "", true);
?>
</span>
<input type="button" value="..." onclick="BPAShowSelector('id_calendar_to', 'datetime');">
</td>
</tr>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:properties_dialog.php
示例12: Display
//.........这里部分代码省略.........
}
if ($this->pList->bShowActions) {
if (!empty($this->aActions)) {
?>
<td class="adm-list-table-cell adm-list-table-popup-block" onclick="BX.adminSubList.ShowMenu(this.firstChild, this.parentNode.oncontextmenu(), this.parentNode);"><div class="adm-list-table-popup" title="<?php
echo GetMessage("admin_lib_list_actions_title");
?>
"></div></td>
<?php
} else {
?>
<td class="adm-list-table-cell"></td>
<?php
}
}
$bVarsFromForm = $this->bEditMode && is_array($this->pList->arUpdateErrorIDs) && in_array($this->id, $this->pList->arUpdateErrorIDs);
foreach ($this->aHeaders as $id => $header_props) {
if (!in_array($id, $this->pList->arVisibleColumns)) {
continue;
}
$field = $this->aFields[$id];
if ($this->bEditMode && isset($field["edit"])) {
if ($bVarsFromForm && $_REQUEST["FIELDS"]) {
$val = $_REQUEST["FIELDS"][$this->id][$id];
} else {
$val = $this->arRes[$id];
}
$val_old = $this->arRes[$id];
echo '<td class="adm-list-table-cell' . ($header_props['align'] ? ' align-' . $header_props['align'] : '') . ' ' . ($header_props['valign'] ? ' valign-' . $header_props['valign'] : '') . '">';
if (is_array($val_old)) {
foreach ($val_old as $k => $v) {
echo '<input type="hidden" name="FIELDS_OLD[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . '][' . htmlspecialcharsbx($k) . ']" value="' . htmlspecialcharsbx($v) . '">';
}
} else {
echo '<input type="hidden" name="FIELDS_OLD[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']" value="' . htmlspecialcharsbx($val_old) . '">';
}
switch ($field["edit"]["type"]) {
case "checkbox":
echo '<input type="hidden" name="FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']" value="N">';
echo '<input type="checkbox" name="FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']" value="Y"' . ($val == 'Y' ? ' checked' : '') . '>';
break;
case "select":
echo '<select name="FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']"' . $this->__AttrGen($field["edit"]["attributes"]) . '>';
foreach ($field["edit"]["values"] as $k => $v) {
echo '<option value="' . htmlspecialcharsbx($k) . '" ' . ($k == $val ? ' selected' : '') . '>' . htmlspecialcharsex($v) . '</option>';
}
echo '</select>';
break;
case "input":
if (!$field["edit"]["attributes"]["size"]) {
$field["edit"]["attributes"]["size"] = "10";
}
echo '<input type="text" ' . $this->__AttrGen($field["edit"]["attributes"]) . ' name="FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']" value="' . htmlspecialcharsbx($val) . '">';
break;
case "calendar":
if (!$field["edit"]["attributes"]["size"]) {
$field["edit"]["attributes"]["size"] = "10";
}
echo '<span style="white-space:nowrap;"><input type="text" ' . $this->__AttrGen($field["edit"]["attributes"]) . ' name="FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']" value="' . htmlspecialcharsbx($val) . '">';
echo CAdminCalendar::Calendar('FIELDS[' . htmlspecialcharsbx($this->id) . '][' . htmlspecialcharsbx($id) . ']') . '</span>';
break;
default:
echo $field["edit"]['value'];
}
echo '</td>';
} else {
if (!is_array($this->arRes[$id])) {
$val = trim($this->arRes[$id]);
} else {
$val = $this->arRes[$id];
}
switch ($field["view"]["type"]) {
case "checkbox":
if ($val == 'Y') {
$val = GetMessage("admin_lib_list_yes");
} else {
$val = GetMessage("admin_lib_list_no");
}
break;
case "select":
if ($field["edit"]["values"][$val]) {
$val = $field["edit"]["values"][$val];
}
break;
}
if ($field["view"]['type'] == 'html') {
$val = $field["view"]['value'];
} else {
$val = htmlspecialcharsex($val);
}
echo '<td class="adm-list-table-cell' . ($header_props['align'] ? ' align-' . $header_props['align'] : '') . ' ' . ($header_props['valign'] ? ' valign-' . $header_props['valign'] : '') . '">';
echo (string) $val != "" ? $val : ' ';
if ($field["edit"]["type"] == "calendar") {
echo CAdminCalendar::ShowScript();
}
echo '</td>';
}
}
echo '</tr>';
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:subelement.php
示例13: GetMessage
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("DSC_ACTIVE") . ":", false, "Y", $arDiscount['ACTIVE'] == "Y");
$tabControl->AddEditField("NAME", GetMessage("DSC_NAME") . ":", true, array("size" => 50, "maxlength" => 255), htmlspecialcharsbx($arDiscount['NAME']));
$tabControl->AddDropDownField("SITE_ID", GetMessage('DSC_SITE') . ':', true, $arSiteList, $arDiscount['SITE_ID']);
$tabControl->BeginCustomField("PERIOD", GetMessage('DSC_PERIOD') . ":", false);
?>
<tr id="tr_PERIOD">
<td width="40%"><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td width="60%"><?php
$periodValue = '';
if ('' != $arDiscount['ACTIVE_FROM'] || '' != $arDiscount['ACTIVE_TO']) {
$periodValue = CAdminCalendar::PERIOD_INTERVAL;
}
echo CAdminCalendar::CalendarPeriodCustom('ACTIVE_FROM', 'ACTIVE_TO', $arDiscount['ACTIVE_FROM'], $arDiscount['ACTIVE_TO'], true, 19, true, array(CAdminCalendar::PERIOD_EMPTY => GetMessage('BT_CAT_DISCOUNT_EDIT_CALENDARE_PERIOD_EMPTY'), CAdminCalendar::PERIOD_INTERVAL => GetMessage('BT_CAT_DISCOUNT_EDIT_CALENDARE_PERIOD_INTERVAL')), $periodValue);
?>
</td>
</tr><?php
$tabControl->EndCustomField("PERIOD", '<input type="hidden" name="ACTIVE_FROM" value="' . htmlspecialcharsbx($arDiscount['ACTIVE_FROM']) . '">' . '<input type="hidden" name="ACTIVE_TO" value="' . htmlspecialcharsbx($arDiscount['ACTIVE_FROM']) . '">');
$tabControl->BeginCustomField("VALUE_TYPE", GetMessage('DSC_TYPE') . ":", true);
?>
<tr id="tr_VALUE_TYPE" class="adm-detail-required-field">
<td width="40%"><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td width="60%">
<select name="VALUE_TYPE" id="ob_value_type"><?php
foreach (CCatalogDiscount::GetDiscountTypes(true) as $key => $value) {
?>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:cat_discount_edit.php
示例14: AddUserField
/**
* @param $arUserField
* @param $value
* @param CAdminListRow $row
*/
function AddUserField($arUserField, $value, &$row)
{
if($arUserField["USER_TYPE"])
{
$js = $this->ShowScript();
if(is_callable(array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistviewhtml")))
{
if($arUserField["MULTIPLE"] == "N")
{
$html = call_user_func_array(
array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistviewhtml"),
array(
$arUserField,
array(
"NAME" => "FIELDS[".$row->id."][".$arUserField["FIELD_NAME"]."]",
"VALUE" => htmlspecialcharsbx($value),
),
)
);
if($html == '')
$html = ' ';
$row->AddViewField($arUserField["FIELD_NAME"], $html.$js.CAdminCalendar::ShowScript());
}
elseif(is_callable(array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistviewhtmlmulty")))
{
if(is_array($value))
$form_value = $value;
else
$form_value = unserialize($value);
if(!is_array($form_value))
$form_value = array();
foreach($form_value as $key=>$val)
$form_value[$key] = htmlspecialcharsbx($val);
$html = call_user_func_array(
array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistviewhtmlmulty"),
array(
$arUserField,
array(
"NAME" => "FIELDS[".$row->id."][".$arUserField["FIELD_NAME"]."]"."[]",
"VALUE" => $form_value,
),
)
);
if($html == '')
$html = ' ';
$row->AddViewField($arUserField["FIELD_NAME"], $html.$js.CAdminCalendar::ShowScript());
}
else
{
$html = "";
if(is_array($value))
$form_value = $value;
else
$form_value = strlen($value) > 0? unserialize($value): false;
if(!is_array($form_value))
$form_value = array();
foreach($form_value as $i=>$val)
{
if($html!="")
$html .= " / ";
$html .= call_user_func_array(
array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistviewhtml"),
array(
$arUserField,
array(
"NAME" => "FIELDS[".$row->id."][".$arUserField["FIELD_NAME"]."]"."[".$i."]",
"VALUE" => htmlspecialcharsbx($val),
),
)
);
}
if($html == '')
$html = ' ';
$row->AddViewField($arUserField["FIELD_NAME"], $html.$js.CAdminCalendar::ShowScript());
}
}
if($arUserField["EDIT_IN_LIST"]=="Y" && is_callable(array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistedithtml")))
{
if($arUserField["MULTIPLE"] == "N")
{
$html = call_user_func_array(
array($arUserField["USER_TYPE"]["CLASS_NAME"], "getadminlistedithtml"),
array(
$arUserField,
array(
"NAME" => "FIELDS[".$row->id."][".$arUserField["FIELD_NAME"]."]",
"VALUE" => htmlspecialcharsbx($value),
),
)
//.........这里部分代码省略.........
开发者ID:nycmic,项目名称:bittest,代码行数:101,代码来源:usertype.php
示例15: GetAdminListEditHTML
function GetAdminListEditHTML($arUserField, $arHtmlControl)
{
if ($arUserField["EDIT_IN_LIST"] == "Y") {
return CAdminCalendar::CalendarDate($arHtmlControl["NAME"], $arHtmlControl["VALUE"]);
} elseif (strlen($arHtmlControl["VALUE"]) > 0) {
return $arHtmlControl["VALUE"];
} else {
return ' ';
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:10,代码来源:usertypedate.php
示例16: htmlspecialcharsbx
echo htmlspecialcharsbx($Field);
?>
:</td>
<td width="60%"><?php
echo CAdminCalendar::CalendarDate($Field, $arRecord["FULL_" . $Field], 20, true);
?>
<?php
} elseif ($arField["type"] === "date") {
?>
<tr>
<td width="40%"><?php
echo htmlspecialcharsbx($Field);
?>
:</td>
<td width="60%"><?php
echo CAdminCalendar::CalendarDate($Field, $arRecord["SHORT_" . $Field], 10, false);
?>
<?php
} elseif (isset($arField["SELECT"])) {
?>
<tr>
<td width="40%"><?php
echo htmlspecialcharsbx($Field);
?>
:</td>
<td width="60%"><?php
echo SelectBoxFromArray($Field, $arField["SELECT"], $arRecord[$Field], $arField["nullable"] ? "(null)" : "");
?>
</td>
</tr>
<?php
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:perfmon_row_edit.php
示例17: CAdminCalendar
}
$control->BeginCustomField($prefix . 'PERIOD', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_PERIOD'), false);
?>
<tr id="tr_COUPON_PERIOD">
<td width="40%"><?php
echo $control->GetCustomLabelHTML();
?>
</td>
<td width="60%"><?php
$periodValue = '';
$activeFrom = $coupon['ACTIVE_FROM'] instanceof Main\Type\DateTime ? $coupon['ACTIVE_FROM']->toString() : '';
$activeTo = $coupon['ACTIVE_TO'] instanceof Main\Type\DateTime ? $coupon['ACTIVE_TO']->toString() : '';
if ($activeFrom != '' || $activeTo != '') {
$periodValue = CAdminCalendar::PERIOD_INTERVAL;
}
$calendar = new CAdminCalendar();
echo $calendar->CalendarPeriodCustom($prefix . 'ACTIVE_FROM', $prefix . 'ACTIVE_TO', $activeFrom, $activeTo, true, 19, true, array(CAdminCalendar::PERIOD_EMPTY => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_PERIOD_EMPTY'), CAdminCalendar::PERIOD_INTERVAL => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_PERIOD_INTERVAL')), $periodValue);
unset($activeTo, $activeFrom, $periodValue);
?>
</td>
</tr><?php
$control->EndCustomField($prefix . 'PERIOD');
$control->BeginCustomField($prefix . 'USER_ID', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_USER_ID'), false);
?>
<tr id="tr_USER_ID">
<td width="40%"><?php
echo $control->GetCustomLabelHTML();
?>
</td>
<td width="60%"><?php
echo FindUserID($prefix . 'USER_ID', $coupon['USER_ID'] > 0 ? $coupon['USER_ID'] : '', '', $couponFormID);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:discount_coupon_edit.php
示例18: GetPropertyFieldHtml
public static function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName)
{
return CAdminCalendar::CalendarDate($strHTMLControlName["VALUE"], $value["VALUE"], 20, false) . ($arProperty["WITH_DESCRIPTION"] == "Y" && '' != trim($strHTMLControlName["DESCRIPTION"]) ? ' <input type="text" size="20" name="' . $strHTMLControlName["DESCRIPTION"] . '" value="' . htmlspecialcharsbx($value["DESCRIPTION"]) . '">' : '');
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:4,代码来源:prop_date.php
示例19: GetJSFunctionsForFields
public function GetJSFunctionsForFields($documentType, $objectName, $arDocumentFields = array(), $arDocumentFieldTypes = array())
{
$iblockId = intval(substr($documentType, strlen("type_")));
if ($iblockId <= 0) {
return "";
}
ob_start();
echo CAdminCalendar::ShowScript();
?>
<script type="text/javascript">
<?php
echo $objectName;
?>
.GetGUIFieldEdit = function(field, value, showAddButton, inputName)
{
alert("Deprecated method GetGUIFieldEdit used");
if (!this.arDocumentFields[field])
return "";
if (typeof showAddButton == "undefined")
showAddButton = false;
if (typeof inputName == "undefined")
inputName = field;
var type = this.arDocumentFields[field]["Type"];
var bAddSelection = false;
var bAddButton = true;
s = "";
if (type == "N")
{
s += '<input type="text" size="10" id="id_' + field + '" name="' + inputName + '" value="' + this.HtmlSpecialChars(value) + '">';
}
else if (type == "L")
{
s += '<select name="' + inputName + '_1">';
s += '<option value=""></option>';
for (k in this.arDocumentFields[field]["Options"])
{
s += '<option value="' + this.arDocumentFields[field]["Options"][k][0] + '"' + (value == this.arDocumentFields[field]["Options"][k][0] ? " selected" : "") + '>' + this.arDocumentFields[field]["Options"][k][1] + '</option>';
if (value == this.arDocumentFields[field]["Options"][k][0])
value = "";
}
s += '</select>';
bAddSelection = true;
}
else if (type == "F")
{
s += '<input type="file" id="id_' + field + '_1" name="' + inputName + '">';
bAddSelection = true;
bAddButton = true;
}
else if (type == "B")
{
s += '<select name="' + inputName + '_1" id="id_' + name + '">';
s += '<option value=""></option>';
s += '<option value="Y"' + (value == "Y" ? " selected" : "") + '><?php
echo GetMessage("BPVDX_YES");
?>
</option>';
s += '<option value="N"' + (value == "N" ? " selected" : "") + '><?php
echo GetMessage("BPVDX_NO");
?>
</option>';
s += '</select>';
bAddSelection = true;
if (value == "Y" || value == "N")
value = "";
}
else if (type == "S:DateTime")
{
s += '<span style="white-space:nowrap;">';
s += '<input type="text" name="' + inputName + '" id="id_' + field + '" size="10" value="' + this.HtmlSpecialChars(value) + '">';
s += '<a href="javascript:void(0);" title="<?php
echo GetMessage("BPVDX_CALENDAR");
?>
">';
s += '<img src="<?php
echo ADMIN_THEMES_PATH;
?>
/<?php
echo ADMIN_THEME_ID;
?>
/images/calendar/icon.gif" alt="<?php
echo GetMessage("BPVDX_CALENDAR");
?>
" class="calendar-icon" onclick="jsAdminCalendar.Show(this, \'' + inputName + '\', \'\', \'\', ' + ((type == "datetime") ? 'true' : 'false') + ', <?php
echo time() + date("Z") + CTimeZone::GetOffset();
?>
);" onmouseover="this.className+=\' calendar-icon-hover\';" onmouseout="this.className = this.className.replace(/\s*calendar-icon-hover/ig, \'\');">';
s += '</a></span>';
}
//else if (type.substr(0, 2) == "S:" && this.arUserTypes[type.substr(2)])
//{
// s += eval(this.arUserTypes[type.substr(2)] + "(\"" + field + "\", \"" + value + "\")");
//}
else // type == "S"
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:virtualdocument.php
-
mchorse/aperture: Advanced Minecraft camera mod
阅读:426|2022-08-16
-
kojino/Harvard-Robust-Machine-Learning: Repository for CS282R: Robust Machine Le
阅读:759|2022-08-18
-
marcoscgdev/DialogSheet: An Android library to create fully material designed bo
阅读:632|2022-08-18
-
小程序C#后台获取openID错误:40029 真正解决:
//拼接字符串不能再加单引号,否则4002
阅读:557|2022-07-18
-
挨打的读音是什么?很多人在拼音的时候导致错误,这是因为挨为多音字,读i,还有读音ā
阅读:984|2022-11-06
-
sean-lin/protoc-gen-lua: Google's Protocol Buffers project, ported to Lua
阅读:348|2022-08-16
-
lizhuohua/linux-kernel-module-rust
阅读:510|2022-08-15
-
updownpress/markdown-lint: Markdown Lint Tool / Checker Documentation by Mark Ha
阅读:818|2022-08-18
-
creativetimofficial/material-dashboard: Material Dashboard - Open Source Bootstr
阅读:434|2022-08-17
-
当加载下一页数据时突然报这个错误 出现这个错误的原因一般都是类型不是string,所以
阅读:918|2022-07-18
|
请发表评论