示例#1
0
文件: cart.php 项目: philum/cms
function plug_cart()
{
    if ($_GET["del"]) {
        unset($_SESSION['cart'][$_GET["del"]]);
    }
    $ar[] = array("", "réf", "titre", "prix", "qté", "sub_total", "x");
    //"ancien prix","remise",
    if ($_SESSION['cart']) {
        foreach ($_SESSION['cart'] as $k => $v) {
            $save .= $k . '=' . $v . ';' . "\r";
            list($day, $frm, $tit, $amg, $nod, $tag, $lu, $re, $host, $mail, $ib) = pecho_arts($k);
            list($prx, $ref, $stock) = prod_from_art($k);
            //,$reduc,$descript
            $tit = lkc("txtcadr", good_url($k, 'read'), $tit) . '' . br();
            $img = minimg($amg, 1) . br();
            //if($reduc){$oldprice=$prix;$prx=round($prix*($reduc/100));}
            //else{$oldprice="";$prx=$prix;}//prix
            $qte = qtes($k, $v);
            $erz = lkc('', '?plug=cart&del=' . $k, 'x');
            $ar[] = array($img, $ref, $tit, $prx, $qte, $prx * $qte, $erz);
            //$oldprice,$reduc,
            $total += $prx * $qte;
        }
        $_SESSION["prixtotal"] = $total;
        $ar[] = array("", "", "", "", "total", $total);
        //"","",
        $tb = make_table($ar, 'txtred', '');
        //$tb=str_replace("table",'table width="100%"',$tb);
        $tb = str_replace("td", 'td class="txtblc" align="center"', $tb);
        //$_SESSION["commande"]=$tb;
        $ret = $tb . br();
        $ret .= ljb('txtbox', 'jumpval', 'ref5_command::' . $save, $_SESSION['nms'][27]) . br() . br();
        $ret .= nl2br(make_form_fromstring('::Name=input::Adress=input::city=input::Email=input::Message=text', ''));
    } else {
        $ret = btn("txtred", "empty_cart");
    }
    return $ret;
}
示例#2
0
文件: art.php 项目: philum/cms
function prepare_thumb($d)
{
    if ($_SESSION['rstr'][30] == "1") {
        return;
    }
    if ($_SESSION['nl']) {
        $prm = 'nl';
    }
    return minimg($d, $prm);
}
示例#3
0
文件: favs.php 项目: philum/cms
function fav_art($id, $rtg = '')
{
    $im = minimg(sql('img', 'qda', 'v', 'id=' . $id), 'h');
    $day = sql('day', 'qda', 'v', 'id=' . $id);
    $dat = mkday($day) . ' ';
    if ($rtg) {
        $tag = fav_tag_maker($rtg) . ' ';
    }
    //$del=plugin('like',$id,1).' ';
    $suj = bal('h4', suj_of_id($id) . ' ');
    if ($id) {
        return divc('txtcadr', $im . $dat . $tag . $del . lj('', 'popup_popart__3_' . $id . '_3', $suj));
    }
}
示例#4
0
文件: mod.php 项目: philum/cms
function pub_img($id)
{
    list($dy, $frm, $suj, $amg) = $_SESSION['rqt'][$id];
    if (!$dy) {
        $amg = sql('img', 'qda', 'v', 'id=' . $id);
    }
    return lkc("", urlread($id), minimg($amg, 'ban'));
}
示例#5
0
文件: art.php 项目: philum/cms
function prepare_thumb($d, $id)
{
    if ($_SESSION['rstr'][30] == '1') {
        return;
    }
    if ($_SESSION['nl']) {
        $pr = 'nl';
    }
    if (rstr(93)) {
        $mg = best_img_s($d, $id);
        if ($mg) {
            $im = make_thumb_css($mg);
        }
        if ($im) {
            return div(ats('background:url(/imgc/' . $im . ') center;') . atc('thumb'), '');
        }
    }
    return minimg($d, $pr);
}
示例#6
0
文件: mod.php 项目: philum/cms
function pub_img($id)
{
    list($dy, $frm, $suj, $amg) = $_SESSION['rqt'][$id];
    if (!$dy) {
        $amg = rse("img", $_SESSION['qda'] . " WHERE id='{$id}'");
    }
    return lkc("", urlread($id), minimg($amg, "ban"));
}