Current Path : /var/www/axolotl/data/www/arhangelsk.axolotls.ru/a537b/ |
Current File : /var/www/axolotl/data/www/arhangelsk.axolotls.ru/a537b/interface.tar |
favorite_act.php 0000644 00000005357 14773234624 0007751 0 ustar 00 <? define("NO_KEEP_STATISTIC", true); define("NO_AGENT_STATISTIC", true); define("NOT_CHECK_PERMISSIONS", true); define("NO_AGENT_CHECK", true); define("DisableEventsCheck", true); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); if($USER->IsAuthorized() && check_bitrix_sessid()) { CUtil::JSPostUnescape(); $res = false; $uid = $USER->GetID(); $now = $DB->GetNowFunction(); global $adminMenu; switch ($_REQUEST["act"]) { case 'add': $arFields = array( "MODIFIED_BY" => $uid, "CREATED_BY" => $uid, "USER_ID" => $uid, "LANGUAGE_ID" => LANGUAGE_ID, "~TIMESTAMP_X" => $now, "COMMON" => "N", "~DATE_CREATE" => $now, ); $_REQUEST["addurl"] = CHTTP::urlDeleteParams($_REQUEST["addurl"], array("IFRAME", "IFRAME_TYPE")); if(isset($_REQUEST["menu_id"])) { $arFields["MENU_ID"] = $_REQUEST["menu_id"]; if (isset($_REQUEST['module_id'])) $arFields["MODULE_ID"] = $_REQUEST["module_id"]; $favMenu = new CBXFavAdmMenu; $menuItem = $favMenu->GetMenuItem($arFields["MENU_ID"], $adminMenu->aGlobalMenu); $arFields["NAME"] = $menuItem["text"] ? htmlspecialcharsback($menuItem["text"]) : $_REQUEST["name"]; if(isset($_REQUEST["addurl"]) && !empty($_REQUEST["addurl"])) $arFields["URL"] = $_REQUEST["addurl"]; elseif(isset($menuItem["url"]) && !empty($menuItem["url"])) $arFields["URL"] = htmlspecialcharsback($menuItem["url"]); } else { $arFields["NAME"] = htmlspecialcharsback($_REQUEST["name"]); if(isset($_REQUEST["addurl"]) && !empty($_REQUEST["addurl"])) $arFields["URL"] = $_REQUEST["addurl"]; } $arFields["NAME"] = trim($arFields["NAME"]); $id = CFavorites::Add($arFields,true); if($id) { $favMenu = new CBXFavAdmMenu; $res = $favMenu->GenerateMenuHTML($id); } break; case 'delete': if(!isset($_REQUEST["id"]) || !$_REQUEST["id"]) break; $dbFav = CFavorites::GetByID($_REQUEST["id"]); while ($arFav = $dbFav->GetNext()) if($arFav["USER_ID"]==$uid) $res = CFavorites::Delete($_REQUEST["id"]); if($res) { $favMenu = new CBXFavAdmMenu; $res = $favMenu->GenerateMenuHTML(); } break; case 'get_list': $dbFav = CFavorites::GetList(); while ($arFav = $dbFav->GetNext()) if($uid == $arFav["USER_ID"] || $arFav["COMMON"]=="Y") $res[] = array("NAME" => $arFav["NAME"], "URL" => $arFav["URL"], "LANGUAGE_ID" => $arFav["LANGUAGE_ID"]); if($res) $res = CUtil::PhpToJSObject($res); break; case 'get_menu_html': $favMenu = new CBXFavAdmMenu; $res = $favMenu->GenerateMenuHTML(); break; } echo $res; } require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_admin_after.php"); ?> admin_viewtabcontrol.php 0000644 00000004411 14773234624 0011503 0 ustar 00 <?php /** * Bitrix Framework * @package bitrix * @subpackage main * @copyright 2001-2016 Bitrix */ /*View Tab Control*/ class CAdminViewTabControl { var $name; var $tabs; var $selectedTab; var $tabIndex = 0; public function __construct($name, $tabs) { //array(array("DIV"=>"", "TAB"=>"", "ICON"=>, "TITLE"=>"", "ONSELECT"=>"javascript"), ...) $this->tabs = $tabs; $this->name = $name; if(isset($_REQUEST[$this->name."_active_tab"])) $this->selectedTab = $_REQUEST[$this->name."_active_tab"]; else { foreach($tabs as $tab) { if ( !isset($tab["VISIBLE"]) || $tab["VISIBLE"] ) { $this->selectedTab = $tab["DIV"]; break; } } } } function Begin() { echo ' <div class="adm-detail-subtabs-block"> '; $i = 0; foreach($this->tabs as $tab) { $bSelected = ($tab["DIV"] == $this->selectedTab); echo '<span class="adm-detail-subtabs'.($bSelected? " adm-detail-subtab-active":"").'" id="view_tab_'.$tab["DIV"].'" onclick="'.$this->name.'.SelectTab(\''.$tab["DIV"].'\');" title="'.$tab["TITLE"].'"'.(isset($tab["VISIBLE"]) && !$tab["VISIBLE"] ? ' style="display: none;"' : '').'>'.$tab["TAB"].'</span>'."\n"; $i++; } echo '</div>'; } function BeginNextTab() { //end previous tab $this->EndTab(); if($this->tabIndex >= count($this->tabs)) return; echo ' <div id="'.$this->tabs[$this->tabIndex]["DIV"].'"'.($this->tabs[$this->tabIndex]["DIV"] <> $this->selectedTab ? ' style="display:none;"':'').'> <div class="adm-detail-content-item-block-view-tab"> <div class="adm-detail-title-view-tab">'.$this->tabs[$this->tabIndex]["TITLE"].'</div> '; $this->tabIndex++; } function EndTab() { if($this->tabIndex < 1 || $this->tabIndex > count($this->tabs)) return; echo ' </div> </div> '; } function End() { $this->EndTab(); echo ' <script type="text/javascript"> '; $s = ""; foreach($this->tabs as $tab) { $s .= ($s <> ""? ", ":""). "{". "'DIV': '".$tab["DIV"]."' ". ($tab["ONSELECT"] <> ""? ", 'ONSELECT': '".CUtil::JSEscape($tab["ONSELECT"])."'":""). "}"; } echo 'var '.$this->name.' = new BX.adminViewTabControl(['.$s.']); '; if(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1) { echo 'window.'.$this->name.'.setPublicMode(true); '; } echo '</script>'; } } navigation.php 0000664 00000013456 14773234624 0007443 0 ustar 00 <? if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); IncludeModuleLangFile(__FILE__); if($this->bPostNavigation) $nav_func_name = 'PostAdminList'; else $nav_func_name = 'GetAdminList'; $sQueryString = CUtil::JSEscape($strNavQueryString); $sJSUrlPath = htmlspecialcharsbx(CUtil::JSEscape($sUrlPath)); $showWait = "BX.addClass(this,'adm-nav-page-active');setTimeout(BX.delegate(function(){BX.addClass(this,'adm-nav-page-loading');this.innerHTML='';},this),500);"; if($this->NavRecordCount>0) { ?> <div class="adm-navigation"> <div class="adm-nav-pages-block"> <? if($this->NavPageNomer > 1) { ?> <a class="adm-nav-page adm-nav-page-prev" href="javascript:void(0)" onclick="<?echo $this->table_id?>.<?=$nav_func_name?>('<?echo $sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.($this->NavPageNomer-1).'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString;?>');<?=$showWait?>"></a> <? } else //$this->NavPageNomer > 1 { ?> <span class="adm-nav-page adm-nav-page-prev"></span> <? } //$this->NavPageNomer > 1 //$NavRecordGroup = $this->nStartPage; $NavRecordGroup = 1; while($NavRecordGroup <= $this->NavPageCount) { if($NavRecordGroup == $this->NavPageNomer) { ?> <span class="adm-nav-page-active adm-nav-page"><?=$NavRecordGroup?></span> <? } else // ($NavRecordGroup == $this->NavPageNomer): { ?> <a href="javascript:void(0)" onclick="<?=$this->table_id?>.<?=$nav_func_name?>('<?=$sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.$NavRecordGroup.'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString?>');<?=$showWait?>" class="adm-nav-page"><?=$NavRecordGroup?></a> <? } //endif($NavRecordGroup == $this->NavPageNomer): if($NavRecordGroup == 2 && $this->nStartPage > 3) { if($this->nStartPage - $NavRecordGroup > 1) { $middlePage = ceil(($this->nStartPage + $NavRecordGroup)/2); ?> <a href="javascript:void(0)" onclick="<?=$this->table_id?>.<?=$nav_func_name?>('<?=$sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.$middlePage.'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString?>');<?=$showWait?>" class="adm-nav-page-separator"><?=$middlePage?></a> <? } $NavRecordGroup = $this->nStartPage; } elseif($NavRecordGroup == $this->nEndPage && $this->nEndPage < $this->NavPageCount - 2) { if( $this->NavPageCount-1 - $NavRecordGroup > 1) { $middlePage = floor(($this->NavPageCount + $this->nEndPage - 1)/2); ?> <a href="javascript:void(0)" onclick="<?=$this->table_id?>.<?=$nav_func_name?>('<?=$sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.$middlePage.'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString?>');<?=$showWait?>" class="adm-nav-page-separator"><?=$middlePage?></a> <? } $NavRecordGroup = $this->NavPageCount-1; } else { $NavRecordGroup++; } } // endwhile;//($NavRecordGroup <= $this->nEndPage): if($this->NavPageNomer < $this->NavPageCount) { ?> <a class="adm-nav-page adm-nav-page-next" href="javascript:void(0)" onclick="<?echo $this->table_id?>.<?=$nav_func_name?>('<?echo $sJSUrlPath.'?PAGEN_'.$this->NavNum.'='.($this->NavPageNomer+1).'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$sQueryString;?>');<?=$showWait?>"></a> <? } else //($this->NavPageNomer < $this->NavPageCount): { ?> <span class="adm-nav-page adm-nav-page-next"></span> <? } //endif; //($this->NavPageNomer < $this->NavPageCount): ?> </div> <? if($this->NavRecordCount>0) { ?> <div class="adm-nav-pages-total-block"><? echo $title." ".(($this->NavPageNomer-1)*$this->NavPageSize+1)." – "; if($this->NavPageNomer <> $this->NavPageCount) echo($this->NavPageNomer * $this->NavPageSize); else echo($this->NavRecordCount); echo " ".GetMessage("navigation_records_of")." ".$this->NavRecordCount; ?></div> <? } // endif($this->NavRecordCount>0); ?> <div class="adm-nav-pages-number-block"><span class="adm-nav-pages-number"> <?if(!$this->NavRecordCountChangeDisable) { ?><span class="adm-nav-pages-number-text"><?echo GetMessage("navigation_records")?></span><span class="adm-select-wrap"><select name="" class="adm-select" onchange="if(this[selectedIndex].value=='0'){<?echo $this->table_id?>.<?=$nav_func_name?>('<?echo $sJSUrlPath."?PAGEN_".$this->NavNum."=1&SHOWALL_".$this->NavNum."=1".CUtil::addslashes($strNavQueryString);?>');}else{<?echo $this->table_id?>.<?=$nav_func_name?>('<?echo $sJSUrlPath."?PAGEN_".$this->NavNum."=1&SHOWALL_".$this->NavNum."=0"."&SIZEN_".$this->NavNum."="?>'+this[selectedIndex].value+'<?echo CUtil::addslashes($strNavQueryString);?>');}"> <? $aSizes = array(10, 20, 50, 100, 200, 500); if($this->nInitialSize > 0 && !in_array($this->nInitialSize, $aSizes)) array_unshift($aSizes, $this->nInitialSize); $reqSize = intval($_REQUEST["SIZEN_".$this->NavNum]); if($reqSize > 0 && !in_array($reqSize, $aSizes)) array_unshift($aSizes, $reqSize); foreach($aSizes as $size) { ?> <option value="<?echo $size?>"<?if($this->NavPageSize == $size)echo ' selected="selected"'?>><?echo $size?></option> <? } //endforeach; if($this->bShowAll) { ?> <option value="0"<?if($this->NavShowAll) echo ' selected="selected"'?>><?echo GetMessage("navigation_records_all")?></option> <? } //endif; ?> </select><?}?></span></span></div> </div> <? } //endif; //$this->NavRecordCount>0; if (!isset($_REQUEST['admin_history'])) { ?> <script type="text/javascript"> var topWindow = (window.BX||window.parent.BX).PageObject.getRootWindow(); var parentWindow = (window.BX||window.parent.BX).PageObject.getParentWindowOfCurrentHost(window); topWindow.BX.adminHistory.put('<?=CUtil::JSEscape($sUrlPath.'?PAGEN_'.$this->NavNum.'='.$this->NavPageNomer.'&SIZEN_'.$this->NavNum.'='.$this->NavPageSize.$strNavQueryString)?>', topWindow.BX.proxy((topWindow.<?=$this->table_id?>)?parentWindow.<?=$this->table_id?>.<?=$nav_func_name?>:<?=$this->table_id?>.<?=$nav_func_name?>, window.<?=$this->table_id?>), ['mode', 'table_id']);</script> <? } //endif; ?>