function ifrim($f, $d) { $dr = 'users/public/ifrm/'; mkdir_r($dr); $fb = $dr . strrchr_b($f, '/'); write_file($fb, $d); return image('/' . $fb); }
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 . '">'; }
function addfonts_j($var1, $var2, $res) { $r = msql_read('', 'public_addfonts', ''); if ($r) { $rk = array_keys_r($r, 0, 'k'); } $res = ajx(substr($res, 0, -1), 1); $res = embed_detect($res, '{', '}', ''); $res = str_replace(array('"', "'", ' ', "\n", "\r", "\t", "?#iefix", "?", "!"), '', $res); $ra = explode(';', $res); $nb = count($ra); for ($i = 0; $i < $nb; $i++) { list($attrb, $value) = split_right(':', $ra[$i], 0); if ($attrb == 'font-family') { $rb['name'] = $value; } $rab = explode(',', $ra[$i]); if ($rab) { foreach ($rab as $k => $va) { $rt = embed_detect($va, 'url(', ')', ''); //echo $rt.br().br(); if ($rt && !$rk[$rb['name']]) { $rs = str_extract('#', $rt, 0, 0); $xt = strrchr_b($rt, '.'); if ($xt && substr($rs, 0, 4) == 'http' && $xt != 'eot?') { $rb[$xt] = $rs; } else { $noturl = 1; } } } } } if ($rb[0]) { $rb = msq_reorder($rb); } //p($rb); $dfb['_menus_'] = array('name', 'eot', 'woff', 'svg', 'ttf'); if (count($rb) > 1) { $r = msql_modif('users', 'public_addfonts', $rb, $dfb, 'push', ''); //p($rb); return addf_read($r); } else { return btn('txtred', $noturl ? 'not absolte url' : 'already_exists'); } }
function msqmerge($r, $d) { $d = strrchr_b($d, '_'); if ($r) { foreach ($r as $k => $v) { $dy = substr($v[1], 0, 6); $msg = $v[2]; $msg = delconn($msg); $msg = msqm_msg($msg); //echo 'eee'; //$msg=miniconn($msg); //$msg=embed_links($msg); //$msg=format_txt($msg,'',''); $msg = correct_txt($msg, '', 'sconn'); $msg = nl2br($msg); $ret[$v[0]] = array($d, lka($v[0], $dy), $msg, lka($v[3], picto('tw'))); } } return $ret; }
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'); $t = strprm($id, 1); $t = $t ? $t : strrchr_b($id, ':'); $t = $t ? $t : $id; $s = $va ? $va : 640; $ret = build_mod_r($id); break; case "ajxlnk": req('pop,spe,art,tri,mod'); $_SESSION[$va] = $id; if ($id != 'close') { $ret = build_mod_r($id); } break; case "ajxlnk2": req('pop,spe,art,tri,mod,boot'); if ($id == 'art') { deductions_from_read($va, $cache);
function miniconn_w($doc, $h) { list($pd, $c) = split_one(':', $doc, 1); if ($c && $pd != 'http') { $d = sconn_defs_r($pd, $c); if ($d != $doc) { return $d; } } if ($c) { $d = sconn_defs_app($pd, $c, $h); if ($d) { return $d; } } list($p, $o) = split_one('§', $doc, 1); if ($o) { if (is_numeric($p) && $o) { return pop_art('http://' . $h . '/' . $p . '§' . $o); } elseif ($p && $o) { return lkt('', $p, pictxt('get', $o)); } } $xt = strtolower(strrchr($doc, '.')); if ($xt == '.mp3') { $j = ajx(goodroot($doc, $h)); return lj('', 'popup_popmp3___' . $j, pictxt('music', strrchr_b($doc, '/'))); } if ($xt == '.pdf') { return pdfreader($doc); } if (is_image($doc)) { $im = goodroot($doc); if (@is_file($im)) { return popim($im, picto('img')); } elseif (strlen($doc) > 4) { return popim_w($im, $h); } } if (strpos($doc, "@") !== false && strpos($doc, '.') !== false) { return lka('mailto:' . $doc, strdeb($doc, '@')); } if (substr($doc, 0, 1) == '@') { return poptwit(substr($doc, 1)); } //if(substr($doc,0,1)=='@')return plugin_func('tracks','track_answer',substr($doc,1),''); //if(substr($doc,0,1)=='#')return call_plug('','popup','chatxml',substr($doc,1),pictxt('chat',substr($doc,1))); if ($pd == 'http') { return lkt('', $doc, pictxt('get', http_domain($doc))); } return $doc; }
function poptwit($d) { list($id, $nm) = explode('§', $d); if (strpos($id, '/')) { $id = strrchr_b($id, '/'); } return lj('txtx', 'popup_plup__3_twit_twit*build_' . ajx($id), pictxt('tw', $nm ? $nm : 'twitter')); }
function twit_vacuum($f) { $p = strrchr_b($f, '/'); require_once 'plug/tiers/Twitter.php'; $t = new Twitter(); $q = $t->read($p); $r = twit_datas($q); setlocale(LC_TIME, prmb(25) . '_' . strtoupper(prmb(25))); //$ret['from']='@'.$q['user']['screen_name']; $ret['suj'] = strftime('%H:%M - %d %b %Y', strtotime($q['created_at'])); $ret['day'] = $q['created_at']; $ret['msg'] = clean_firstspace($r['text']); if ($q['entities']['media']) { foreach ($q['entities']['media'] as $v) { $ret['msg'] .= "\n\n" . '[' . $v['media_url_https'] . ']'; } } if ($r['reply-to_id']) { $q = $t->read($r['reply-to_id']); $r = twit_datas($q); $answtxt = ucfirst(nms(91)) . ' ' . nms(36); $ret['msg'] .= "\n\n" . $answtxt . ' [' . $q['id'] . '§' . $r['name'] . ':poptwit]'; } return array($ret['suj'], $ret['msg'], $ret['day']); }
function savefunc_plug() { //save_all $r = explore('plug', 'full', 1); //pr($r); $ra = array('edit', 'dev', 'admin', 'ummo', 'photo'); //$ra=explore('plug','dirs',1); if ($ra) { foreach ($ra as $v) { $rb = explore('plug/' . $v, 'full'); //if($rb)foreach($rb as $vb)$r[]=$vb; } } foreach ($r as $v) { if ($v != 'userdl.tar.gz') { $p = strrchr_b($v, '/'); $p = strdeb($p, '.'); save_funcs($v, $p); } } }
function finder_data($r, $p, $rb) { if (!$r) { return array(array('f' => 'empty')); } if ($p) { $p .= '/'; } //ksort($r); foreach ($r as $k => $v) { $rc = ''; $rc['id'] = normalize($p . $k); $rc['pid'] = normalize($p); if (!is_numeric($k) or is_array($v)) { $rc['r'] = 1; $rc['f'] = $k; $nf = count($v); $nbd = 0; if (is_array($v)) { foreach ($v as $ka => $va) { if (!is_numeric($ka)) { $nbd++; } } } $rc['nbd'] = $nbd; $rc['opt'] = btn('txtsmall2', '(' . $nf . ')'); //nbof(,51) $rc['typ'] = 'folder'; $rc['j'] = ajx($p . $k) . '_'; } else { if ($rb[0] == 'shared') { $url = $v; $f = strpos($v, '/') !== false ? strrchr_b($v, '/') : $v; } else { $url = $p . $v; $f = $v; } $fb = fi_droot() . $url; $xt = xtb($f); $rc['url'] = $rc['url'] = $url; $rc['prop'] = strprm($p); if ($rb[1] == 'distant') { $rc['dist'] = 1; } else { $rc['opt'] = btn('txtsmall2', fsize($fb)) . ' '; $rc['date'] = btn('txtsmall2', ftime($fb, 'ymd')) . ' '; } $rc['xt'] = $xt; $rc['r'] = 0; $rc['j'] = ajx($url) . '_'; $rc['f'] = $f; if ($rb[0] == 'shared') { $rc['prop'] = btn('txtsmall', strprm($v)) . ' '; } if (is_file($fb) && $xt) { if (strpos('.jpg.png.gif', $xt) !== false && $rb[6] != 'pictos' && substr(fi_droot(), 0, 4) != 'http') { //set as mini $rc['img'] = make_thumb_c($fb, '48/48'); } else { $rc['typ'] = $xt; } } if ($rb[3] == 'icon') { if ($xt) { list($fd, $fl) = split_one('/', $url, 1); if ($xt == '.svg') { $fsvg = substr($url, 0, -4); $rc['conn'] = '[' . $fsvg . '§24:svg]'; $rc['img'] = svg($fsvg . '§24'); } elseif (strpos('.jpg.png.gif', $xt) !== false) { $rc['conn'] = '[' . substr($fl, 0, -4) . '§' . $fd . ':icon]'; } } } if ($rb[3] == 'disk') { $rc['conn'] = '[' . $url . ']'; } } $ret[] = $rc; } return $ret; }
function apps_explore($dr, $vir) { if ($vir) { $r = msql_read('', ses('qb') . '_shared', ''); } else { $r = explore('users/' . $dr); } if ($r) { foreach ($r as $k => $v) { if ($vir) { $t = strrchr_b($v[0], '/'); $f = $v[0]; $root = $v[1]; } elseif (is_numeric($k)) { $t = $v; $f = $dr . '/' . $v; $root = $dr; } else { $t = $k; $f = $dr . '/' . $k; $root = $dr . '/' . $k; } if (is_numeric($k)) { if (is_image('users/' . $f)) { $rb[] = array($t, 'img', '', $f, '', '', $root, '', '', ''); } else { $rb[] = array($t, 'file', '', $f, '', '', $root, '', '', ''); } } else { $rb[] = array($t, 'explore', $f, '', '', '', $root, '', '', ''); } } } return $rb; }
$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,api,art,spe,tri,mod'); $t = strrchr_b($id, ':'); $t = $t ? $t : strprm($id, 1); $t = $t ? $t : $id; $s = $va ? $va : 640; $ret = build_mod_r($id); break; case "ajxlnk": req('api,pop,spe,art,tri,mod'); if ($va) { $_SESSION[$va] = $id; } if ($id != 'close') { $ret = build_mod_r($id); } break; case "ajxlnk2":
function mod_link_r($m, $v) { //m§v:picto $qb = ses('qb'); list($va, $vb) = explode(':', $v); switch ($m) { case 'credits': return array('bevel', 'j', 'popup_about', picto('phi2')); break; case 'admin': return array('', '', '/?admin==&log=open', picto('admin')) . ' '; break; case 'root': return array('', 'j', 'popup_desktop___desk', picto('folder2')); break; case 'desk': return array('', 'j', 'desktop_desk', picto('folder')); break; case 'deskboot': return array('', 'SaveJc', desktop_cond('boot', 1), picto('desktop')); break; case 'desktop': return array('', 'SaveJc', 'page_deskbkg;popup_site___desktop_ok__autosize', picto('window')); break; case 'folder': return array('', 'j', 'popup_modpop__3_local|real//////folder2///1:desktop*files_480', picto('folder')); break; case 'art': return array('', 'j', 'popup_popart__3_' . $va . '_3', picto('articles')); break; case 'search': return array('', 'j', 'popup_search', picto('search')); break; case 'taxonav': return array('', 'j', 'popup_plup___taxonav', picto('topo')); break; case 'rss': return array('', '', '/rss/' . $qb, picto('rss')); break; case 'contact': return array('', 'j', 'popup_track___' . $qb, picto('mail')); break; case 'tablet': return array('', 'j', 'socket_tog__self_tablet', picto('gsm')); break; case 'hub': return array('', '', prep_host($m), $v ? $v : prep_host($m), ''); break; case 'apps': //apps§14:users if ($vb) { $r = msql_read('system', 'default_apps' . ($vb == 'default' ? '' : '_' . $vb), $va); } elseif ($va) { $r = msql_read('', $_SESSION['qb'] . '_apps', $va); } $r = array($r['button'], $r['type'], $r['process'], $r['param'], $r['option'], '', '', $r['icon'], '', $r['private']); return array('', 'j', read_apps($r), $r[7] ? picto($r[7]) : $r[0]); break; case 'mod': list($va, $vb) = explode("-", stripslashes($v)); return array($_GET['slct_mods'], htac('slct_mods'), $va, $vb ? picto($vb) : 'Design', ''); break; case 'ajax': return array('', 'j', $va, $vb); break; } //user_menus if ($vb == 'picto') { $v = picto($va); } elseif ($vb == 'icon') { $v = ico($va); } //modules if (substr($m, 0, 1) == '/') { list($action, $lk) = split_one('/', substr($m, 1), 0); switch ($action) { case 'module': return array($_GET['module'], htac('module'), $lk, $v ? $v : $m, ''); break; case 'plug': $v = $vb == 'picto' ? $v : strrchr_b($m, '/'); return array($_GET['plug'], htac('plug'), $lk, $v); break; case 'plugin': $v = $vb == 'picto' ? $v : strrchr_b($m, '/'); return array($_GET['plugin'], htac('plugin'), $lk, $v); break; case 'app': return array($_GET['app'], htac('app'), $lk, $v ? $v : $m, ''); break; } } elseif ($_SESSION['line'][$m]) { return array($_SESSION['frm'], htac('section'), $m, $v ? $v : $m, ''); } elseif (is_numeric($m)) { if (!$v) { $v = $_SESSION['rqt'][$v][2]; } return array($_GET['read'], htacc('read'), $m, $v, 'art'); } elseif ($m == 'home' or $m == 'all') { return array(strtolower(get('module')), '', $m, $v ? $v : $m, ''); } else { return array('', '', $m, $v ? $v : $m); } }
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); }