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


PHP CSaleUserAccount::GetByUserID方法代码示例

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


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

示例1: OnBeforeUserDeleteHandler

 function OnBeforeUserDeleteHandler($user_id)
 {
     \CModule::IncludeModule("iblock");
     \CModule::IncludeModule("sale");
     //Привязки к соц. сетям
     $arrFilter = array("IBLOCK_ID" => USER_SOCIAL_IB, "PROPERTY_USER_ID" => $user_id);
     $arSelect = array("ID");
     $rsRes = \CIBlockElement::GetList($arOrder, $arrFilter, false, false, $arSelect);
     while ($arItem = $rsRes->GetNext()) {
         \CIBlockElement::Delete($arItem["ID"]);
     }
     //Удаляем записи
     $result = \Hawkart\Megatv\RecordTable::getList(array('filter' => array("UF_USER_ID" => $user_id), 'select' => array("ID")));
     while ($arRecord = $result->fetch()) {
         \CRecordEx::delete($arRecord["ID"]);
     }
     //Удаляем счет
     if ($arAccount = \CSaleUserAccount::GetByUserID($user_id, "RUR")) {
         \CSaleUserAccount::Delete($arAccount["ID"]);
     }
     //Удаляем заказы
     $arFilter = array("USER_ID" => $user_id);
     $db_sales = \CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
     while ($ar_sales = $db_sales->Fetch()) {
         \CSaleOrder::Delete($ar_sales["ID"]);
     }
     //Удаляем подписки
     $result = \Hawkart\Megatv\SubscribeTable::getList(array('filter' => array("=UF_USER_ID" => $user_id), 'select' => array("ID")));
     if ($arSub = $result->fetch()) {
         \Hawkart\Megatv\SubscribeTable::delete($arSub["ID"]);
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:32,代码来源:CUserEx.php

示例2: Array

	/*.personal-menu1 { position: absolute;}
	.personal-menu1 ul {margin-left: -41px; margin-bottom: -15px;}
	.personal-menu1 ul li {list-style: none;}
	.personal-menu1 ul li a{width: 171px; display: block; line-height: 0.7em; padding: 19px 0px; margin: 0px 0px 16px; background: none repeat scroll 0% 0% #BFBFBF; text-align: center; color: #FFF; font-weight: 400; font-size: 16px; font-family: "Open Sans",sans-serif; text-decoration: none; border-radius: 5px;}
	.personal-menu1 ul li a.active{background: none repeat scroll 0% 0% #F15824;}*/

</style>

<?
	global $USER;
	CModule::IncludeModule('sale');
	$rsUser = CUser::GetByID($USER->GetID());
	$arUser = $rsUser->Fetch();
	$avatar = CFile::ResizeImageGet($arUser["PERSONAL_PHOTO"], Array("width" => 170, "height" => 170), BX_RESIZE_IMAGE_PROPORTIONAL_ALT );
	$buyer = CSaleUserAccount::GetByUserID($USER->GetID(), 'RUB');
?>
	<script src="/src/javascript/tabs.js"></script>
	<div class="block-gr">
		<div class="main">
			<div class="cabinet">
				<div class="cabinet-box">
					<div class="cab-img">
						<?if (!$arUser['PERSONAL_PHOTO']) : ?>
							<img src="/src/images/no_pic.png" alt="" style="width: 121px;">
						<?else : ?>
							<img src="<?php 
echo $avatar['src'];
?>
" alt="">
						<?endif;?>
开发者ID:ASDAFF,项目名称:mp,代码行数:30,代码来源:index.php

示例3: GetMessage

             $errorMessage .= $ex->GetString() . ".<br>";
         } else {
             $errorMessage .= GetMessage("SAE_ERROR_SAVING") . ".<br>";
         }
     }
 }
 if (strlen($errorMessage) <= 0 and $currentLocked != "") {
     if ($_POST["UNLOCK"] == "Y") {
         CSaleUserAccount::UnLock($USER_ID, $CURRENCY);
     }
     if ($_POST["UNLOCK"] == "N" or $currentLocked == "Y" and !isset($_POST["UNLOCK"])) {
         CSaleUserAccount::Lock($USER_ID, $CURRENCY);
     }
 }
 if (strlen($errorMessage) <= 0) {
     $arUserAccount = CSaleUserAccount::GetByUserID($USER_ID, $CURRENCY);
     if (DoubleVal($arUserAccount["CURRENT_BUDGET"]) != $CURRENT_BUDGET) {
         $errorMessage .= GetMessage("SAE_ERROR_SAVING_SUM") . ".<br>";
     }
 }
 if (strlen($errorMessage) <= 0) {
     $ID = IntVal($arUserAccount["ID"]);
     $arFields = array("NOTES" => strlen($NOTES) > 0 ? $NOTES : False);
     if (!CSaleUserAccount::Update($ID, $arFields)) {
         if ($ex = $APPLICATION->GetException()) {
             $errorMessage .= $ex->GetString() . ".<br>";
         } else {
             $errorMessage .= GetMessage("SAE_ERROR_SAVING_COMMENT") . ".<br>";
         }
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:account_edit.php


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