예제 #1
0
    if ($arItem["DELAY"] == "Y") {
        $k++;
        ?>
        <div class="col-xs-6 col-sm-4 col-md-3 item">
            <!-- SHOP FEATURED ITEM -->
            <article class="shop-item shop-item-wishlist overlay-element">
                <div class="overlay-wrapper">
                    <a href="<?php 
        echo $arItem['DETAIL_PAGE_URL'];
        ?>
">
                        <img src="<?php 
        echo $arItem['PICTURE']['SRC'];
        ?>
" style="padding:<?php 
        echo margin($arItem['PICTURE']['HEIGHT'], $arParams['DISPLAY_IMG_HEIGHT'], $arItem["PICTURE"]["WIDTH"], $arParams['DISPLAY_IMG_WIDTH'], false);
        ?>
" alt="<?php 
        echo $arItem['NAME'];
        ?>
">
                    </a>
                    <div class="overlay-contents">
                        <div class="shop-item-actions">
                            <form action="<?php 
        echo $APPLICATION->GetCurPage(true);
        ?>
">
                                <input type="hidden" name="action" value="DELETE_FROM_DELAY">
                                <input type="hidden" name="id" value="<?php 
        echo $arItem['ID'];
예제 #2
0
echo GENERATE_STYLE;
echo '<table cellspacing="0">
<tr>';
$column = 0;
$row = 0;
for ($i = $_POST['from']; $i < $_POST['from'] + 44; $i++) {
    $i = trim($i);
    if (!ctype_digit($i) or empty($i) or strlen($i) > 8) {
        continue;
    }
    validate::KOD($i);
    while (true) {
        if (!$_POST['no_' . $row . '_' . $column]) {
            break;
        } else {
            echo '<td></td>';
            column($column, $row);
            continue;
        }
    }
    $kod = str_pad($i, 8, '0', STR_PAD_LEFT);
    echo '<td style="padding-left: ' . margin($column % 4) . 'mm;">
<img src="data:image/gif;base64,' . base64_encode(kod($kod)) . '" alt=""><br>' . $kod . '
</td>
';
    column($column, $row);
}
while (true) {
    column($column, $row);
}
echo GENERATE_END;
예제 #3
0
 // get info
 $fetchQ = $sql->prepare("select price,current_margin,margin,servings,upc from recipes where id=?");
 $fetchR = $sql->execute($fetchQ, array($id));
 $fetchW = $sql->fetch_array($fetchR);
 // calculate a price to meet desired margin
 $recipe_cost = $fetchW['price'] - $fetchW['current_margin'];
 $newprice = $recipe_cost + $fetchW['margin'];
 $newprice = (string) $newprice;
 $len = strlen($newprice);
 $newprice[$len - 1] = '9';
 // update the price
 $upQ = $sql->prepare("update recipes set price=? where id=?");
 $upR = $sql->execute($upQ, array($newprice, $id));
 setPrice($fetchW['upc'], $newprice);
 // re-do current margin
 $newcurrentmargin = margin($id);
 $upQ = $sql->prepare("update recipes set current_margin=? where id=?");
 $upR = $sql->execute($upQ, array($newcurrentmargin, $id));
 // new price field
 $out .= "<b>Price</b>: {$newprice} [ ";
 $out .= "<a href=\"\" onclick=\"editPrice(); return false;\">";
 $out .= "<img src='images/b_edit.png'></a> ]";
 $out .= "<input type=hidden id=hrecipeprice value=\"{$newprice}\" />";
 // extra separator
 $out .= "`";
 // new current margin field
 if ($newcurrentmargin < $fetchW['margin']) {
     $out .= currentMarginDiv($newcurrentmargin, '#bb0000');
 } else {
     $out .= currentMarginDiv($newcurrentmargin, '#00bb00');
 }