Exemple #1
0
function find_end($ret, $start, $a, $b)
{
    $posa = strpos($ret, $start);
    $posb = strpos($ret, '}', $posa);
    $temp = subtopos($ret, $posa, $posb);
    $nbop = substr_count($temp, '{');
    for ($i = 1; $i < $nbop; $i++) {
        $posb = strpos($ret, '}', $posb + 1);
        $temp = subtopos($ret, $posa, $posb);
        $nbop = substr_count($temp, '{');
    }
    return subtopos($ret, $posa, $posb + 1);
}
Exemple #2
0
function piegemedia($v)
{
    $pos = strpos($v, "flv");
    $end = "flv";
    if ($pos === false) {
        $pos = strpos($v, "FLV");
        $end = "FLV";
    }
    if ($pos === false) {
        $pos = strpos($v, ".mp3");
        $end = ".mp3";
    }
    if ($pos === false) {
        $pos = strpos($v, ".mp4");
        $end = ".mp4";
    }
    if ($pos !== false) {
        $deb = strrpos(substr($v, 0, $pos), "http");
        if ($deb === false) {
            $deb = strrpos(substr($v, 0, $pos), "=");
        }
        if ($deb !== false) {
            $bal = subtopos($v, $deb, $pos);
        }
    }
    if ($bal) {
        return "\n" . '[' . $bal . $end . ']' . "\n";
    }
}
Exemple #3
0
function nbp($id, $read)
{
    $t = lkc('popbt', urlread($read) . '#nb' . $id . '" name="#nh' . $id, $id);
    $d = sql('msg', 'qdm', 'v', 'id="' . $read . '"');
    $pos = strpos($d, '[' . $id . ':nb]');
    $posb = strpos($d, '[' . ($id + 1) . ':nb]');
    if ($posb === false) {
        $posb = strpos($d, "\n", $pos);
    }
    $ret = subtopos($d, $pos, $posb);
    $ret = str_replace('[' . $id . ':nb]', "", $ret);
    if (!is_numeric(substr($ret, 0, 1))) {
        $ret = substr($ret, 1);
    }
    if (!is_numeric(substr($ret, -1))) {
        $ret = substr($ret, 0, -1);
    }
    return divc('tab justy', $t . format_txt($ret, 3, $id));
}