Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Vitaly Gorbunov cezar62882

🎯
Focusing
Block or report user

Report or block cezar62882

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 1.php
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);
View 1.php
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) {
View sdf.php
<?php
/**
* Class Eloquent_base_model
*
* @property Illuminate\Database\Query\Builder $queryBuilder
*/
class Eloquent_base_model
{
protected $_table;
View 1.php
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');
View php
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');
View gist:edd2455855816ee37380
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');
View base_model.php
<?php
/**
* Class Base_Model
*
* Базовая модель
* @property CI_DB_active_record $db
*/
class Base_Model extends CI_Model
{
// Название таблицы
View gist:15470c517ede7ec5a9a2
<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();?>" />
View gist:c0c266063ebfaa7f31a6
<?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)
View gist:eb533b7f6ede45b23453
<?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();
You can’t perform that action at this time.