示例#1
0
文件: styl.php 项目: philum/cms
function facil_images($k, $url, $val)
{
    $ret .= btn('txtx', toggle('', 'bkg' . $k . '_dsnav_bkg_' . $k, 'backgrounds')) . ' ';
    if (strpos($val, ':url(/') !== false) {
        $ret .= lkc("txtred", $url . '&save_img=' . $k . '&erase_img==', 'delete_background');
    }
    $ret .= btd('bkg' . $k, '');
    $mnu_bkg = array('', "no-repeat", "repeat-x", "repeat-y", "repeat");
    $mnu_im_align = array('', "left", "right", "center");
    $mnu_im_valign = array('', "top", "bottom", "center");
    if (strpos($val, "background:url") !== false) {
        $t_ims = embed_detect($val, "background:url", ";", '');
    }
    list($urb, $reap, $fixd, $alg, $vlg) = explode(" ", $t_ims);
    if ($fixd) {
        $chk = ' checked';
    }
    if ($urb) {
        $urb = substr($urb, 1, -1);
        $ret .= lkt('txtx', $urb, 'open') . br();
    }
    $mnu .= select(atn('repeat'), $mnu_bkg, 'vv', $reap) . ' ';
    $mnu .= select(atn('align'), $mnu_im_align, 'vv', $alg) . ' ';
    $mnu .= select(atn('valign'), $mnu_im_valign, 'vv', $vlg) . ' ';
    $mnu .= checkbox('fixed', 'fixed', 'fixed', $chk);
    //$upl=upload_btn('upl',$url.'&save_img='.$k,'upload').br();
    return $ret . imgform($url . '&save_img=' . $k, $mnu, '');
}
示例#2
0
文件: admin.php 项目: philum/cms
function adm_avatar($o)
{
    $f = '/imgb/avatar_' . ses('USE') . '.gif';
    if (!is_file($f)) {
        $f = 'avatar/Gems/EmeraldSquare.gif';
    }
    if (!$o) {
        $ret = divd('avatar', image($f, '48', '48')) . br();
    }
    $r = explore('avatar/', 'dirs');
    foreach ($r as $k => $v) {
        $rt[$k] = avatar_slct($k);
    }
    $rt['upload'] = imgform('/?admin=avatar&avnim=ok', '', '(48*48)');
    $rt['upload'] .= lj('txtx', 'avatar_call___admin_avatar*sav__ko', 'none');
    return $ret . make_tabs($rt);
}