<input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" class="form-cart" style="display:none;">
<select class="countOrders" value="<?php echo $product['quantity']; ?>" >
<?php for($i=1; $i<=20; $i++):?>
<option value="<?=$i?>" <?=($i == $product['quantity'] ? ' selected="selected"' : '' )?>><?=$i?> шт</option>
<?php endfor;?>
</select>
<span class="input-group-btn">
<button type="button" data-toggle="tooltip" class="btn btn-danger" onclick="cart.remove('<?php echo $product['key']; ?>');"><i class="fa fa-times-circle"></i></button>
</span>
Гдето внизу подключить
<script>
$( document ).ready(function() {
$('.countOrders').on('change', function(e){
$(this).prev().val( $(this).val() );
$('#cart-form2').submit();
})
});
</script>
<input type="text" name="quantity[<?php echo $product['key']; ?>]" value="<?php echo $product['quantity']; ?>" size="1" class="form-cart" style="display:none;"/>
<select class="countOrders" value="<?php echo $product['quantity']; ?>" onchange="$(this).prev().val( $(this).val()); $('#cart-form2').submit(); " >
<?php for($i=1; $i<=20; $i++):?>
<option value="<?=$i?>" <?=($i == $product['quantity'] ? ' selected="selected"' : '' )?>><?=$i?> шт</option>
<?php endfor;?>
</select>
<span class="input-group-btn">
<button type="button" data-toggle="tooltip" class="btn btn-danger" onclick="cart.remove('<?php echo $product['key']; ?>');"><i class="fa fa-times-circle"></i></button>
</span>
<code>
curl -s http://getcomposer.org/installer | php
curl -s http://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
<?php $arrAttr = ['icq' => 'Label ICQ' , 'email' => 'Ваш email' ]; ?>
<?php foreach($arrAttr as $key=> $attr):?>
<?php if (property_exists($user, $key)) : ?>
<p class='attr'><?= $attr?></p><p><?=$user->{$key}; ?></p>
<?php endif; ?>
<?php endforeach;?>
# Услуги, списать баланс раз в день в 24:00 по мск
0 0 * * * /usr/bin/php -f /home/user/data/www/setename.biz/yii service/index
class DB {
public static $pdo = null;
public static function connect(){
if(self::$pdo === null ){
self::$pdo = connectDB($host,$user,$pass,$db,$charset);
}
return self::$pdo;
}
}
<?php
return [
'host => 'localhost', 'username' => 'root' , 'password' => 122
];
$config = include(PATH_CONFIG);