function ftp_act($p, $f, $res) { $res = ajxg($res); if (!is_file($f)) { $ret = 'not exists'; } elseif (!auth(7)) { $ret = 'no'; } else { switch ($p) { case 'rename': $fc = $p; $ret = 'renamed as ' . $res; break; case 'delete': $fc = 'unlink'; $ret = 'was deleted'; $res = ''; break; case 'copy': $fc = $p; $ret = 'copied at ' . $res; break; case 'infos': $ret = 'infos: ' . fsize($f) . ' ' . ftime($f); break; } } if ($fc) { $ok = call_user_func($fc, $f, $res); } if ($fc && !$ok) { return btn('txtyl', 'error'); } return btn('txtyl', $ret); }
function plug_chat($p, $msg, $res = '') { //$_SESSION['muse']=''; $p = $p ? normalize($p) : 'public'; ses('muse', $res ? ajxg($res) : ses('USE')); return chatform($p, $msg) . divd('cht' . $p, chatread($p)); }
function pad_write($p, $o, $res) { $pad = 'pad' . ses('USE') . date('ymd'); $f = 'plug/_data/' . $pad . '.txt'; write_file($f, ajxg($res)); return lkt('popbt', root() . $f, $pad); }
function pictos_save($k, $d, $res) { $file = ajxg(trim($res)); $r = array($file); $r = msql_modif('system', 'program_pictos', $r, '', 'one', $k); $_SESSION['icons'][$k] = $file; return ico($file); }
function sugg_pad($p, $o, $res = '') { $p = ajxg($res); $d = sugg_import($p); $ret .= divedit('sugpad', 'tab justy scroll', '', $j, $d); $ret .= lj('popsav', 'sugg_plug__3_suggest_sugg*j___sugurl|sugnam|sugpad', nms(126)) . ' '; return $ret; }
static function j($p, $o, $res = '') { //list($p,$o)=ajxp($res,$p?$p:1,$o); if (!$p) { $p = ajxg($res); } $ret = self::build($p, $o); return $ret; }
function umvcsav($p, $o, $res) { $def = ajxg($res); $rb = sql_inner('frm', 'qdm', 'qda', 'id', 'k', 'where nod="ummo" and substring(frm,1,1)!="_" and frm!="études" and frm!="Idéogrammes" and frm!="AiooyaaOaxiiboo" and re>0 and msg like "% ' . $p . ' %"', ''); if ($rb) { $ref = implode(' ', array_keys($rb)); } $defs = array(strtoupper($p), $def, '', $ref); msql_modif('', ses('umvcnod'), $defs, '', 'push', ''); return ud_search($p, '1', ''); }
function readerurl($a, $b, $f) { $f = ajxg($f); req('tri,pop'); if ($f) { list($suj, $ret, $rec, $defid, $defs) = vacuum($f, ''); } $ret = format_txt_r($ret, '3', ''); $ret = nl2br(embed_p($ret)); return bal('h2', $suj) . $ret; }
function asciicode_j($a, $b, $res) { if (!$a) { $a = ajxg($res); } $r = str_split($a); $n = count($r); for ($i = 0; $i < $n; $i++) { $ret .= ascoo($r[$i]); } return $ret; }
function upurlsav($dr, $o, $u) { $u = ajxg($u); if (!is_image($u)) { return 'no'; } $ret = get_file($u); $nm = strrchr($u, '/'); $f = 'users/' . $dr . '/' . $nm; write_file($f, $ret); return 'ok'; }
function plug_ixquick($a, $b, $d = '') { $d = ajxg($d); $ret .= input(1, 'furl', $d, 'search'); $ret .= lj('txtbox', 'popup_plup__x_ixquick_plug*ixquick__760_furl', picto('search')) . br(); $f = 'https://ixquick.com/do/search?q=' . $d . '&l=francais'; if ($d) { $ret = iframe($f . '�740/500'); } //if($d)$ret=read_file($f); return $ret; }
function ifrget($a, $b, $f) { $f = ajxg($f); if ($f) { $f = str_replace(array("\n", "\r"), ' ', $f); $r = explode(' ', $f); foreach ($r as $v) { $d = curl_get_contents($v); if (is_image($v) && $d) { $ret .= ifrim($v, $d); } } } return $ret; }
function ifrget($a, $b, $f) { $f = ajxg($f); $f = http($f); if ($f) { $ret = curl_get_contents($f); if (is_image($f) && $ret) { $ret = ifrim($f, $ret); } } $encoding = embed_detect(strtolower($ret), "charset=", '"', ""); if (strtolower($encoding) == "utf-8" or strpos($ret, 'é')) { $ret = utf8_decode_b($ret); } return $ret; }
function exc_run($a, $b, $res) { $d = ajxg($res); if (!auth(6)) { return; } $f = 'plug/_data/exec.php?' . randid(); if (is_file($f)) { unlink($f); } if ($d) { write_file($f, '<?php ' . $d); } if (is_file($f)) { require $f; } }
function codsav($p, $o, $res) { $d = ajxg($res); //echo $p; if ($p) { list($dr, $pg, $fc) = explode("|", $p); } $f = ($dr == 'plug' ? '' . $dr : 'progb') . '/' . $pg; if ($fc) { return func_sav($p, '', $res); } $d = '<' . '?php' . "\n" . $d . "\n" . '?' . '>'; if ($_SESSION['auth'] > 6) { write_file($f, $d); return btn('txtyl', 'saved'); } }
function table2array_j($p, $o, $res = '') { $res = ajxg($res); $res = str_replace(array('[', ':table]'), '', $res); $r = explode('¬', $res); foreach ($r as $k => $v) { $rb = explode('|', $v); foreach ($rb as $ka => $va) { $rc[$k][$ka] = '"' . $va . '"'; } } $ret = '$r=array('; foreach ($r as $k => $v) { $ret .= 'array(' . implode(',', $v) . '),'; } return $ret . ');'; return $ret; }
function ifrget($a, $b, $f) { $f = ajxg($f); $f = http($f); if ($a) { ifradd(); } if ($f) { $ret = read_file($f); $ret = ifrcorr($ret, $f); if (is_image($f) && $ret) { $ret = ifrim($f, $ret); } } $encoding = embed_detect(strtolower($ret), "charset=", '"', ""); if (strtolower($encoding) == "utf-8" or strpos($ret, 'é')) { $ret = utf8_decode_b($ret); } return $ret; }
function delj($p, $o, $res) { $f = ajxg($res); if (!auth(7)) { return 'no'; } if ($p == 'file') { if (is_file($f)) { unlink($f); } else { return 'error'; } } if ($p == 'dir' && $f && strpos($f, '/') != false) { echo $f; if (is_dir($f)) { rmdir_r($f); } else { return 'error'; } } return btn('txtyl', $p . ' ' . $f . ': deleted'); }
function plug_favs($p, $o, $ob, $res = '') { $res = ajxg($res); if ($res) { fav_flog($res); } $menu = fav_log(); $ret = fav_build($p, $o); return $menu . divd('plgfavs', $ret); }
function troc_prop_add($id, $rid, $res) { $res = ajxg($res); $ex = sql('id', 'prop', 'v', 'id="' . $id . '" and prop="' . $res . '"'); if ($res && !$ex) { insert('prop', mysqlra(array($id, $res, ''))); } return troc_edit($id, $rid); }
function msql_desnam($qb, $desgn, $res) { $jv = 'admin_msql*desnam_' . $qb . '_' . $desgn; if ($res) { $res = ajxg($res); } $ret = desname($qb, $desgn); if ($res == 'init') { return formj('rnt', $jv, '', $ret ? $ret : 'table_name'); } $defb = array('_menus_' => array('name', 'site', 'last-update', 'mods')); $r = dsnam_arr($res); if ($res && $res != 'init') { msql_modif('users', $qb . '_design', $r, $defb, 'one', $desgn); return formj('rnt', $jv, $res, ''); } return formj('rnt', $jv, $ret, ''); }
function plug_chatxml($p, $msg = '', $res = '') { if (!$p) { return chatxcanal('public'); } $p = normalize($p); ses('muse', $res ? ajxg($res) : ses('USE')); chtses($p, '0'); list($r, $r1) = chatxdata($p); $form = chatxform($p); $head = chathead($p, $r1); $sty = atd('chtx' . $p) . ats('width:344px;'); return $head . $form . scroll_b($r, div($sty, chatxread($p, $r)), 5, 344); }
function medit_shot($d, $nd, $k, $ka, $res) { $v = ajxg($res); $rid = randid('mdt'); $r = msql_read_b($d, $nd, $k, '', $ka); $va = msq_data($r[$ka]); $j = ajx($d) . '_' . ajx($nd) . '_' . ajx($k) . '_' . ajx($ka) . '_' . $rid; return assistant($rid, 'SaveJ', ajx($k . '-' . $ka) . '_msqlmodif__x_' . $j, $va, ''); }
function submds($d, $id, $o, $ob, $res) { //comline hangar //echo $d.'-'.$id.'-'.$o.'-'.$ob.'-'.$res; if ($o == 'cmprm') { return comline_txt(ajxg($res), $id); } if ($o == 'cmlin') { return cmlin('', $id, $res); } if ($o == 'aplin') { return aplin('', $id, $res); } // //if($o=='cmsav')return comline_sav($d,$res); if ($o == 'cmdel') { return comline_del($d, $res); } if ($o == 'cmpsav') { return ajxg($res); } //mods if ($o == 'mpos') { return mod_pos($d, $id); } if ($o == 'mps') { return mod_mps($d, $id, $ob); } //submods if ($o == 'sav') { submod_sav($d, $id, $res); } if ($o == 'del') { submod_del($d, $id); } if ($o == 'adc') { return submod_adc($d, $id, $res); } if ($o == 'ads') { submod_ads($d, $ob); $ob = ''; } if ($o == 'revert') { submod_revert($d); } if ($o == 'pos') { return submod_pos($d, $id); } if ($o == 'psb') { if ($d != $ob) { submod_psb($d, $ob); } $ob = ''; } if ($o == 'add') { return submod_add($id, $d); } if ($o == 'edit') { return submod_edit($d, $id, $ob); } if ($o == 'move') { submod_move($d); } if ($o == 'from') { submod_from($d); } if ($o == 'pcto') { return submod_picto($d); } if ($o == 'deft') { msq_copy('users', ses('qb') . '_apps', 'users', ses('qb') . '_apps_sav'); msq_copy('system', 'default_apps_users', 'users', ses('qb') . '_apps'); } return adm_apps($id, $ob, ''); }
function preview_ff_edit($k, $c, $p, $fb) { $fb = ajxg($fb); if ($k) { $r = msql_read('server', 'edition_typos', $k); } if ($c == 'acc' && $p) { $r['accents'] = $p == 'no' ? 1 : ''; } if ($c == 'fav' && $p) { $r['fav'] = $p == 'no' ? 1 : ''; } if ($c == 'cat' && $fb && $fb != '-') { $r['category'] = $fb; if (!$_SESSION['fntcat'][$fb]) { $_SESSION['fntcat'][$fb] = 1; } } if ($k && $_SESSION['auth'] > 5) { modif_vars('server', 'edition_typos', $r, $k); } foreach ($r as $ka => $v) { $rb[] = $v; } return preview_ff_p($k, $rb, $pn, $p); }
function conv_j($p, $o, $res = '') { $ret = conv_codage(ajxg($res), $p, $o); return $ret; }
function trans_tag($idtag, $p = '', $res = '') { $res = ajxg($res); if (!auth(6)) { return; } $rid = randid('trnsct'); $tag = sql('tag', 'qdt', 'v', 'id=' . $idtag); $ret = divc('txtcadr', nms(140) . ' ' . nms(142) . ' ' . nms(9) . ' ' . nms(2) . ' ' . nms(141) . ': ' . $tag); $ret .= input('', 'trsct', $tag); $ret .= lj('popbt', $rid . '_call___meta_trans*tag_' . $idtag . '_' . $cat . '_trsct', 'ok') . br(); if ($res) { $r = sql('idart', 'qdta', 'rv', 'idtag="' . $idtag . '"'); foreach ($r as $k => $id) { update('qda', 'frm', $res, 'id', $id); } $ret .= divc('txtalert', 'All the articles with tag "' . $tag . '" are put in category: ' . $res); } return divd($rid, $ret); }
function cnvs_iframe($id, $b, $res) { $d = ajxg($res); $d = str_replace("\n", ' ', $d); return iframe('/plug/canvas.php?graphic=' . $d . '&graphid=' . $id . '&graphsz=420-300', 440); }
$ret = radio_edit($id, $va, $opt, $optb); break; case "radiosav": require 'plug/radio.php'; $ret = radio_edit($id, $va, $opt); break; //html //html case "menuder": $ret = menuder_pop($id, $va, $opt, $optb); $t = 'select'; $s = 440; break; case "hidden": req('spe'); $ret = hidslct_j($id, $va, $res ? ajxg($res) : $opt, $optb); $tt = $va; $s = 550; break; case "formail": $ret = plugin_func('tracks', 'formail', $id, $res); break; //sys //sys case "rebuild": req('boot,spe,art'); $_SESSION['rqt'] = ''; $_GET['refresh'] = 1; $ret = cache_arts(); $t = 'cache'; break;
function fi_download($d, $id, $res) { $dr = 'users/'; $drd = fi_droot(); if (!$res) { $nnm = $_SESSION['qb'] . '/downoalds/' . strrchr_b($d, '/'); $j = $id . 'fidwn_fifunc___fi*download_' . ajx($d) . '_' . $id . '__' . $id . 'fdwn'; $ret = btn('txtsmall', 'target:') . input(1, $id . 'fdwn', $nnm) . ' ' . lj('txtbox', $j, 'ok'); } elseif (auth(3)) { $res = ajxg($res); $ra = explode('/', $res); if ($ra[0] == $_SESSION['qb']) { mkdir_r($dr . $res); copy($drd . $d, $dr . $res); } else { $not = 'not_'; } $ret = fi_parent($d, $id . 'fidwn', $not . 'saved', 1); } return $ret; }