当前位置: 首页>>代码示例>>PHP>>正文


PHP CAdminCalendar::Calendar方法代码示例

本文整理汇总了PHP中CAdminCalendar::Calendar方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminCalendar::Calendar方法的具体用法?PHP CAdminCalendar::Calendar怎么用?PHP CAdminCalendar::Calendar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAdminCalendar的用法示例。


在下文中一共展示了CAdminCalendar::Calendar方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Display


//.........这里部分代码省略.........
					($id === $last_id? ' adm-list-table-cell-last': ''),
				'">';

				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':'').'>'.htmlspecialcharsbx($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;
					case "file":
						echo CFileInput::Show(
							'FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']',
							$val,
							$field["edit"]["showInfo"],
							$field["edit"]["inputs"]
						);
						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];

				if(isset($field["view"]))
				{
					switch($field["view"]["type"])
					{
						case "checkbox":
							if($val=='Y')
								$val = htmlspecialcharsex(GetMessage("admin_lib_list_yes"));
							else
								$val = htmlspecialcharsex(GetMessage("admin_lib_list_no"));
							break;
						case "select":
开发者ID:ASDAFF,项目名称:open_bx,代码行数:67,代码来源:admin_lib.php

示例2: 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

示例3: Calendar

function Calendar($sFieldName, $sFormName="skform", $sFromName="", $sToName="")
{
	if(class_exists("CAdminCalendar"))
		return CAdminCalendar::Calendar($sFieldName, $sFromName, $sToName);

	static $bCalendarCode = false;
	$func = "";
	if(!$bCalendarCode)
	{
		$bCalendarCode = true;
		$func =
			"<script type=\"text/javascript\">\n".
			"<!--\n".
			"window.Calendar = function(params, dateVal)\n".
			"{\n".
			"	var left, top;\n".
			"	var width = 180, height = 160;\n".
			"	if('['+typeof(window.event)+']' == '[object]')\n".
			"	{\n".
			"		top = (window.event.screenY+20+height>screen.height-40? window.event.screenY-45-height:window.event.screenY+20);\n".
			"		left = (window.event.screenX-width/2);\n".
			"	}\n".
			"	else\n".
			"	{\n".
			"		top = Math.floor((screen.height - height)/2-14);\n".
			"		left = Math.floor((screen.width - width)/2-5);\n".
			"	}\n".
			"	window.open('/bitrix/tools/calendar.php?lang=".LANGUAGE_ID.(defined("ADMIN_SECTION") && ADMIN_SECTION===true?"&admin_section=Y":"&admin_section=N")."&'+params+'&date='+escape(dateVal)+'&initdate='+escape(dateVal),'','scrollbars=no,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);\n".
			"}\n".
			"//-->\n".
			"</script>\n";
	}
	return $func."<a href=\"javascript:void(0);\" onclick=\"window.Calendar('name=".urlencode($sFieldName)."&amp;from=".urlencode($sFromName)."&amp;to=".urlencode($sToName)."&amp;form=".urlencode($sFormName)."', document['".$sFormName."']['".$sFieldName."'].value);\" title=\"".GetMessage("TOOLS_CALENDAR")."\"><img src=\"".BX_ROOT."/images/icons/calendar.gif\" alt=\"".GetMessage("TOOLS_CALENDAR")."\" width=\"15\" height=\"15\" border=\"0\" /></a>";
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:34,代码来源:tools.php

示例4: BuildDialogContent


//.........这里部分代码省略.........
:</label></td>
				<td class="bxfm-d-value">
					<select id="bx_search_date_sel" name="bx_search_date_sel">
						<option value=""> - <?php 
        echo GetMessage("FM_UTIL_NO_VAL");
        ?>
 - </option>
						<option value="day"><?php 
        echo GetMessage("FM_UTIL_DAY");
        ?>
</option>
						<option value="week"><?php 
        echo GetMessage("FM_UTIL_WEEK");
        ?>
</option>
						<option value="month"><?php 
        echo GetMessage("FM_UTIL_MONTH");
        ?>
</option>
						<option value="year"><?php 
        echo GetMessage("FM_UTIL_YEAR");
        ?>
</option>
						<option value="set"><?php 
        echo GetMessage("FM_UTIL_SET_EXACTLY");
        ?>
</option>
					</select>
					<div id="bx_search_date_div" class="bxfm-d-adjust-div">
					<?php 
        echo GetMessage("FM_UTIL_FROM");
        ?>
: <input name="bx_search_date_from" id="bx_search_date_from" value="" style="width: 90px;" type="text"/><?php 
        echo CAdminCalendar::Calendar("bx_search_date_from", "bx_search_form");
        ?>
					<?php 
        echo GetMessage("FM_UTIL_TO");
        ?>
: <input name="bx_search_date_to" id="bx_search_date_to" value="" style="width: 90px;" type="text"/><?php 
        echo CAdminCalendar::Calendar("bx_search_date_to", "bx_search_form");
        ?>
					</div>
				</td>
			</tr>
			<tr class="bxfm-add-hide" title="<?php 
        echo GetMessage("FM_UTIL_SIZE_TITLE");
        ?>
">
				<td class="bxfm-d-label"><label for="bx_search_size_sel"><?php 
        echo GetMessage("FM_UTIL_SIZE");
        ?>
:</label></td>
				<td class="bxfm-d-value">
				<select id="bx_search_size_sel" name="bx_search_size_sel">
					<option value=""> - <?php 
        echo GetMessage("FM_UTIL_NO_VAL");
        ?>
 - </option>
					<option value="100"><?php 
        echo GetMessage("FM_UTIL_SIZE_100");
        ?>
</option>
					<option value="100_500"><?php 
        echo GetMessage("FM_UTIL_SIZE_100_500");
        ?>
</option>
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:67,代码来源:fileman_utils.php

示例5: 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

示例6: 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 : '&nbsp;';
                if ($field["edit"]["type"] == "calendar") {
                    echo CAdminCalendar::ShowScript();
                }
                echo '</td>';
            }
        }
        echo '</tr>';
    }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:subelement.php


注:本文中的CAdminCalendar::Calendar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。