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


PHP CSalePaySystemAction::SerializeParams方法代码示例

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


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

示例1: elseif

 if (array_key_exists("LOGOTIP_" . $arPersonType["ID"], $_FILES) && $_FILES["LOGOTIP_" . $arPersonType["ID"]]["error"] == 0) {
     $arPicture = $_FILES["LOGOTIP_" . $arPersonType["ID"]];
 } elseif ($actionID <= 0) {
     $logo = "";
     if (file_exists($_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.png")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.png";
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.jpg")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.jpg";
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.gif")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]} . "/logo.gif";
     }
     $arPicture = CFile::MakeFileArray($logo);
 }
 $arPicture["old_file"] = $arPSAction["LOGOTIP"];
 $arPicture["del"] = trim($_POST["LOGOTIP_" . $arPersonType["ID"] . "_del"]);
 $arFields = array("PAY_SYSTEM_ID" => $ID, "PERSON_TYPE_ID" => $arPersonType["ID"], "NAME" => ${"NAME_" . $arPersonType["ID"]}, "ACTION_FILE" => ${"ACTION_FILE_" . $arPersonType["ID"]}, "NEW_WINDOW" => ${"NEW_WINDOW_" . $arPersonType["ID"]} == "Y" ? "Y" : "N", "PARAMS" => CSalePaySystemAction::SerializeParams($arParams), "HAVE_PREPAY" => "N", "HAVE_RESULT" => "N", "HAVE_ACTION" => "N", "HAVE_PAYMENT" => "N", "HAVE_RESULT_RECEIVE" => "N", "ENCODING" => trim(${"ENCODING_" . $arPersonType["ID"]}), "LOGOTIP" => $arPicture);
 $pathToAction = $_SERVER["DOCUMENT_ROOT"] . ${"ACTION_FILE_" . $arPersonType["ID"]};
 $pathToAction = str_replace("\\", "/", $pathToAction);
 while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
     $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
 }
 if (file_exists($pathToAction)) {
     if (is_dir($pathToAction)) {
         if (file_exists($pathToAction . "/pre_payment.php")) {
             $arFields["HAVE_PREPAY"] = "Y";
         }
         if (file_exists($pathToAction . "/result.php")) {
             $arFields["HAVE_RESULT"] = "Y";
         }
         if (file_exists($pathToAction . "/action.php")) {
             $arFields["HAVE_ACTION"] = "Y";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php

示例2: OnPostForm


//.........这里部分代码省略.........
             }
         }
         function LocalGetPSActionParams($fileName)
         {
             $arPSCorrespondence = array();
             if (file_exists($fileName) && is_file($fileName)) {
                 include $fileName;
             }
             return $arPSCorrespondence;
         }
         foreach ($paySystem as $pID => $value) {
             foreach ($value as $personID) {
                 $arFields = array();
                 $arPaySysAction = "";
                 $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID, "PERSON_TYPE_ID" => $personID));
                 if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                     $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                 } else {
                     $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $pID));
                     if ($arPaySysActionTmp = $dbPaySysAction->Fetch()) {
                         $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysActionTmp["ACTION_FILE"];
                     }
                 }
                 if (strlen($pathToAction) > 0) {
                     $arPSCorrespondence = LocalGetPSActionParams($pathToAction . "/.description.php");
                     $arParams = array();
                     foreach ($arPSCorrespondence as $k => $v) {
                         $typeTmp = $arResult[$pID . "_" . $k . "_" . $personID];
                         $valueTmp = $arResult["VALUE1_" . $pID . "_" . $k . "_" . $personID];
                         if (strlen($valueTmp) <= 0) {
                             $valueTmp = $arResult["VALUE2_" . $pID . "_" . $k . "_" . $personID];
                         }
                         $arParams[$k] = array("TYPE" => $typeTmp, "VALUE" => $valueTmp);
                     }
                     $arFields = array("NEW_WINDOW" => $arResult["paySystemPopup"][$pID][$personID], "PARAMS" => CSalePaySystemAction::SerializeParams($arParams));
                     if (IntVal($arPaySysAction["ID"]) > 0) {
                         CSalePaySystemAction::Update($arPaySysAction["ID"], $arFields);
                     } else {
                         $arFields["PAY_SYSTEM_ID"] = $pID;
                         $arFields["PERSON_TYPE_ID"] = $personID;
                         $arFields["NAME"] = $arPaySysActionTmp["NAME"];
                         $arFields["ACTION_FILE"] = $arPaySysActionTmp["ACTION_FILE"];
                         $arFields["HAVE_PREPAY"] = "N";
                         $arFields["HAVE_RESULT"] = "N";
                         $arFields["HAVE_ACTION"] = "N";
                         $arFields["HAVE_PAYMENT"] = "N";
                         $arFields["HAVE_RESULT_RECEIVE"] = "N";
                         if (file_exists($pathToAction)) {
                             if (is_dir($pathToAction)) {
                                 if (file_exists($pathToAction . "/pre_payment.php")) {
                                     $arFields["HAVE_PREPAY"] = "Y";
                                 }
                                 if (file_exists($pathToAction . "/result.php")) {
                                     $arFields["HAVE_RESULT"] = "Y";
                                 }
                                 if (file_exists($pathToAction . "/action.php")) {
                                     $arFields["HAVE_ACTION"] = "Y";
                                 }
                                 if (file_exists($pathToAction . "/payment.php")) {
                                     $arFields["HAVE_PAYMENT"] = "Y";
                                 }
                                 if (file_exists($pathToAction . "/result_rec.php")) {
                                     $arFields["HAVE_RESULT_RECEIVE"] = "Y";
                                 }
                             } else {
                                 $arFields["HAVE_PAYMENT"] = "Y";
                             }
                         }
                         CSalePaySystemAction::Add($arFields);
                     }
                 }
             }
         }
         COption::SetOptionInt("sale", "location", $arResult["location"], false, $arResult["siteID"]);
         if (empty($arResult["delivery"])) {
             $arResult["delivery"] = array();
         }
         $dbDelivery = CSaleDeliveryHandler::GetList(array("SORT" => "ASC"), array("SITE_ID" => $arResult["siteID"], "ACTIVE" => "Y"));
         while ($arDelivery = $dbDelivery->Fetch()) {
             if (!in_array($arDelivery["SID"] . "_new", $arResult["delivery"])) {
                 CSaleDeliveryHandler::Set($arDelivery["SID"], array("ACTIVE" => "N"));
             }
         }
         $dbDelivery = CSaleDelivery::GetList(array("SORT" => "ASC"), array("LID" => $arResult["siteID"], "ACTIVE" => "Y"));
         while ($arDelivery = $dbDelivery->Fetch()) {
             if (!in_array($arDelivery["ID"], $arResult["delivery"])) {
                 CSaleDelivery::Update($arDelivery["ID"], array("ACTIVE" => "N"));
             }
         }
         if (strlen($arResult["login"]) > 0) {
             $arFields = array("LOGIN" => $arResult["login"], "PASSWORD" => $arResult["password"], "CONFIRM_PASSWORD" => $arResult["password_rep"], "EMAIL" => $arResult["email"]);
             $user = new CUser();
             $ID = $user->Add($arFields);
             if (IntVal($ID) > 0) {
                 $sGroups = COption::GetOptionString("main", "new_user_registration_def_group", "");
                 CUser::SetUserGroup($ID, array_merge(explode(",", $sGroups), $arResult["1C_GROUP_PERMISSIONS"]));
             }
         }
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:wizard.php

