Exemplo n.º 1
0
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']);
    }
}
Exemplo n.º 2
0
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');
    }
}
Exemplo n.º 3
0
Arquivo: ftext.php Projeto: philum/cms
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');
}
Exemplo n.º 4
0
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');
}
Exemplo n.º 5
0
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;
}
Exemplo n.º 6
0
Arquivo: exsys.php Projeto: philum/cms
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);
    }
}
Exemplo n.º 7
0
Arquivo: stext.php Projeto: philum/cms
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');
}
Exemplo n.º 8
0
Arquivo: model.php Projeto: philum/cms
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');
}
Exemplo n.º 9
0
Arquivo: plug.php Projeto: philum/cms
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));
}
Exemplo n.º 10
0
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;
}
Exemplo n.º 11
0
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'));
}
Exemplo n.º 12
0
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)));
}
Exemplo n.º 13
0
Arquivo: troc.php Projeto: philum/cms
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);
}
Exemplo n.º 14
0
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;
}
Exemplo n.º 15
0
Arquivo: styl.php Projeto: philum/cms
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;
    }
}
Exemplo n.º 16
0
function social_com($p, $o)
{
    list($p, $o) = ajxr($res);
    return $ret;
}
Exemplo n.º 17
0
Arquivo: twit.php Projeto: philum/cms
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'));
}
Exemplo n.º 18
0
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;
}
Exemplo n.º 19
0
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);
    }
}
Exemplo n.º 20
0
Arquivo: lib.php Projeto: philum/cms
function ajxp($res, $pa, $oa)
{
    list($p, $o) = ajxr($res);
    return array($p ? $p : $pa, $o ? $o : $oa);
}
Exemplo n.º 21
0
Arquivo: favs.php Projeto: philum/cms
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);
}
Exemplo n.º 22
0
Arquivo: ajxf.php Projeto: philum/cms
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]';
}
Exemplo n.º 23
0
function model_sav($p = '', $o = '', $res = '')
{
    list($p, $o) = ajxr($res);
    return $ret;
}
Exemplo n.º 24
0
Arquivo: admin.php Projeto: philum/cms
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');
}
Exemplo n.º 25
0
Arquivo: mail.php Projeto: philum/cms
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');
    }
}
Exemplo n.º 26
0
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'));
}
Exemplo n.º 27
0
function artmod_edit_t($a, $b, $d)
{
    $r = ajxr($d);
    return $r[0] . '&' . $r[1] . '=' . $r[2];
}
Exemplo n.º 28
0
function csswidth_sav($p = '', $o = '', $res = '')
{
    list($p, $o) = ajxr($res);
    return $ret;
}
Exemplo n.º 29
0
Arquivo: ajax.php Projeto: philum/cms
 }
 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') {
Exemplo n.º 30
0
function msqdt_sav($p, $o, $res)
{
    $r = ajxr($res);
    msql_modif('', ses('msqdt'), $r, '', 'push', '');
    return msqdt_build($p, $o);
}