Exemple #1
0
function plug_cubes($d)
{
    req('pop');
    $w = currentwidth();
    $r = $_SESSION['rqt'];
    $cols = 4;
    $c = $cols * 3;
    $n = count($r);
    $nl = ceil($n / $c);
    $l = $w / $c;
    $cats = array_keys_r($r, 1, 'k');
    $clr = cub_clr($cats);
    foreach ($r as $k => $v) {
        if ($v[11] > 1 && $v[3]) {
            $lx = $l * ($v[11] - 1);
            //$pub=minimg($v[3],"h").lka(htac($k),$v[2]);
            //$pub=make_thumb_d($v[3],round($lx).'/'.round($lx));//
            $pub = image('/imgc/' . $v[3], round($lx), round($lx));
            $pub = lka(htac($k) . '" title="' . $v[2], $pub);
            $ret .= divs(cub_sz($lx, $clr[$v[1]]), $pub);
        }
    }
    //for($ic=0;$ic<$c;$ic++){}
    //for($ib=0;$ib<$nl;$ib++){$i++;}
    return $ret;
}
Exemple #2
0
function embed_gallery($f, $id)
{
    $w = currentwidth();
    $h = $w * (3 / 4);
    if (!$f) {
        $cachefile = $id;
    } else {
        $cachefile = $f;
    }
    $fvars = '&servr=' . host() . '/&rot=' . $cachefile . '&clr=' . $_SESSION['clrs'][$_SESSION['prmd']][6];
    $file = 'gallery/cache/' . str_replace("/", "--", $cachefile . '/') . '.php';
    $goto = 'gallery/gal.php?root=' . $f . '&pid=' . $id . '&rebuild==';
    if (!is_file($file)) {
        return lkt('red', $goto, picto('alert'));
    }
    if ($_SESSION['USE']) {
        $add = lkt('', $goto, picto('builders'));
    }
    return embed_flsh('fla/gallery.swf', $w, $h, $fvars) . $add;
}
Exemple #3
0
function f_inp_track($id, $msg = '')
{
    $w = currentwidth() - 100;
    $user = $_GET['user'];
    if ($_SESSION['USE']) {
        $use = $_SESSION['USE'];
    } else {
        list($use, $ml) = sql('name,mail', 'qdi', 'r', 'host="' . hostname() . '" ORDER BY id DESC LIMIT 1');
    }
    $gn = '" onkeyup="log_goodname(\'trkname\');';
    if ($user) {
        $ret .= btn("txtred", nms(29) . ' ' . nms(34) . ': ' . $user);
    }
    $ret .= ljb('popsav', 'SaveBbd', 'track_' . ($user ? $user : $id) . '_1', nms(28)) . btd('bts', '') . ' ';
    if (rstr(2) && !auth(4)) {
        $ret .= btn('small', helps('tracks_moderation'));
    }
    if ($_SESSION['USE']) {
        $ret .= hidden('name', 'trkname', $use) . hidden('mail', 'trkmail', '');
        $ret .= hidden('sb', 'trkscr', '') . hidden('sc', 'trkscrvrf', '');
    } else {
        $ret .= autoclic('name" id="trkname' . $gn, $use, '8', '50', '', 1) . ' ';
        //name
        $ret .= autoclic('mail" id="trkmail', $ml ? $ml : 'mail', '13', '50', '', 1) . ' ';
        //mail
        if (!$user && $id != $_SESSION['qb']) {
            $ret .= hlpbt('track_follow') . ' ';
        }
        $ret .= secure_tracks() . br();
    }
    //$ret.=balc('button','txtx" onclick="embed(\'video\')',picto('video'));
    $ret .= btd('bts' . $id, $sav) . ' ' . hlpbt('trackhelp') . ' ';
    //.hlpbt('track_orth').' ';
    $ret .= lj('" title="' . nms(65), 'popup_trkpreview_txtarea_', picto('view')) . ' ';
    //$ret.=divedit('txtarea','track','min-height:100px; min-width:320px;','',$d?$d:$msg);
    $ret .= micro_connedit('txtarea') . br() . txarea('txtarea', $d ? $d : $msg, 80, 16, atc('console')) . br();
    return $ret . $r['html'];
}
Exemple #4
0
function plug_rollovertopop($doc, $t)
{
    $id = 'curtain' . randid();
    //return imgico($a.'" onmouseover="this.src=\''.$b.'\'" onmouseout="this.src=\''.$a.'\'');
    list($v, $p) = split_one('�', $doc, 1);
    $img = make_thumb_d($v, $p);
    //
    $im = goodroot($v);
    list($l, $h) = getimagesize($im);
    $send = 'photo_' . str_replace("_", "*", $im) . '_' . $l . '_' . $h;
    if ($_SESSION['nl']) {
        $thumb = image($im, currentwidth(), '');
    }
    //$ret=ljb("","SaveBf",$send,$img);
    $oc = 'SaveBf(\'' . $send . '\')';
    $ov = 'getbyid(\'' . $id . '\').style.background-color:rgba(0,0,0,0);';
    $ret = lkh($oc, $ov, $thumb);
    $sty = 'position:absolute; width:340px; height:240px; background-color:rgba(0,0,0,0.5); text-align-center; vertical-align:center;';
    $title = divs('width:140px; height:40px; background-color:#;', $t);
    $ret .= div(' style="' . $sty . '" id="' . $id . '"', '');
    //return imgico($a.'" onmouseover="this.src=\''.$b.'\'" onmouseout="this.src=\''.$a.'\'');
    return $ret;
}
Exemple #5
0
         $_GET['dig'] = $opt;
     } elseif ($opt) {
         $_GET[$opt] = $optb;
     }
     $_SESSION['load'] = define_load();
     $tt = $id . ':' . $va;
     $s = prma('content');
     $ret = output_load($_SESSION['load'], slct_media());
     break;
 case "modj":
     req('mod,pop,art,spe,tri');
     $ret = modj($id, $va);
     break;
 case "site":
     list($w, $h) = explode('-', $sz);
     $w = currentwidth();
     $h = $h ? $h - 80 : 640;
     if ($id) {
         $go = '?' . $id . '=' . $va;
     }
     $ret = iframe('index.php' . $go . '§' . ($w + 24) . '/' . $h, '');
     $t = $_SESSION['qb'];
     break;
 case "ucom":
     $ret = 'module/' . $id;
     if ($va) {
         $t = $va;
     }
     break;
 case "modpop":
     req('pop,spe,art,tri,mod');