示例3: addMissingKeysToParams

 /**
  * Adds params if they are missed
  * @return array Added params
  */
 public static function addMissingKeysToParams()
 {
     $result = array();
     $res = CSalePaySystemAction::GetList(array(), array("PS_ACTIVE" => "Y"), false, false, array("ID", "ACTION_FILE", "PARAMS"));
     while ($ps = $res->Fetch()) {
         $descriptionFile = $_SERVER["DOCUMENT_ROOT"] . $ps["ACTION_FILE"] . "/.description.php";
         if (!file_exists($descriptionFile) || !is_file($descriptionFile)) {
             continue;
         }
         $arPSCorrespondence = array();
         include $descriptionFile;
         if (!is_array($arPSCorrespondence) || empty($arPSCorrespondence)) {
             continue;
         }
         $arCorrespondence = CSalePaySystemAction::UnSerializeParams($ps["PARAMS"]);
         if (!is_array($arCorrespondence)) {
             continue;
         }
         $missingKeys = array_keys(array_diff_key($arPSCorrespondence, $arCorrespondence));
         if (!empty($missingKeys)) {
             $result[$ps["ID"]] = $missingKeys;
             foreach ($missingKeys as $key) {
                 $arCorrespondence[$key] = array_intersect_key($arPSCorrespondence[$key], array("TYPE" => true, "VALUE" => true));
             }
             $updRes = CSalePaySystemAction::update($ps["ID"], array("PARAMS" => CSalePaySystemAction::SerializeParams($arCorrespondence)));
             if ($updRes <= 0) {
                 $result[$ps["ID"]]["UPDATE_ERROR"] = true;
             }
         }
     }
     \CEventLog::Add(array("SEVERITY" => "INFO", "AUDIT_TYPE_ID" => "PS_PARAMS_CONVERT_RESULT", "MODULE_ID" => "sale", "ITEM_ID" => "PaySystems", "DESCRIPTION" => serialize($result)));
     return "";
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:37,代码来源:pay_system_helper.php

示例4: elseif

 if (array_key_exists("LOGOTIP", $_FILES) && $_FILES["LOGOTIP"]["error"] == 0) {
     $arPicture = $_FILES["LOGOTIP"];
 } elseif ($actionID <= 0) {
     $logo = "";
     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.png")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.png";
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.jpg")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.jpg";
     } elseif (file_exists($_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.gif")) {
         $logo = $_SERVER["DOCUMENT_ROOT"] . $actionFile . "/logo.gif";
     }
     $arPicture = CFile::MakeFileArray($logo);
 }
 $arPicture["old_file"] = $arPaySys['ACTION']["LOGOTIP"];
 $arPicture["del"] = trim($_POST["LOGOTIP_del"]);
 $arActFields = array("PAY_SYSTEM_ID" => $psID, "PERSON_TYPE_ID" => $arPersonTypeId, "NAME" => $arFields['NAME'], "ACTION_FILE" => $actionFile, "NEW_WINDOW" => $_POST['NEW_WINDOW'] == "Y" ? "Y" : "N", "PARAMS" => CSalePaySystemAction::SerializeParams($arActParams), "HAVE_PREPAY" => "N", "HAVE_RESULT" => "N", "HAVE_ACTION" => "N", "HAVE_PAYMENT" => "N", "HAVE_RESULT_RECEIVE" => "N", "ENCODING" => trim($_POST['ENCODING']), "LOGOTIP" => $arPicture);
 $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $actionFile;
 $pathToAction = str_replace("\\", "/", $pathToAction);
 while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
     $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
 }
 if (file_exists($pathToAction)) {
     if (is_dir($pathToAction)) {
         if (file_exists($pathToAction . "/pre_payment.php")) {
             $arActFields["HAVE_PREPAY"] = "Y";
         }
         if (file_exists($pathToAction . "/result.php")) {
             $arActFields["HAVE_RESULT"] = "Y";
         }
         if (file_exists($pathToAction . "/action.php")) {
             $arActFields["HAVE_ACTION"] = "Y";
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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