function Display() { $sDefAction = $sDefTitle = ""; if(!$this->bEditMode) { if(!empty($this->link)) { $sDefAction = "BX.adminPanel.Redirect([], '".CUtil::JSEscape($this->link)."', event);"; $sDefTitle = $this->title; } else { $this->aActions = array_values($this->aActions); foreach($this->aActions as $action) { if($action["DEFAULT"] == true) { $sDefAction = $action["ACTION"] ? htmlspecialcharsbx($action["ACTION"]) : "BX.adminPanel.Redirect([], '".CUtil::JSEscape($action["LINK"])."', event)" ; $sDefTitle = (!empty($action["TITLE"])? $action["TITLE"]:$action["TEXT"]); break; } } } } $sMenuItems = ""; if(!empty($this->aActions)) $sMenuItems = htmlspecialcharsbx(CAdminPopup::PhpToJavaScript($this->aActions)); ?> <tr class="adm-list-table-row<?php echo isset($this->aFeatures["footer"]) && $this->aFeatures["footer"] == true ? ' footer' : ''; echo $this->bEditMode ? ' adm-table-row-active' : ''; ?> "<?php echo $sMenuItems != "" ? ' oncontextmenu="return ' . $sMenuItems . ';"' : ''; echo $sDefAction != "" ? ' ondblclick="' . $sDefAction . '"' . (!empty($sDefTitle) ? ' title="' . GetMessage("admin_lib_list_double_click") . ' ' . $sDefTitle . '"' : '') : ''; ?> > <? if(count($this->pList->arActions)>0 || $this->pList->bCanBeEdited): $check_id = RandString(5); ?> <td class="adm-list-table-cell adm-list-table-checkbox adm-list-table-checkbox-hover<?php echo $this->bReadOnly ? ' adm-list-table-checkbox-disabled' : ''; ?> "><input type="checkbox" class="adm-checkbox adm-designed-checkbox" name="ID[]" id="<?php echo $this->table_id . "_" . $this->id . "_" . $check_id; ?> " value="<?php echo $this->id; ?> " autocomplete="off" title="<?php echo GetMessage("admin_lib_list_check"); ?> "<?php echo $this->bReadOnly ? ' disabled="disabled"' : ''; echo $this->bEditMode ? ' checked="checked" disabled="disabled"' : ''; ?> /><label class="adm-designed-checkbox-label adm-checkbox" for="<?php echo $this->table_id . "_" . $this->id . "_" . $check_id; ?> "></label></td> <? endif; if($this->pList->bShowActions): if(!empty($this->aActions)): ?> <td class="adm-list-table-cell adm-list-table-popup-block" onclick="BX.adminList.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> <? else: ?> <td class="adm-list-table-cell"></td> <? endif; endif; end($this->pList->aVisibleHeaders); $last_id = key($this->pList->aVisibleHeaders); reset($this->pList->aVisibleHeaders); $bVarsFromForm = ($this->bEditMode && is_array($this->pList->arUpdateErrorIDs) && in_array($this->id, $this->pList->arUpdateErrorIDs)); foreach($this->pList->aVisibleHeaders as $id=>$header_props) { $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', (isset($header_props['align']) && $header_props['align']? ' align-'.$header_props['align']: ''), (isset($header_props['valign']) && $header_props['valign']? ' valign-'.$header_props['valign']: ''), ($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": if($field["edit"]["values"][$val]) $val = htmlspecialcharsex($field["edit"]["values"][$val]); break; case "file": if ($val > 0) $val = CFileInput::Show( 'NO_FIELDS['.htmlspecialcharsbx($this->id).']['.htmlspecialcharsbx($id).']', $val, $field["view"]["showInfo"], $field["view"]["inputs"] ); else $val = ''; break; case "html": $val = $field["view"]['value']; break; default: $val = htmlspecialcharsex($val); break; } } else { $val = htmlspecialcharsex($val); } echo '<td class="adm-list-table-cell', (isset($header_props['align']) && $header_props['align']? ' align-'.$header_props['align']: ''), (isset($header_props['valign']) && $header_props['valign']? ' valign-'.$header_props['valign']: ''), ($id === $last_id? ' adm-list-table-cell-last': ''), '">'; echo ((string)$val <> ""? $val: ' '); if(isset($field["edit"]) && $field["edit"]["type"] == "calendar") CAdminCalendar::ShowScript(); echo '</td>'; } } ?> </tr> <? }
?> </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) { ?>
?> </span> <input type="button" value="..." onclick="BPAShowSelector('id_task_active_from', 'datetime');"> </td> </tr> <tr> <td align="right" width="40%"><?php echo GetMessage("BPTA1A_TASKACTIVETO"); ?> :</td> <td width="60%"> <span style="white-space:nowrap;"><input type="text" name="task_active_to" id="id_task_active_to" size="30" value="<?php echo htmlspecialcharsbx($arCurrentValues["task_active_to"]); ?> "><?php echo CAdminCalendar::Calendar("task_active_to", "", "", true); ?> </span> <input type="button" value="..." onclick="BPAShowSelector('id_task_active_to', 'datetime');"> </td> </tr> <tr> <td align="right" width="40%"><span style="color:#FF0000;">*</span> <?php echo GetMessage("BPTA1A_TASKNAME"); ?> :</td> <td width="60%"> <input type="text" name="task_name" id="id_task_name" value="<?php echo htmlspecialcharsbx($arCurrentValues["task_name"]); ?> " size="50">
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)."&from=".urlencode($sFromName)."&to=".urlencode($sToName)."&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>"; }
public static function BuildDialogContent($site) { global $APPLICATION; $actUri = $APPLICATION->GetCurPage() . "?search=Y&ssess=" . CFilemanSearch::GetSearchSess(); $s = DeleteParam(array('search', 'ssess')); if ($s != '') { $actUri .= '&' . $s; } $defMask = COption::GetOptionString("fileman", "search_mask", "*.php"); // Search dialog $aTabs[] = array("DIV" => "bx_fm_tab_search", "TAB" => GetMessage("FM_UTIL_FIND"), "ICON" => "", "TITLE" => GetMessage("FM_UTIL_FIND_TITLE"), "ONSELECT" => "window.oFMSearch.SetTab('search');"); $aTabs[] = array("DIV" => "bx_fm_tab_replace", "TAB" => GetMessage("FM_UTIL_REPLACE"), "ICON" => "", "TITLE" => GetMessage("FM_UTIL_REPLACE_TITLE"), "ONSELECT" => "window.oFMSearch.SetTab('replace');"); $searchTabControl = new CAdmintabControl("searchTabControl", $aTabs, false, true); $searchTabControl->SetPublicMode('oSearchDialog'); $searchTabControl->Begin(); ?> <?php $searchTabControl->BeginNextTab(); ?> <tr><td> <div id="bx_search_cont" class="bxfm-search-cont"><form name="bx_search_form" action="<?php echo $actUri; ?> " method="POST"> <table id="bx_fms_tbl" class="bxfm-d-params bxfm-d-params-add-hide"> <tr id="bx_search_in_res_tr"> <td class="bxfm-d-label"><input id="bx_search_in_res" type="checkbox" value="Y" checked="checked" /></td> <td class="bxfm-d-value"><label for="bx_search_in_res" style="font-weight: bold;"><?php echo GetMessage("FM_UTIL_IN_SEARCH_RESULT"); ?> </label></td> </tr> <tr title='<?php echo GetMessage("FM_UTIL_FILE_NAME_TITLE"); ?> '> <td class="bxfm-d-label"><label for="bx_search_file"><?php echo GetMessage("FM_UTIL_FILE_NAME"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_file" name="bx_search_file" value="<?php echo $defMask; ?> " style="width: 220px;" type="text"/></td> </tr> <tr title="<?php echo GetMessage("FM_UTIL_PHRASE_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_phrase"><?php echo GetMessage("FM_UTIL_PHRASE"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_phrase" name="bx_search_phrase" value="" style="width: 220px;" type="text"/></td> </tr> <tr class="bxfm-d-only-replace" title="<?php echo GetMessage("FM_UTIL_REPLACE_INP_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_replace_phrase"><?php echo GetMessage("FM_UTIL_REPLACE_INP"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_replace_phrase" name="bx_replace_phrase" value="" style="width: 220px;" type="text"/></td> </tr> <tr title="<?php echo GetMessage("FM_UTIL_DIR_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_dir"><?php echo GetMessage("FM_UTIL_DIR"); ?> :</label></td> <td class="bxfm-d-value"><input id="bx_search_dir" name="bx_search_dir" value="" style="width: 220px;" type="text"/> <input id="bx_search_fd_but" type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_SearchDirOpen(true, {site: window.oFMSearch.oSiteSel.value, path: window.oFMSearch.pSearchDir.value});" /><span class="bxfm-site-sel" id="bx_search_site_sel"></span></td> </tr> <tr> <td class="bxfm-d-label"><label for="bx_search_subdir"><?php echo GetMessage("FM_UTIL_INCLUDE_SUBFOLDER"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_subdir" name="bx_search_subdir" type="checkbox" value="Y" checked="checked" /></td> </tr> <tr class="bxfm-d-title"> <td colSpan="2"> <a class="bxfm-add-link" id="bx_fms_add_lnk" href="javascript: void(0);"><?php echo GetMessage("FM_UTIL_ADDITIONAL"); ?> <span class="bxfm-d-span-hide">(<?php echo GetMessage("FM_UTIL_HIDE"); ?> )</span></a> </td> </tr> <tr class="bxfm-add-hide" title="<?php echo GetMessage("FM_UTIL_DATE_TITLE"); ?> "> <td class="bxfm-d-label"><label for="bx_search_date_sel"><?php echo GetMessage("FM_UTIL_DATE"); ?> :</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> <option value="500"><?php echo GetMessage("FM_UTIL_SIZE_500"); ?> </option> <option value="set"><?php echo GetMessage("FM_UTIL_SET_EXACTLY"); ?> </option> </select> <div id="bx_search_size_div" class="bxfm-d-adjust-div"> <?php echo GetMessage("FM_UTIL_SIZE_FROM"); ?> : <input id="bx_search_size_from" name="bx_search_size_from" value="" style="width: 70px;" type="text"/><?php echo GetMessage("FM_UTIL_KB"); ?> <?php echo GetMessage("FM_UTIL_SIZE_TO"); ?> : <input id="bx_search_size_to" name="bx_search_size_to" value="" style="width: 70px;" type="text"/><?php echo GetMessage("FM_UTIL_KB"); ?> </div> </td> </tr> <tr class="bxfm-add-hide bxfm-d-only-search"> <td class="bxfm-d-label"><label for="bx_search_dirs_too"><?php echo GetMessage("FM_UTIL_SEARCH_DIRS"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_dirs_too" name="bx_search_dirs_too" type="checkbox" value="Y" checked="checked" /></td> </tr> <tr class="bxfm-add-hide-TEMP" style="display: none;"> <td class="bxfm-d-label"><label for="bx_search_entire"><?php echo GetMessage("FM_UTIL_ENTIRE"); ?> </label></td> <td class="bxfm-d-value"><input id="bx_search_entire" type="checkbox" value="Y" /></td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"><label for="bx_search_case"><?php echo GetMessage("FM_UTIL_CASE_SENS"); ?> </td> <td class="bxfm-d-value"><input id="bx_search_case" name="bx_search_case" type="checkbox" value="Y" /></label></td> </tr> </table> <input type="hidden" name="search" value="Y" /> <div id="bx_search_res_cont"></div> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_SearchDirOpen", "arResultDest" => array("ELEMENT_ID" => "bx_search_dir"), "arPath" => array("SITE" => $site, "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </form></div> </td></tr> <?php $searchTabControl->BeginNextTab(); ?> <tr><td> <div id="bx_replace_cont" class="bxfm-replace-cont"></div> </td></tr> <?php $searchTabControl->End(); // *** Copy / move dialog *** ?> <div id="bx_copy_dialog" class="bx-copy-cont"> <table class="bx-copy-cont-tbl bx-copy-cont-tbl-add-hide" id="bx_copy_table" style="width: 470px;"> <tr> <td class="bxfm-d-label"><label for="bx_copy_file_list"><?php echo GetMessage("FM_UTIL_FILE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_copy_file_list" style="margin-top: 2px;"><div></td> </tr> <tr> <td class="bxfm-d-label"><label for="bx_copy_to"><?php echo GetMessage("FM_COPY_TO"); ?> :</label></td> <td class="bxfm-d-value"> <div style="width: 340px;"> <input id="bx_copy_to" style="width: 255px;" value="/" type="text" /><input type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_CopyMoveOpen(true, {site: window.oBXFMCopy.oSiteSel.value, path: window.oBXFMCopy.oCopyTo.pInput.value});" /> <span class="bxfm-site-sel" id="bx_copy_site_sel"></span> </div> </td> </tr> <tr class="bx-copy-d-title"> <td colSpan="2"> <a class="bx-copy-add-link" id="bx_copy_add_lnk" href="javascript: void(0);"><?php echo GetMessage("FM_UTIL_ADDITIONAL"); ?> <span class="bx-copy-d-span-hide">(<?php echo GetMessage("FM_UTIL_HIDE"); ?> )</span></a> </td> </tr> <tr class="bxfm-add-hide"> <td colSpan="2" style="padding: 5px 0 5px 120px !important;"><?php echo GetMessage("FM_COPY_COINCID"); ?> :</td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_ask_user" type="radio" name="bx_copy_coincidence" value="ask" checked="checked"/> </td> <td class="bxfm-d-value"> <label for="bx_copy_ask_user"><?php echo GetMessage("FM_COPY_ASK_USER"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_replace" type="radio" name="bx_copy_coincidence" value="replace" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_replace"><?php echo GetMessage("FM_COPY_REPLACE"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_auto_rename" type="radio" name="bx_copy_coincidence" value="auto_rename" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_auto_rename"><?php echo GetMessage("FM_COPY_AUTO_RENAME"); ?> </label> </td> </tr> <tr class="bxfm-add-hide"> <td class="bxfm-d-label"> <input id="bx_copy_skip" type="radio" name="bx_copy_coincidence" value="skip" /> </td> <td class="bxfm-d-value"> <label for="bx_copy_skip"><?php echo GetMessage("FM_COPY_SKIP"); ?> </label> </td> </tr> </table> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_CopyMoveOpen", "arResultDest" => array("ELEMENT_ID" => "bx_copy_to"), "arPath" => array("SITE" => $GLOBALS['site'], "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </div> <div id="bx_copy_ask_dialog" class="bx-copy-cont"> <div style="margin: 0 70px 0 70px; width: 460px; padding: 10px 0 5px;"> <?php echo GetMessage("FM_UTIL_FILE_EXIST", array("#NAME#" => "<span id='bx_copy_ask_file_name'>#NAME#</span>", "#FOLDER#" => "<span id='bx_copy_ask_folder'>#FOLDER#</span>")); ?> : </div> <div style="margin: 0 50px;"> <table class="bx-copy-compare-tbl"> <tr class="bx-copy-title"> <td><?php echo GetMessage("FM_UTIL_NEW_FILE"); ?> :</td> <td rowSpan="4" class="bx-copy-sep-td"></td> <td><?php echo GetMessage("FM_UTIL_ORIGINAL_FILE"); ?> :</td> </tr> <tr> <td> <div class="bx-copy-name-cnt"> <a id="bx_copy_ask_file1" href="javascript:void();">file1</a> <div id="bxc_ask_nn_cont1" class="bx-copy-new-name bxcnn-0"></div> </div> </td> <td> <div class="bx-copy-name-cnt"><a id="bx_copy_ask_file2" href="javascript:void();">file2</a></div> </td> </tr> <tr id="bx_copy_ask_size_row"> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_copy_ask_size1"></span></td> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_copy_ask_size2"></span></td> </tr> <tr class="bx-copy-bottom"> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_copy_ask_date1"></span></td> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_copy_ask_date2"></span></td> </tr> </table> </div> </div> <?php $searchTabControl->BeginNextTab(); // *** Pack / unpack dialog *** ?> <div id="bx_pack_dialog" class="bx-pack-cont"> <table class="bx-pack-cont-tbl bx-pack-cont-tbl-add-hide" id="bx_pack_table" style="width: 470px;"> <tr> <td class="bxfm-d-label"><label for="bx_pack_file_list"><?php echo GetMessage("FM_PACK_FILE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_pack_file_list" style="margin-top: 2px;"><div></td> </tr> <tr id="bxfm-arctype-line"> <td class="bxfm-d-label"><label for="bx_pack_arc_type"><?php echo GetMessage("FM_PACK_ARC_TYPE"); ?> :</label></td> <td class="bxfm-d-value"><div id="bx_pack_arc_type" class="bxfm-arctype-sel" style="margin-top: 4px;"><div></td> </tr> <tr> <!-- if pack "to archive", if not - "to folder" --> <td class="bxfm-d-label"><label for="bx_pack_to"><?php echo GetMessage("FM_PACK_TO"); ?> :</label></td> <td class="bxfm-d-value"> <div style="width: 340px;"> <input id="bx_pack_to" style="width: 260px;" value="/" type="text"/> <input type="button" value="..." title="<?php echo GetMessage('FD_OPEN_DIR'); ?> " onclick="FMFD_PackUnpackOpen(true, {site: window.oBXFMPack.oSiteSel.value, path: window.oBXFMPack.GetFolderPath(window.oBXFMPack.oPackTo.pInput.value)});" /> <span class="bxfm-site-sel" id="bx_pack_site_sel"></span> </div> </td> </tr> <tr class="bx-pack-d-title" id="bx-pack-d-title-label"> <td></td> <td><?php echo GetMessage("FM_PACK_ADDITIONAL"); ?> </td> </tr> <!--<tr class="bxfm-add-hide" id="bxfm-pack-option-ask"> <td class="bxfm-d-label"> <input id="bx_pack_ask_user" type="radio" name="bx_pack_coincidence" value="ask" checked="checked"/> </td> <td class="bxfm-d-value"> <label for="bx_pack_ask_user"><?php echo GetMessage("FM_PACK_ASK_USER"); ?> </label> </td> </tr>--> <tr class="bxfm-add-hide" id="bxfm-pack-option-replace"> <td class="bxfm-d-label"> <input id="bx_pack_replace" type="radio" name="bx_pack_coincidence" value="replace" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_replace"><?php echo GetMessage("FM_PACK_REPLACE"); ?> </label> </td> </tr> <!--<tr class="bxfm-add-hide" id="bxfm-pack-option-rename"> <td class="bxfm-d-label"> <input id="bx_pack_auto_rename" type="radio" name="bx_pack_coincidence" value="auto_rename" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_auto_rename"><?php echo GetMessage("FM_PACK_AUTO_RENAME"); ?> </label> </td> </tr>--> <tr class="bxfm-add-hide" id="bxfm-pack-option-skip"> <td class="bxfm-d-label"> <input id="bx_pack_skip" type="radio" name="bx_pack_coincidence" value="skip" /> </td> <td class="bxfm-d-value"> <label for="bx_pack_skip"><?php echo GetMessage("FM_PACK_SKIP"); ?> </label> </td> </tr> </table> <?php CAdminFileDialog::ShowScript(array("event" => "FMFD_PackUnpackOpen", "arResultDest" => array("FUNCTION_NAME" => "MakeArchivePathFromFolderPath"), "arPath" => array("SITE" => $GLOBALS['site'], "PATH" => "/"), "select" => 'D', "operation" => 'O', "showUploadTab" => false, "showAddToMenuTab" => false, "allowAllFiles" => false, "SaveConfig" => true)); ?> </div> <script type="text/javascript"> function MakeArchivePathFromFolderPath(filename, path, site) { var oldArchivePath = BX('bx_pack_to').value, newArchivePath, archiveName; archiveName = oldArchivePath.substr(oldArchivePath.lastIndexOf('/') + 1); newArchivePath = "/" + path + "/" + filename + "/" + archiveName; newArchivePath = newArchivePath.replace(/[\/]+$/g, ""); newArchivePath = newArchivePath.replace(/[\/]+/g, '/'); newArchivePath = newArchivePath.replace(/[\\]+/g, '/'); if (newArchivePath == '') newArchivePath = '/'; BX('bx_pack_to').value = newArchivePath; } </script> <div id="bx_pack_ask_dialog" class="bx-pack-cont"> <div style="margin: 0 20px 0 20px; width: 450px; padding: 10px 0 5px;"> <?php echo GetMessage("FM_UTIL_FILE_EXIST", array("#NAME#" => "<span id='bx_pack_ask_file_name'>#NAME#</span>", "#FOLDER#" => "<span id='bx_pack_ask_folder'>#FOLDER#</span>")); ?> : </div> <table style="margin: 0 20px 0 20px"> <tr> <td> <div class="bx-pack-name-cnt"> <a id="bx_pack_ask_file2" href="javascript:void('');">file1</a> <div id="bxc_ask_nn_cont2" class="bx-pack-new-name bxcnn-0"></div> </div> </td> </tr> <tr id="bx_pack_ask_size_row"> <td><?php echo GetMessage("FM_UTIL_SIZE"); ?> : <span id="bx_pack_ask_size2"></span></td> </tr> <tr class="bx-pack-bottom"> <td><?php echo GetMessage("FM_UTIL_DATE"); ?> : <span id="bx_pack_ask_date2"></span></td> </tr> </table> <br/> </div><?php }
<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>
function Display() { $sDefAction = $sDefTitle = ""; if (!$this->bEditMode) { if (!empty($this->link)) { if (true == $this->boolBX) { $sDefAction = "(new BX.CAdminDialog({\n\t\t\t\t\t\t'content_url': '" . $this->link . (!(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1) ? '&bxsku=Y' : '') . "&bxpublic=Y&" . bitrix_sessid_get() . "',\n\t\t\t\t\t\t'content_post': 'from_module=iblock',\n\t\t\t\t\t\t'draggable': true,\n\t\t\t\t\t\t'resizable': true,\n\t\t\t\t\t\t'buttons': [BX.CAdminDialog.btnSave, BX.CAdminDialog.btnCancel]\n\t\t\t\t\t})).Show();"; } else { $sDefAction = "BX.adminPanel.Redirect([], '" . CUtil::JSEscape($this->link) . "', event);"; } $sDefTitle = $this->title; } else { foreach ($this->aActions as $action) { if ($action["DEFAULT"] == true) { if (true == $this->boolBX) { $sDefAction = "(new BX.CAdminDialog({\n\t\t\t\t\t\t'content_url': '" . CUtil::addslashes($action["ACTION"]) . "',\n\t\t\t\t\t\t'content_post': '" . (!(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1) ? '&bxsku=Y' : '') . "&bxpublic=Y&from_module=iblock&" . bitrix_sessid_get() . "',\n\t\t\t\t\t\t'draggable': true,\n\t\t\t\t\t\t'resizable': true,\n\t\t\t\t\t\t'buttons': [BX.CAdminDialog.btnSave, BX.CAdminDialog.btnCancel]\n\t\t\t\t\t})).Show();"; } else { $sDefAction = $action["ACTION"] ? htmlspecialcharsbx($action["ACTION"]) : "BX.adminPanel.Redirect([], '" . CUtil::JSEscape($action["LINK"]) . "', event)"; } $sDefTitle = !empty($action["TITLE"]) ? $action["TITLE"] : $action["TEXT"]; break; } } } } $sMenuItems = ""; if (!empty($this->aActions)) { $sMenuItems = htmlspecialcharsbx(CAdminPopup::PhpToJavaScript($this->aActions)); } $aUserOpt = CUserOptions::GetOption("global", "settings"); ?> <tr class="adm-list-table-row<?php echo isset($this->aFeatures["footer"]) && $this->aFeatures["footer"] == true ? ' footer' : ''; echo $this->bEditMode ? ' adm-table-row-active' : ''; ?> "<?php echo $sMenuItems != "" && $aUserOpt["context_menu"] != "N" ? ' oncontextmenu="return ' . $sMenuItems . ';"' : ''; echo $sDefAction != "" ? ' ondblclick="' . $sDefAction . '"' . (!empty($sDefTitle) ? ' title="' . GetMessage("admin_lib_list_double_click") . ' ' . $sDefTitle . '"' : '') : ''; ?> > <?php if (count($this->pList->arActions) > 0 || $this->pList->bCanBeEdited) { $check_id = RandString(5); ?> <td class="adm-list-table-cell adm-list-table-checkbox adm-list-table-checkbox-hover<?php echo $this->bReadOnly ? ' adm-list-table-checkbox-disabled' : ''; ?> "><input type="checkbox" class="adm-checkbox adm-designed-checkbox" name="SUB_ID[]" id="<?php echo $this->table_id . "_" . $this->id . "_" . $check_id; ?> " value="<?php echo $this->id; ?> " autocomplete="off" title="<?php echo GetMessage("admin_lib_list_check"); ?> "<?php echo $this->bReadOnly ? ' disabled="disabled"' : ''; echo $this->bEditMode ? ' checked="checked" disabled="disabled"' : ''; ?> /><label class="adm-designed-checkbox-label adm-checkbox" for="<?php echo $this->table_id . "_" . $this->id . "_" . $check_id; ?> "></label></td> <?php } 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>'; }