Exemple #6
0
function sconn($doc)
{
    //artwedit
    list($pdoc, $xf) = split_one(':', $doc, 1);
    if ($xf && $pdoc != 'http') {
        $d = sconn_defs_r($pdoc, $xf);
        if ($d != $doc) {
            return $d;
        }
    }
    if ($xf) {
        $d = sconn_defs_app($pdoc, $xf);
        if ($d) {
            return $d;
        }
    }
    $xt = strtolower(strrchr($doc, "."));
    if ($xt == ".mp3") {
        $doc = goodroot($doc);
        return audio($doc);
    }
    if ($xt == ".pdf") {
        return pdfdoc($doc, 'img/', $media);
    }
    //pdf
    if (is_image($doc) && strpos($doc, "§") === false && strpos($doc, "<") === false) {
        //images
        $large = currentwidth() - 20;
        $largb = round($large * 0.5);
        if (strpos($doc, "http") !== false) {
            return image($doc);
        }
        return place_image($doc, $media, $large, $largb);
    }
    if (strpos($doc, "§") or strpos($doc, "http") !== false or strpos($doc, "@") !== false) {
        //liens
        $lk = prepdlink($doc);
        if (is_image($lk[0])) {
            if (strpos($lk[0], "http") !== false) {
                return image($lk[0]);
            }
            return popim(goodroot($lk[0]), $lk[1]);
        } elseif (is_image($lk[1]) == true) {
            //link§im
            if (is_numeric($lk[0])) {
                $lk[0] = urlread($lk[0]);
            }
            if (strpos($lk[1], "http") !== false) {
                return lka($lk[0], $lk[1]);
            }
            return lkc("", $lk[0], place_image($lk[1], $media, $large, $largb));
        } elseif (strpos($lk[0], "http") !== false) {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], "/") !== false) {
            return lka(goodroot($lk[0]), $lk[1]);
        } elseif (substr($lk[0], 0, 1) == "/") {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], "@") !== false && strpos($lk[0], ".") !== false) {
            return lkc("", 'mailto:' . $lk[0], $lk[1]);
        } elseif (strpos($doc, "@") !== false && strpos($doc, ".") !== false) {
            return lkc("", 'mailto:' . $doc, $doc);
        } elseif (is_numeric($lk[0])) {
            return jread('', $lk[0], $lk[1]);
        }
    }
    return $doc;
}
Exemple #7
0
function gallery_j_slct($doc, $id, $d)
{
    $large = currentwidth();
    list($id, $idn) = explode('-', $id);
    $dcb = ajx($doc, '');
    $mp = 'impos' . $idn;
    list($r, $src) = decide_source($doc, $id);
    $nb = count($r);
    if (is_numeric($d)) {
        $_SESSION[$mp] = $d;
    } elseif ($d == 'next') {
        $_SESSION[$mp]++;
    } elseif ($d == 'prev') {
        $_SESSION[$mp]--;
    }
    if ($_SESSION[$mp] >= $nb) {
        $_SESSION[$mp] = 0;
    }
    if ($_SESSION[$mp] < 0) {
        $_SESSION[$mp] = $nb - 1;
    }
    if (!$src) {
        $dir = jcim($r[$_SESSION[$mp]]);
    } else {
        $dir = $src;
    }
    $im = $dir . $r[$_SESSION[$mp]];
    $img = image($im, $large, '');
    if (is_file($im)) {
        list($w, $h) = getimagesize($im);
    }
    if ($w > $large) {
        $ret = ljb('', 'SaveBf', 'photo_' . ajx($im, '') . '_' . $w . '_' . $h, $img);
    } else {
        $ret = $img;
    }
    return $javs . $ret;
}
Exemple #8
0
function colonize($re, $prm, $id, $cls, $w = '', $b = '')
{
    $b = $b ? 'div' : 'ul';
    $w = $w ? $w : currentwidth() - 10;
    $ret = onxcols($re, $prm, $w);
    $wb = atd($id) . atc($cls) . ats('width:100%;');
    //-($prm*5)
    return balb($b, $wb, $ret) . divc("clear", "");
}
Exemple #9
0
 //call
 case "popbub":
     req('bubs,spe');
     $ret = bub_root($id, $va);
     break;
 case "plugin":
     if ($id) {
         $ret = plugin($id, $va, $opt, $optb, $res);
     }
     break;
 case "plupin":
     if ($id) {
         $ret = plugin($id, $va, $opt, $optb, $res);
     }
     $t = $id;
     $s = currentwidth();
     $p = $p1;
     break;
     //$id=='iframe'?720:
 //$id=='iframe'?720:
 case "plug":
     $ret = plugin_func($id, $va, $opt, $optb, $res);
     break;
 case "plup":
     if ($optb > 200 && $optb < 1000) {
         $s = $optb;
         $optb = '';
     } else {
         $s = 440;
     }
     $p = $p1;
Exemple #10
0
function plug_sliderJ($f, $id, $o)
{
    $w = currentwidth();
    static $i;
    $i++;
    $r = msql_read('gallery', $f, '');
    if ($o) {
        sliderJ_javs($f, $i);
        $ret = sliderJ_thumbs($r, $f, $i);
    }
    //else $ret.=sliderJ_nav($i,$f,$r);
    if ($r) {
        $ret .= divd('sdj' . $i, sliderJ_img($f, '1-' . $i));
    }
    if (auth(4)) {
        $ret .= lj('', 'popup_slider___' . ajx($f, '') . '_' . $id, picto('edit'));
    }
    return $ret;
}