Esempio n. 1
0
File: ajxf.php Progetto: philum/cms
function photo_screen($im, $w, $h, $sz)
{
    $ng = ses('negcss') ? '_neg' : '';
    $klr = $_SESSION['clrs'][$_SESSION['prmd'] . $ng];
    list($sw, $sh, $ph, $id) = explode('-', $sz);
    $sw -= 60;
    $sh -= 40;
    $id = is_numeric($id) ? $id : $_SESSION['read'];
    if (!$id) {
        list($hub, $id, $nm) = explode('_', $im);
    }
    if (!$w && !$h) {
        list($w, $h) = fwidth($im);
    }
    if ($w && $h) {
        $r1 = $w / $h;
    }
    $r2 = $sw / $sh;
    $ml = ($sw - $w) / 2;
    $mt = ($sh - $h) / 2;
    $nw = $w;
    $nh = $h;
    if ($r1 > $r2) {
        if ($w > $sw) {
            $ml = 0;
            $nw = $sw;
            $nh = $h * ($sw / $w);
            $mt = ($sh - $nh) / 2;
        }
    } else {
        if ($h > $sh) {
            $mt = 0;
            $nh = $sh;
            $nw = $w * ($sh / $h);
            $ml = ($sw - $nw) / 2;
        }
    }
    if ($id) {
        $o = photos_art_bt(substr($im, 4), $sz, $id);
    }
    $rid = randid('imz');
    $o .= lkt('', $im, picto('url')) . ' ';
    if ($w > $nw or $h > $nh) {
        $o .= lj('', 'pagup_overim__x_' . ajx($im) . '_' . $sz, picto('fullscreen')) . ' ';
    }
    $cs1 = atd('popu') . ats('position:absolute; width:' . $nw . 'px; height:' . $nh . 'px; box-shadow:0 0 100px 10px #000; z-index:-1; background:#ddd;"');
    $popa = popa(' ', $o);
    //strrchr_b($im,'/')
    if (substr($im, 0, 4) != 'http') {
        $im = '/' . $im;
    }
    return $popa . div($cs1, divd($rid, image($im, round($nw), round($nh))));
}
Esempio n. 2
0
File: ajax.php Progetto: philum/cms
function popup($t, $d, $w = '', $p = '')
{
    if ($w) {
        $s = 'max-width:' . ($w + 16) . 'px;';
    }
    if ($p == 1) {
        $p = lj('', 'page_deskbkg', picto('desktop')) . ' ';
    }
    $popa = popa($t, $p, $s);
    $_SESSION['popm'] = '';
    return div(atc('popup') . ats($s), $popa . div(atd('popu') . atc('popu'), $d));
}
Esempio n. 3
0
File: ajax.php Progetto: philum/cms
function popup($t, $d, $w = '', $p = '')
{
    if ($w) {
        $s = 'max-width:' . ($w + 16) . 'px;';
    }
    if ($p == 1) {
        $p = lj('', 'page_deskbkg', picto('desktop')) . ' ';
    }
    if ($p == 2) {
        $p = ljb('', 'pagrepos()', '', picto('expand')) . ' ';
    }
    $popa = popa($t, $p, $s);
    $_SESSION['popm'] = '';
    // onresize="poprepos()"
    return div(atc('popup') . ats($s) . atb('onmouseup', 'stop_drag(event)'), $popa . div(atd('popu') . atc('popu'), $d));
}
Esempio n. 4
0
File: ajxf.php Progetto: philum/cms
function photo_viewer($im, $w, $h, $sz)
{
    list($sw, $sh) = explode('-', $sz);
    if (substr($im, 0, 4) == 'http') {
        list($srv, $im) = split_one('/', str_replace('http://', '', $im));
    } else {
        $srv = $_SERVER['HTTP_HOST'];
    }
    $ob = '<embed src="fla/viewer.swf" width="' . $sw . '" height="' . $sh . '" FlashVars="&servr=http://' . $srv . '/&rot=' . $im . '&imw=' . $w . '&imh=' . $h . '" quality="high" allowfullscreen="true" />';
    $cs1 = atd('popu') . ats('position:absolute; width:' . $sw . 'px; height:' . $sh . 'px; box-shadow:2px 2px 10px #555;"');
    $popa = popa(strrchr_b($im, '/'), photos_art_bt(substr($im, 4, $id), $sz), 'background:rgba(255,255,255,0.9); padding:0 4px;');
    return $popa . div($cs1, $ob);
}