Ejemplo n.º 1
0
function kmini($f, $w, $h)
{
    $thumb = thumb_name(strrchr_b($f, '/'), $w, $h);
    if (!is_file($thumb) or $_GET['rebuild_img']) {
        //
        make_mini($f, $thumb, $w, $h, 0);
    }
    //1
    return '<img src="' . $thumb . '">';
}
Ejemplo n.º 2
0
Archivo: pop.php Proyecto: philum/cms
function make_thumb_b($mg, $dir = '')
{
    $xt = substr($mg, -3);
    $w = 140;
    $h = 100;
    list($w, $h) = split('/', prmb(27));
    $thumb = thumb_name(str_replace('/', '', $mg), $w, $h);
    //or filesize($thumb)<2048
    if (!file_exists($thumb) or $_GET['rebuild_img']) {
        make_mini($dir . $mg, $thumb, $w, $h, $_SESSION['rstr'][16]);
    }
    return '<img src="' . $thumb . '">';
}
Ejemplo n.º 3
0
Archivo: spe.php Proyecto: philum/cms
function make_thumb($mg, $prm)
{
    $ida = 'img';
    if (!file_exists($ida . '/' . $mg)) {
        return;
    }
    if (substr($mg, 0, 4) != "http") {
        $pre = 'imgc/';
    } else {
        $pre = "";
    }
    if ($prm == "h") {
        $rpm = 'height="36" class="imgl"';
    } elseif (is_numeric($prm)) {
        $rpm = 'title="' . rqt($prm, 2) . '"';
    } elseif ($prm == "nl") {
        $rpm = 'class="imgl"';
        $preb = host();
    } elseif ($prm == "hb") {
        $rpm = 'height="32" class="imgl"';
    } elseif ($prm == "no") {
        $rpm = '';
    } elseif ($prm == "") {
        $rpm = 'class="imgl"';
    } else {
        $ida = $prm;
        $rpm = '';
    }
    $thumb = $pre . $mg;
    if (!file_exists($thumb) && $mg && $pre or $_GET['rebuild_img']) {
        list($w, $h) = split('/', prmb(27));
        $mode = $_SESSION['rstr'][16] ? 0 : 2;
        make_mini($ida . '/' . $mg, $thumb, $w, $h, $mode);
    }
    return '<img src="' . $preb . '/' . $thumb . '" ' . $rpm . '>';
}
Ejemplo n.º 4
0
function slider_builder($re, $predir, $nod)
{
    require 'progb/spe.php';
    $minidir = 'gallery/mini/';
    $sqdir = 'msql/gallery/';
    $ref = read_vars($sqdir, $nod, '');
    $ret['_menus_'] = array('name', 'mini', 'img', 'width', 'height', 'mini_w', 'mini_h', 'text', 'size', 'color', 'align', 'position', 'alpha');
    //echo divd('barprogress','');
    $nb = count($re);
    //p($re);
    foreach ($re as $k => $v) {
        if (is_file($predir . $v) && stristr('jpggifpng', substr($v, -3)) !== false) {
            $i++;
            //echo js_code('barprogress('.$nb.'_'.$i.');'); //barprogress($nb,$i);
            if (substr($v, -1) == "/") {
                $v = substr($v, 0, -1);
            }
            $nnm = str_replace(array('users/', "/"), "", $predir . $v);
            list($width, $height) = getimagesize($predir . $v);
            list($newl, $newh) = slider_thumbs_size($width, $height);
            //echo $newl;
            //if(!is_file($minidir.$nnm)){}
            $reb = make_mini($predir . $v, $minidir . $nnm, $newl, $newh, 1);
            if (is_array($ref)) {
                if ($ref[$i][0] != $v && $ref[$i][0]) {
                    $vb = $ref[$i][0];
                } else {
                    $vb = $v;
                }
                $txt = $ref[$i][7];
                $size = $ref[$i][8];
                $clr = $ref[$i][9];
                $alg = $ref[$i][10];
                $pos = $ref[$i][11];
                $alp = $ref[$i][12];
            } else {
                $vb = $v;
            }
            $ret[$i] = array($vb, $nnm, $predir . $v, $width, $height, $newl, $newh, $txt, $siz, $clr, $alg, $pos, $alp);
        }
    }
    save_vars($sqdir, $nod, $ret);
    return $ret;
}
Ejemplo n.º 5
0
Archivo: art.php Proyecto: philum/cms
function make_thumb_css($im)
{
    if (!file_exists('imgc/' . $im)) {
        list($w, $h) = split('/', prmb(27));
        make_mini('img/' . $im, 'imgc/' . $im, $w, $h, 0);
    }
    return $im;
}
Ejemplo n.º 6
0
Archivo: ajxf.php Proyecto: philum/cms
function placeim($id)
{
    $ims = sql('img', 'qda', 'v', 'id=' . $id);
    $r = explode('/', $ims);
    foreach ($r as $k => $v) {
        if ($v) {
            $im = make_mini('img/' . $v, 'imgb/' . $v, $w, $h, $_SESSION['rstr'][16]);
            $ret .= ljb('', 'insert', '[' . $v . ']', image($im, '', ''));
        }
    }
    return popup('place images', $ret, 440);
}