Exemple #1
0
    public static function Show()
    {
        IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/interface/prolog_main_admin.php');
        $supportFinishDate = COption::GetOptionString('main', '~support_finish_date', '');
        if ($supportFinishDate != '' && is_array($aSupportFinishDate = ParseDate($supportFinishDate, 'ymd'))) {
            $aGlobalOpt = CUserOptions::GetOption("global", "settings", array());
            if ($aGlobalOpt['messages']['support'] != 'N') {
                $supportFinishStamp = mktime(0, 0, 0, $aSupportFinishDate[1], $aSupportFinishDate[0], $aSupportFinishDate[2]);
                $supportDateDiff = ceil(($supportFinishStamp - time()) / 86400);
                $sSupportMess = '';
                $sSupWIT = " (<span onclick=\"BX.toggle(BX('supdescr'))\" style='border-bottom: 1px dashed #1c91e7; color: #1c91e7; cursor: pointer;'>" . GetMessage("prolog_main_support_wit") . "</span>)";
                if ($supportDateDiff >= 0 && $supportDateDiff <= 30) {
                    $sSupportMess = GetMessage("prolog_main_support11", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#DAYS_AGO#' => $supportDateDiff == 0 ? GetMessage("prolog_main_today") : GetMessage('prolog_main_support_days', array('#N_DAYS_AGO#' => $supportDateDiff)), '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT, '#SUP_FINISH_DATE#' => GetTime(mktime(0, 0, 0, $aSupportFinishDate[1] + 1, $aSupportFinishDate[0], $aSupportFinishDate[2]))));
                } elseif ($supportDateDiff < 0 && $supportDateDiff >= -30) {
                    $sSupportMess = GetMessage("prolog_main_support21", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#DAYS_AGO#' => -$supportDateDiff, '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT, '#SUP_FINISH_DATE#' => GetTime(mktime(0, 0, 0, $aSupportFinishDate[1] + 1, $aSupportFinishDate[0], $aSupportFinishDate[2]))));
                } elseif ($supportDateDiff < -30) {
                    $sSupportMess = GetMessage("prolog_main_support31", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT));
                }
                if ($sSupportMess != '') {
                    $sSupportMess .= GetMessage('ACRIT_EXPORTPRO_BUY_LICENCE');
                    $userOption = CUserOptions::GetOption("main", "admSupInf");
                    if (mktime() > $userOption["showInformerDate"]) {
                        $prolongUrl = "/bitrix/admin/buy_support.php?lang=" . LANGUAGE_ID;
                        if (!in_array(LANGUAGE_ID, array("ru", "ua")) || IntVal(COption::GetOptionString("main", "~PARAM_PARTNER_ID")) <= 0) {
                            require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/update_client.php";
                            $prolongUrl = "http://www.acrit-studio.ru/shop/list/lupd/";
                        }
                        echo BeginNote('style="position: relative; top: -15px;"');
                        ?>
                        
                        <div style="float: right; padding-left: 50px; margin-top: -5px; text-align: center;">
                            <a href="<?php 
                        echo $prolongUrl;
                        ?>
" target="_blank" class="adm-btn adm-btn-save" style="margin-bottom: 4px;"><?php 
                        echo GetMessage("prolog_main_support_button_prolong");
                        ?>
</a><br />
                            <a href="http://www.acrit-studio.ru/market/" target="_blank"><?php 
                        echo GetMessage("prolog_main_support_button_prolong_modules");
                        ?>
</a>
                        </div>
                        <?php 
                        echo $sSupportMess;
                        ?>
                        <div id="supdescr" style="display: none;"><br /><br /><b><?php 
                        echo GetMessage("prolog_main_support_wit_descr1");
                        ?>
</b><hr><?php 
                        echo GetMessage("prolog_main_support_wit_descr2");
                        ?>
</div>
                        <?php 
                        echo EndNote();
                    }
                }
            }
        }
    }
     }
     $date = ParseDate(substr($line, 22, 6));
     $time = ParseTime(substr($line, 28, 4));
     $helper = new DataHelper("tblImportHistory", "ImportHistoryID");
     $helper->data['FileDate'] = $date . " " . $time;
     $helper->data['ImportDate'] = date("Y-m-d H:i:s");
     $helper->data['UniqueFileReference'] = substr($line, 32, 7);
     $helper->SaveRecord();
 }
 $headerCode = substr($line, 0, 2);
 switch ($headerCode) {
     case "BS":
         $helper = new DataHelper("tblJourney", "UniqueJourneyIdentifier");
         $helper->data['ProviderJourneyIdentifier'] = substr($line, 3, 6);
         $helper->data['FirstDateOfOperation'] = ParseDate(substr($line, 9, 6));
         $helper->data['LastDateOfOperation'] = ParseDate(substr($line, 15, 6));
         $helper->data['OperatesOnMondays'] = substr($line, 21, 1);
         $helper->data['OperatesOnTuesdays'] = substr($line, 22, 1);
         $helper->data['OperatesOnWednesdays'] = substr($line, 23, 1);
         $helper->data['OperatesOnThursdays'] = substr($line, 24, 1);
         $helper->data['OperatesOnFridays'] = substr($line, 25, 1);
         $helper->data['OperatesOnSaturdays'] = substr($line, 26, 1);
         $helper->data['OperatesOnSundays'] = substr($line, 27, 1);
         $helper->data['CourseIndicator'] = substr($line, 40, 1);
         $status = substr($line, 29, 1);
         if ($status == "B") {
             $helper->data['TrainStatus'] = "Bus (Permanent)";
             #wording from ATOC spec
         } elseif ($status == "F") {
             $helper->data['TrainStatus'] = "Freight (Permanent - WTT)";
         } elseif ($status == "P") {
Exemple #3
0
 // Get the last inserted person ID and insert a dummy row in the person_custom table
 $sSQL = "SELECT MAX(per_ID) AS iPersonID FROM person_per";
 $rsPersonID = RunQuery($sSQL);
 extract(mysql_fetch_array($rsPersonID));
 $sSQL = "INSERT INTO `person_custom` (`per_ID`) VALUES ('" . $iPersonID . "')";
 RunQuery($sSQL);
 //echo "<br>" . $sSQL . "<br>";
 // Build the person_custom SQL
 for ($col = 0; $col < $numCol; $col++) {
     // Is it a custom field?
     if ($aColumnCustom[$col]) {
         $currentType = $aCustomTypes[$aColumnID[$col]];
         $currentFieldData = trim($aData[$col]);
         // If date, first parse it to the standard format..
         if ($currentType == 2) {
             $aDate = ParseDate($currentFieldData, $iDateMode);
             $currentFieldData = implode("-", $aDate);
         } elseif ($currentType == 1) {
             if (strlen($currentFieldData)) {
                 $currentFieldData = ConvertToBoolean($currentFieldData) + 1;
             }
         } else {
             $currentFieldData = addslashes($currentFieldData);
         }
         // aColumnID is the custom table column name
         sqlCustomField($sSQLcustom, $currentType, $currentFieldData, $aColumnID[$col], $sCountry);
     }
 }
 // Finalize and run the update for the person_custom table.
 $sSQLcustom = substr($sSQLcustom, 0, -2);
 $sSQLcustom .= " WHERE per_ID = " . $iPersonID;
Exemple #4
0
        	<?endif;?>
        	<?echo GetMessage("TRIAL_ATTENTION_TEXT5_".$vendor) ?>
        <?
        		endif; //saas*/
        echo BeginNote('style="position: relative; top: -15px;"');
        ?>
<span class="required">
		Ахтунг! Текущая копия ядра битрикс изменена на бесконечную DEMO лицензию<br>
		ОЧЕНЬ НЕ РЕКОМЕНДУЕТСЯ ИСПОЛЬЗОВАТЬ СИСТЕМУ ОБНОВЛЕНИЯ битрикса, и вообще заходить на страницу обновления<br>
		а то вас посадят в тюрьму!!!
		</span><?php 
        echo EndNote();
    } elseif ($USER->CanDoOperation('install_updates')) {
        //show support ending warning
        $supportFinishDate = COption::GetOptionString('main', '~support_finish_date', '');
        if ($supportFinishDate != '' && is_array($aSupportFinishDate = ParseDate($supportFinishDate, 'ymd'))) {
            $aGlobalOpt = CUserOptions::GetOption("global", "settings", array());
            if ($aGlobalOpt['messages']['support'] != 'N') {
                $supportFinishStamp = mktime(0, 0, 0, $aSupportFinishDate[1], $aSupportFinishDate[0], $aSupportFinishDate[2]);
                $supportDateDiff = ceil(($supportFinishStamp - time()) / 86400);
                $sSupportMess = '';
                $sSupWIT = " (<span onclick=\"BX.toggle(BX('supdescr'))\" style='border-bottom: 1px dashed #1c91e7; color: #1c91e7; cursor: pointer;'>" . GetMessage("prolog_main_support_wit") . "</span>)";
                if ($supportDateDiff >= 0 && $supportDateDiff <= 30) {
                    $sSupportMess = GetMessage("prolog_main_support11", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#DAYS_AGO#' => $supportDateDiff == 0 ? GetMessage("prolog_main_today") : GetMessage('prolog_main_support_days', array('#N_DAYS_AGO#' => $supportDateDiff)), '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT, '#SUP_FINISH_DATE#' => GetTime(mktime(0, 0, 0, $aSupportFinishDate[1] + 1, $aSupportFinishDate[0], $aSupportFinishDate[2]))));
                } elseif ($supportDateDiff < 0 && $supportDateDiff >= -30) {
                    $sSupportMess = GetMessage("prolog_main_support21", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#DAYS_AGO#' => -$supportDateDiff, '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT, '#SUP_FINISH_DATE#' => GetTime(mktime(0, 0, 0, $aSupportFinishDate[1] + 1, $aSupportFinishDate[0], $aSupportFinishDate[2]))));
                } elseif ($supportDateDiff < -30) {
                    $sSupportMess = GetMessage("prolog_main_support31", array('#FINISH_DATE#' => GetTime($supportFinishStamp), '#LICENSE_KEY#' => md5(LICENSE_KEY), '#WHAT_IS_IT#' => $sSupWIT));
                }
                if ($sSupportMess != '') {
                    $userOption = CUserOptions::GetOption("main", "admSupInf");
Exemple #5
0
if ($iH + $iI + $iS > 0) {
    $dtformat = "FULL";
} else {
    $dtformat = "SHORT";
}
$aDate = ParseDate(FmtDate($date, "D.M.Y"), "dmy");
if (is_array($aDate) && $aDate[2] > 1971 && $aDate[2] < 2037) {
    //unix 32-bit timestamp
    $currDate = mktime($iH, $iI, $iS, $aDate[1], $aDate[0], $aDate[2]);
} else {
    $currDate = time();
}
$y1 = intval(date("Y", $currDate));
$m1 = intval(date("n", $currDate));
$d1 = intval(date("j", $currDate));
$aInitDate = ParseDate(FmtDate($initdate, "D.M.Y"), "dmy");
if (is_array($aInitDate) && $aInitDate[2] > 1971 && $aInitDate[2] < 2037) {
    $initDate = mktime($iH, $iI, $iS, $aInitDate[1], $aInitDate[0], $aInitDate[2]);
    $init_y = intval(date("Y", $initDate));
    $init_m = intval(date("n", $initDate));
    $init_d = intval(date("j", $initDate));
} else {
    $init_y = $init_m = $init_d = 0;
}
$today = time();
$today_y = intval(date("Y", $today));
$today_m = intval(date("n", $today));
$today_d = intval(date("j", $today));
$sParam = DeleteParam(array("date"));
if ($sParam != "") {
    $sParam = "&amp;" . $sParam;
Exemple #6
0
     } else {
         $helper->data['BankHolidays'] = "";
     }
     $helper->data['RouteNumber'] = substr($line, 38, 4);
     $helper->data['RunningBoard'] = substr($line, 42, 6);
     $helper->data['VehicleType'] = substr($line, 48, 8);
     $helper->data['RegistrationNumber'] = substr($line, 56, 8);
     $helper->data['RouteDirection'] = substr($line, 64, 1);
     $helper->SaveRecord();
     $lastJourney = $helper->data['UniqueJourneyIdentifier'];
     break;
 case "QE":
     $helper = new DataHelper("tblJourneyDateRunning", "JourneyDateRunningID");
     $helper->data['UniqueJourneyIdentifier'] = $lastJourney;
     $helper->data['StartOfExceptionalPeriod'] = ParseDate(substr($line, 2, 8));
     $helper->data['EndOfExceptionalPeriod'] = ParseDate(substr($line, 10, 8));
     $helper->data['OperationCode'] = substr($line, 18, 1);
     $helper->SaveRecord();
     break;
 case "QN":
     $helper = new DataHelper("tblJourneyNote", "JourneyNoteID");
     $helper->data['UniqueJourneyIdentifier'] = $lastJourney;
     $helper->data['NoteCode'] = substr($line, 2, 5);
     $helper->data['NoteText'] = substr($line, 7);
     $helper->SaveRecord();
     break;
 case "QO":
     $helper = new DataHelper("tblJourneyOrigin", "JourneyOriginID");
     $helper->data['UniqueJourneyIdentifier'] = $lastJourney;
     $helper->data['Location'] = substr($line, 2, 12);
     $helper->data['DepartureTime'] = ParseTime(substr($line, 14, 4));
         $helper->data['NoteType'] = 'GBTT';
     } elseif ($notetype = 'W') {
         $helper->data['NoteType'] = 'WTT';
     } else {
         $helper->data['NoteType'] = '';
     }
     $helper->SaveRecord();
     break;
     //may need provider/unique fixing
 //may need provider/unique fixing
 case "AA":
     $helper = new DataHelper("tblAssociations", "AssociationID");
     $helper->data['MainTrainID'] = substr($line, 4, 6);
     $helper->data['AssociatedTrainID'] = substr($line, 10, 6);
     $helper->data['AssociationStartDate'] = ParseDate(substr($line, 16, 6));
     $helper->data['AssociationEndDate'] = ParseDate(substr($line, 22, 6));
     $helper->data['AssociationOnMondays'] = substr($line, 28, 1);
     $helper->data['AssociationOnTuesdays'] = substr($line, 29, 1);
     $helper->data['AssociationOnWednesdays'] = substr($line, 30, 1);
     $helper->data['AssociationOnThursdays '] = substr($line, 31, 1);
     $helper->data['AssociationOnFridays'] = substr($line, 32, 1);
     $helper->data['AssociationOnSaturdays'] = substr($line, 33, 1);
     $helper->data['AssociationOnSundays'] = substr($line, 34, 1);
     $helper->data['AssociationDateIndicator'] = substr($line, 36, 1);
     $helper->data['Location'] = substr($line, 37, 7);
     $helper->data['BaseLocationSuffix'] = substr($line, 44, 1);
     $helper->data['AssocLocationSuffix'] = substr($line, 45, 1);
     $associationtype = substr($line, 47, 1);
     if ($associationtype == "P") {
         $helper->data['AssociationType'] = "Passenger use";
         #wording from ATOC spec
Exemple #8
0
 if (strlen($CURRENCY_BASE) <= 0) {
     $CURRENCY_BASE = COption::GetOptionString("sale", "default_currency");
 }
 if (strlen($CURRENCY_BASE) <= 0) {
     $CURRENCY_BASE = CCurrency::GetBaseCurrency();
 }
 if (strlen($CURRENCY_BASE) <= 0) {
     $dbCurrency = CCurrency::GetList($by = "SORT", $order = "ASC");
     $arCurrency = $dbCurrency->Fetch();
     $CURRENCY_BASE = $arCurrency["CURRENCY"];
 }
 if (StrLen($CURRENCY_BASE) > 0) {
     if (strlen($RATE_DAY) <= 0) {
         $RATE_DAY_SHOW = GetTime(time(), "SHORT", LANGUAGE_ID);
     } else {
         $arRATE_DAY_PARSED = ParseDate($RATE_DAY, "ymd");
         $RATE_DAY_SHOW = GetTime(mktime(0, 0, 0, $arRATE_DAY_PARSED[1], $arRATE_DAY_PARSED[0], $arRATE_DAY_PARSED[2]), "D.M.Y", LANGUAGE_ID);
     }
     if (count($arrCURRENCY_FROM) > 0) {
         if ($CURRENCY_BASE == "RUR" && $SHOW_CB == "Y") {
             $bWarning = False;
             $QUERY_STR = "date_req=" . $DB->FormatDate($RATE_DAY_SHOW, CLang::GetDateFormat("SHORT", SITE_ID), "D.M.Y");
             $strQueryText = QueryGetData("www.cbr.ru", 80, "/scripts/XML_daily.asp", $QUERY_STR, $errno, $errstr);
             if (strlen($strQueryText) <= 0) {
                 $bWarning = True;
             }
             if (!$bWarning) {
                 require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/xml.php";
                 $strQueryText = preg_replace("#<!DOCTYPE[^>]+?>#i", "", $strQueryText);
                 $strQueryText = preg_replace("#<" . "\\?XML[^>]+?\\?" . ">#i", "", $strQueryText);
                 $objXML = new CDataXML();
if (!$USER->IsAdmin()) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$isAdmin = $USER->CanDoOperation('edit_other_settings');
IncludeModuleLangFile(__FILE__);
$APPLICATION->SetAdditionalCSS("/bitrix/components/bitrix/desktop/templates/admin/style.css");
$APPLICATION->SetAdditionalCSS("/bitrix/themes/.default/security_ddos.css");
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_admin_after.php";
if (LANGUAGE_ID !== 'ru') {
    $APPLICATION->SetTitle(GetMessage('MFD_TITLE'));
    CAdminMessage::ShowMessage(array('MESSAGE' => GetMessage('MFD_ERR_RUS_ONLY'), 'TYPE' => 'error'));
    require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin.php";
}
$lkeySign = md5(CUpdateClient::GetLicenseKey());
$supportFinishDate = COption::GetOptionString("main", "~support_finish_date");
$aSupportFinishDate = ParseDate($supportFinishDate, 'ymd');
$supportFinishStamp = mktime(0, 0, 0, $aSupportFinishDate[1], $aSupportFinishDate[0], $aSupportFinishDate[2]);
$errorMessage = "";
if (!IsModuleInstalled("intranet")) {
    if ($supportFinishStamp > mktime() || strlen($supportFinishDate) <= 0) {
        if ($_SERVER["REQUEST_METHOD"] == "POST") {
            if (check_bitrix_sessid() && $_POST["DD"] == "Y") {
                $ht = new Bitrix\Main\Web\HttpClient(array("socketTimeout" => 30));
                $arFields = array("lkc" => $lkeySign, "DD" => "Y", "FCS" => "Y", "SGN" => md5($_POST["DOMAIN"] . "|" . $_POST["IP"] . "|" . $lkeySign), "DOMAIN" => $_POST["DOMAIN"], "IP" => $_POST["IP"], "NAME" => $_POST["NAME"], "CONTACT_PERSON" => $_POST["CONTACT_PERSON"], "EMAIL" => $_POST["EMAIL"], "PHONE" => $_POST["PHONE"]);
                $arFields = $APPLICATION->ConvertCharsetArray($arFields, LANG_CHARSET, "windows-1251");
                if (strlen($arFields["DOMAIN"]) <= 0) {
                    $errorMessage .= GetMessage("MFD_ER_DOMAIN") . "<Br>";
                }
                if (strlen($arFields["IP"]) <= 0) {
                    $errorMessage .= GetMessage("MFD_ER_IP") . "<Br>";
                }