This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
function copy_iblock ($IBLOCK_ID,$site='en',$signature='(English)') { | |
if ($IBLOCK_ID) { | |
CModule::IncludeModule('iblock'); | |
$iblock = CIBlock::GetById($IBLOCK_ID)->Fetch(); | |
if (!$iblock) return; | |
unset($iblock['ID']); | |
$iblock['LID'] = $site; | |
$iblock['NAME'] = $signature.' '.$iblock['NAME']; | |
$iblock['SITE_ID'] = array($site); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); | |
$APPLICATION->SetTitle("Мебельная компания"); | |
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/xml.php"); | |
$path = array(); | |
function generate($data, $level=0) { | |
global $path; | |
foreach ($data as $k=>$v) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); | |
$APPLICATION->SetTitle("Мебельная компания"); | |
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/xml.php"); | |
function generate($data, $path='') { | |
foreach ($data as $k=>$v) { | |
if (!is_array($v) && trim($v)!='' && $k=='#' && $data['@']['href']!='') { | |
add_struct_item($data['@']['href'],$v); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -z $1 | |
then | |
echo "$0 : You must set a project name" | |
exit 1 | |
else | |
if test -d /srv/sites/$1/www/ | |
then | |
if test -d /srv/sites/$1/www/bitrix/modules/main/ | |
then | |
echo 'packing site...' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -z $1 | |
then | |
echo "$0 : You must set a project name" | |
exit 1 | |
else | |
if test -d /srv/sites/$1/www/ | |
then | |
#start process | |
cd /srv/sites/$1/www/ | |
#untar upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test -z $1 | |
then | |
echo "$0 : You must set a project name" | |
exit 1 | |
else | |
if test -d /srv/sites/$1/www/ | |
then | |
# fix permission issues | |
echo "fix permissions" | |
cd /srv/sites/$1/ |