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
public function create(Order $order, EntityManagerInterface $em, Request $request): Response | |
{ | |
$shipment = new Shipment(); | |
/** @var OrderProduct[] $products */ | |
$products = $em->getRepository('App:OrderProduct')->findAllNotShippedByOrder($order); | |
foreach ($products as $product) { | |
$shipmentProduct = new ShipmentProduct(); | |
$shipmentProduct->setQuantity($product->getQuantity()); | |
$shipmentProduct->setOrderProduct($product); |
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
public function deleteExpiredPasswords() { | |
$user_ids = $this->getUserIdsWithAlreadyExpiredPassword(); | |
if (!$user_ids) { | |
return []; | |
} | |
// Выставляем флаг сброса пароля админом | |
foreach ($user_ids as $user_id) { | |
$user = User::model()->findByPk($user_id); | |
if ($user !== null) { |
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
<?php | |
/** | |
* Class Eloquent_base_model | |
* | |
* @property Illuminate\Database\Query\Builder $queryBuilder | |
*/ | |
class Eloquent_base_model | |
{ | |
protected $_table; |
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
public function add_to_orders($fromCabinet = FALSE, $itemSum = 0) | |
{ | |
try | |
{ | |
$this->load->library('form_validation'); | |
$this->form_validation->set_rules('url', 'Ссылка на товар', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('name', 'Название товара', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('color', 'Цвет', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('size', 'Размер', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('picture', 'Фото', 'trim|htmlspecialchars|xss_clean'); |
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
public function add_to_orders($fromCabinet = FALSE, $itemSum = 0) | |
{ | |
try | |
{ | |
$this->load->library('form_validation'); | |
$this->form_validation->set_rules('url', 'Ссылка на товар', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('name', 'Название товара', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('color', 'Цвет', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('size', 'Размер', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('picture', 'Фото', 'trim|htmlspecialchars|xss_clean'); |
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
public function add_to_orders($fromCabinet = FALSE, $itemSum = 0) | |
{ | |
try | |
{ | |
$this->load->library('form_validation'); | |
$this->form_validation->set_rules('url', 'Ссылка на товар', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('name', 'Название товара', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('color', 'Цвет', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('size', 'Размер', 'trim|htmlspecialchars|xss_clean'); | |
$this->form_validation->set_rules('picture', 'Фото', 'trim|htmlspecialchars|xss_clean'); |
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
<?php | |
/** | |
* Class Base_Model | |
* | |
* Базовая модель | |
* @property CI_DB_active_record $db | |
*/ | |
class Base_Model extends CI_Model | |
{ | |
// Название таблицы |
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
<div class="account-caption-wrap"> | |
<div class="account-caption-box-stock"> | |
<p class="account-caption">Ниже вы видите товары, которые мы выкупили и доставили на наш склад. Отметьте нужные товары и сформируйте из них посылку для отправки на ваш почтовый адрес. Обратите внимание, что на этой странице вы также можете заказать услугу проверки товара, если не сделали этого ранее.</p> | |
<span class="icon"></span> | |
</div> | |
</div> | |
<br /> | |
<h3>Купленные товары, доставленные на наш склад</h3> | |
<form method="post" action="<?php echo site_url("client/orders/addtoorder/{$country}"); ?>"> | |
<input type="hidden" name="<?php echo $this->security->get_csrf_token_name();?>" value="<?php echo $this->security->get_csrf_hash();?>" /> |
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
<?php echo | |
(isset($report['our_earnings_lots']['russia']) ? $report['our_earnings_lots']['russia'] : 0) + | |
+ (isset($report['partner_earnings_lots']['all']) ? $report['partner_earnings_lots']['all'] : 0) | |
+ (isset($report['our_earnings_shops']['russia']) ? $report['our_earnings_shops']['russia'] : 0) | |
+ (isset($report['partner_earnings_shops']['all']) ? $report['partner_earnings_shops']['all'] : 0) | |
+ (isset($report['our_earnings_forwarding']['russia']) ? $report['our_earnings_forwarding']['russia'] : 0) | |
+ (isset($report['partner_earnings_forwarding']['all']) ? $report['partner_earnings_forwarding']['all'] : 0) | |
+ (isset($report['our_earnings_delivery']['russia']) ? $report['our_earnings_delivery']['russia'] : 0) | |
+ (isset($report['partner_earnings_delivery']['all']) ? $report['partner_earnings_delivery']['all'] : 0) | |
+ (isset($report['additional_earnings']['russia']) ? $report['additional_earnings']['russia'] : 0) |
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
<?php | |
$fruits = array( | |
"apple" => "yummy", | |
"orange" => "ah ya, nice", | |
"grape" => "wow, I love it!", | |
"plum" => "nah, not me" | |
); | |
$obj = new ArrayObject( $fruits ); | |
$it = $obj->getIterator(); |