function mailist_save($a, $b, $res) { $r = ml_rb(); list($m, $n, $p) = ajxr($res); $voc = sesmk('mailvoc'); $n = strdeb($m, '@'); if (strpos($m, '@') !== false && strpos($m, '.') !== false && strpos($m, '?') === false) { $m = trim($m); if (!$r[$m]) { $p = 0; $msg = $voc['welcome_mail'] . br() . $voc['adios_mail']; $dt = time(); $sent = send_mail_html($m, 'newsletter', $msg, '', '?plug=mailist&p=confirm&o=' . $dt); if ($sent == 'not_sent') { return btn('txtyl', $m . ' :: ' . $voc['answer_success']); } else { $r[$m] = array($n, $p, $dt, $ip, $_SESSION['iq']); ml_rs($r); return btn('txtyl', $m . ' :: ' . $voc['answer_success']); } } else { return btn('txtyl', $voc['answer_exists']); } } else { return btn('txtyl', $voc['answer_error']); } }
function sugg_j($v1, $v2, $res) { req('spe'); $nod = nod('suggest'); $ra = ajxr($res); $dfb['_menus_'] = array('day', 'ok', 'url', 'mail', 'msg', 'iq'); $r = read_vars('msql/users/', $nod, $dfb); $lnk = trim($ra[0]); $alx = sugg_alx($r, $lnk); $rap = 'popup_plup___suggest_sugg*rapport_' . ajx($ra[1]); if ($lnk && $alx) { return lj('txtyl', $rap, nms(56)); } $ret = sugg_import($lnk); $r[] = array(date('ymdHi'), '', $lnk, $ra[1], '', ses('iq')); if ($r[0]) { $r = msq_reorder($r); } if ($lnk && !$alx) { msql_save('', $nod, $r); if ($ra[1]) { sugg_mail($ra[1], $lnk); } return lj('txtyl', 'popup_call__3__batch*preview_' . ajx($lnk), nms(56)) . ' ' . $ret; } else { return lj('txtyl', $rap, '404 not found'); } }
function ftext_j($n, $b, $res) { $nd = stext_log(); $rb = ajxr($res); $ra = array(mkday(), html_entity_decode_b($rb[0])); //p($ra); msql_modif('users', $nd . '_txt_' . $n, $ra, '', 'one', 1); return btn('txtyl', 'ok'); }
function htaccess_j($var1, $var2, $res) { list($txt) = ajxr($res); $ok = write_file('.htaccess', $txt); if ($ok) { return btn('txtyl', $ok) . ' ' . hlpbt('htaccess'); } return lkc('txtyl', '.htaccess', 'saved'); }
function plug_com($p, $o) { $rid = 'plg' . $p . $o; if ($res) { list($p, $o) = ajxr($res); } $ret .= lj('', 'pop_plupin___msqads____p|o', picto('reload')) . ' '; $ret .= autoclic('p', $p ? $p : 'param', 10, 244, '', 1); $ret .= autoclic('o', $o ? $o : 'option', 10, 244, '', 1); return $ret; }
function sys($p = '', $o = '', $res = '') { if ($res) { list($p, $o) = ajxr($res); } //$p='mysqldump -h"'.$su.'" -u"'.$sn.'" -p"'.$pw.'" '.$db.' '.$file.' > '.$file.'.sql'; //$p='tar -zcvf /home/philum/users/philum/maj/philum140707.tar.gz /home/philum/_public'; if (auth(6)) { return exc($p); } }
function stext_j($n, $b, $res) { $nd = stext_log(); $rb = ajxr($res); $rb[1] = html_entity_decode_b($rb[1]); if (!$n) { $n = msq_find_last('users', $nd, 'txt'); } msql_modif('users', $nd . '_txt_' . $n, $rb, '', 'one', 1); return btn('txtyl', 'ok'); }
function model_j($p, $o, $res) { $r = ajxr($res); //form reqp('msql'); $msq = new msql('', $p ? $p : 'model'); $msq->load(); //$msq->format($r); $msq->modif('add', '', $r); $msq->save(); //p($msq->ret); return make_table(msq_invert($msq->ret), 'txtblc', 'txtx'); }
function plug_plug($plg, $p = '', $o = '', $res = '') { $rid = 'plg' . $plg . $p; if ($res) { list($plg, $p, $o) = ajxr($res); } $ret .= lj('', $rid . '_plug__3_plug_plug*call___plugin|plugp|plugo', picto('reload')) . ' '; $ret .= select_j('plugin', 'plug', '', '', '', '2'); $ret .= input(1, 'plugin', $plg ? $plg : 'plugin', '', 1) . ' '; $ret .= input(1, 'plugp', $p ? $p : 'param', '', 1) . ' '; $ret .= input(1, 'plugo', $o ? $o : 'option', '', 1) . ' '; return $ret . divd($rid, plugin($plg, $p, $o)); }
function ud_search($p, $o, $res) { list($p, $o) = ajxr($res); if ($o == 'yes') { $r = sql('*', 'qu', '', 'ex=soundex("' . $p . '") order by voc asc'); } else { $r = sql('*', 'qu', '', 'voc like "%' . $p . '%" order by voc asc'); } $ret = btn('txtsmall', count($r) . ' résultats') . br(); if ($r) { foreach ($r as $k => $v) { $ret .= uds_btn($v); } } return $ret; }
function pet_insert($id, $optb, $res) { $day = time(); list($name, $mail, $web, $city, $country) = ajxr($res); $arr = array($name, $mail, $web, $city, $country, hostname(), 0); $bk = lj('txtbox', 'petform_plug___petition_pet*form_' . $id, picto('left')); if (pet_insert_verif($mail) == true) { return pet_hlp('alert_exists'); } if (strpos($mail, '@') === false or !$name) { return $bk . ' ' . pet_hlp('alert_value'); } modif_vars('users', ses('qb') . '_petition_' . $id, $arr, $day); pet_mail($id, $day, $mail, $name); return nl2br(pet_hlp('confirm_before')); }
function mform_j($p, $id, $res) { $r = ajxr($res); //form if (!$r[0]) { return lj('txtbox', ses('mformj'), pictxt('reload', 'error')); } reqp('msql'); $msq = new msql('', ses('mform')); //$rb=mform_mr($p); $msq->load(); //$msq->format($r); $msq->modif('add', '', $r); $msq->save(); //p($msq->ret); return lj('txtbox', ses('mformj'), pictxt('smile', nms(139))); return lj('txtbox', 'mfr' . $id . '_plug___microform_mform*read_' . $id, pictxt('smile', nms(139))); }
function troc_sav($id, $rid, $res) { $r = ajxr($res); //p($r); $rb = array('obj' => $r[0], 'type' => $r[1], 'state' => $r[2], 'txt' => trim($r[3])); foreach ($rb as $k => $v) { update('obj', $k, $v, 'id', $id); } $rc = array_slice($r, 4); $rk = sql('id', 'prop', 'vr', 'ib="' . $id . '"'); //p($rk); if ($rk) { foreach ($rk as $k => $v) { update('prop', 'attr', $rc[$k], 'id', $v, 1); } } return troc_edit($id, $rid); }
function comptxt_j($p, $o, $res = '') { $r = ajxr($res); $txt1 = html_entity_decode($r[0]); $txt2 = html_entity_decode($r[1]); if ($p == 'sentences') { $s = '.'; } elseif ($p == 'lines') { $s = '\\n'; } else { $s = ' '; } $r1 = explode($s, $txt1); $r2 = explode($s, $txt2); $arr = array_diff($r1, $r2); $ret = divc('txtalert', 'résultat: ' . count($arr) . ' différences') . br(); if ($arr) { foreach ($arr as $k => $v) { $ret .= $v . ':' . $r2[$k] . hr(); } } return $ret; }
function save_css_clname($defs, $k, $v) { $r = ajxr($v); $defs[$k][0] = $r[0]; $defs[$k][1] = $r[1]; $defs[$k][2] = $r[2]; if (is_numeric($k)) { return $defs; } }
function social_com($p, $o) { list($p, $o) = ajxr($res); return $ret; }
function twit_config_sav($p, $o, $res = '') { $r = ajxr($res); foreach ($r as $v) { $defs[] = array($v); } msql_modif('', ses('qb') . '_twit', $defs, '', 'arr', ''); return btn('txtalert', helps('userforms')); }
function plug_search($d, $n, $opt = '', $res = '') { list($b, $o, $t, $ph) = split('-', $opt); chrono(); $rech = good_rech($d); $_GET['search'] = $rech; list($cat, $tag) = ajxr($res); $rech = str_replace(array("’", '«', '»', " "), array("'", '"', '"', ' '), trim($rech)); if (!$n) { $n = $_SESSION['nbj']; } $_GET['dig'] = $n; $_GET['cat'] = $cat; $_GET['tag'] = $tag; $_GET['bool'] = $b; $_GET['titles'] = $t; //$_GET['pho']=$ph; $vrf = normalize($rech . $n . $b . $o . $t . $ph . $res); if ($rech == 'last') { $id = lastid('qda'); $load[$id] = 1; } elseif (isset($_SESSION['recache'][$vrf])) { $load = $_SESSION['recache'][$vrf]; $cac = $vrf; } elseif ($d && is_numeric($d) && $d < lastid('qda')) { $load[$d] = 1; } elseif (strpos($rech, ';') && strpos($rech, ':')) { list($rch, $cat, $tag, $utg) = rech_script($rech); } elseif (strpos($rech, '=')) { $load = make_list_arts($rech); } else { $load = rech($rech, $n); } if ($load && !is_array($load)) { $load = ''; } if (!$load && ($cat or $tag or $utg)) { $load = rech_catag($cat, $tag, $utg, $n); } $_SESSION['load'] = $load; $_SESSION['recache'][$vrf] = $load; $ret = rech_titles($rech, $n, $opt, $cac, $cat, $tag, $tag2); $_SESSION['page'] = 1; $_SESSION['popm'] = chrono('search'); if ($load[0]) { unset($load[0]); } if ($load[1]) { unset($load[1]); } if ($load) { $ret .= scroll($load, divd($vrf, output_pages($load, '', '')), 2, '', 400); } return $ret; }
function slider_sav($nod, $n) { $rb = explode('_', $nod); $rb = ajxr($_GET['res']); $nb = count($rb); //preload("","","") $r = msql_read('gallery', $nod, substr($n, 0, 3) == 'mdf' ? '' : $n); if (substr($n, 0, 3) == 'mdf') { list($n, $nb) = split('-', $n); foreach ($r as $k => $v) { if ($k == '_menus_') { $rc[$k] = $v; } else { $rc[$k] = array($v[0], $v[1], $v[2], $v[3], $v[4], $v[5], $v[6], $v[7], $rb[2], $rb[3], $rb[4], $rb[5], $rb[6]); } } } elseif (substr($n, 0, 3) == 'del') { list($n, $rc) = split('-', $n); msql_modif('gallery', $nod, '', '', 'del', $rc); return ''; } else { $rc = array($rb[0], $r['mini'], $r['img'], $r['width'], $r['height'], $r['mini_w'], $r['mini_h'], $rb[1], $rb[2], $rb[3], $rb[4], $rb[5], $rb[6]); } modif_vars('gallery', $nod, $rc, $n); if ($n == 'mdf') { return slider_edit($nod, $nb); } else { return slider_edit($nod, $n); } }
function ajxp($res, $pa, $oa) { list($p, $o) = ajxr($res); return array($p ? $p : $pa, $o ? $o : $oa); }
function fav_com_mdf($k, $o, $res = '') { $ra = ajxr($res); $r = modif_vars('', ses('qb') . '_coms', array(ses('iq'), $ra[0], $ra[1]), $k); return fav_com('', $r); }
function mktc($na, $nb, $o, $d) { $r = ajxr($d); $i = 0; $opt = $o ? '§' . $o : ''; for ($b = 0; $b < $nb; $b++) { for ($a = 0; $a < $na; $a++) { $ret .= $r[$i] . '|'; $i++; } $ret .= '¬'; } return '[' . $ret . $opt . ':table]'; }
function model_sav($p = '', $o = '', $res = '') { list($p, $o) = ajxr($res); return $ret; }
function data_brain_sav($bs, $type, $res) { list($slct, $msg) = ajxr($res); $msg = str_replace('"', "'", $msg); //save_in_datas($type,$slct,$msg);//if(!$forbid) data_brain_save($bs, $type, $slct, $msg); return btn('txtyl', 'ok'); }
function mail_send($id, $va, $res) { //if($_SESSION['auth']<3)return btn('txtred','bruuu must_be_loged'); $j = 'popup_plup__x_mail_plug*mail'; list($from, $to, $txt, $suj) = ajxr($res); if (strpos($to, '@') !== false && $txt && $to && $from) { send_mail('html', $to, $suj ? $suj : host(), divc('justy', $txt), $from ? $from : hostname(), ''); return lj('txtyl', $j, nms(79) . ' ' . nms(36) . ': ' . $to); } else { return lj('txtyl', $j, 'error'); } }
function formail($d, $res) { $ra = explode(',', ajx($d, 1)); $na = count($r) - 1; $rb = ajxr($res); $nb = count($rb) - 1; for ($i = 0; $i < $nb; $i++) { list($label, $type) = split('=', $ra[$i]); $ret .= $label . ' : ' . $rb[$i] . br(); } $from = $_SESSION['qbin']['adminmail']; $url = urlread($_SESSION['read']); send_mail_html($from, host() . $url, $ret, $from, $url); return br() . btn('', helps('formail')); }
function artmod_edit_t($a, $b, $d) { $r = ajxr($d); return $r[0] . '&' . $r[1] . '=' . $r[2]; }
function csswidth_sav($p = '', $o = '', $res = '') { list($p, $o) = ajxr($res); return $ret; }
} if ($va == 'deltables') { $rt = del_tables($id); } if ($va == 'delqmark') { $rt = del_qmark($id); } if ($va == 'imglabel') { $rt = add_comments($id); } if ($va == 'oldconn') { req(pop); $rt = retape('<br>' . $id, ''); } if ($va == 'replace') { list($rep, $by) = ajxr($res); $rt = str_replace($rep, $by, $id); } //if($va=='table'){$rt=ajxg($res);} if ($va == 'randim') { $_POST['randim'] = 1; $_GET['continue'] = 1; $read = $_SESSION['read']; $id = mysql_real_escape_string(stripslashes($id)); msquery('UPDATE ' . $_SESSION['qdm'] . ' SET msg="' . $id . '" WHERE id="' . $read . '"'); req('spe'); req('pop'); $ret = format_txt($id, 3, $read); $rt = sql('msg', 'qdm', 'v', 'id=' . $read); } if ($va == 'revert') {
function msqdt_sav($p, $o, $res) { $r = ajxr($res); msql_modif('', ses('msqdt'), $r, '', 'push', ''); return msqdt_build($p, $o); }