function ifrcorr($d, $f) { $a = http(http_domain($f)) . '/'; $d = str_replace('src="/', 'src="' . $a, $d); $d = str_replace('href="/', 'href="' . $a, $d); return $d; }
function verif_defcon($f) { $f = http_domain($f); $base = rstr(18) ? 'public' : $_SESSION['qb']; $r = msql_read('', $base . '_defcons', ''); if ($r) { foreach ($r as $k => $v) { if ($f == $k) { return array($k, stripslashes_r($v)); } } } }
function recup_src() { $r = $_SESSION['rqt']; if ($r) { foreach ($r as $k => $v) { if ($v[9] && $v[9] != 'mail') { $purl = http_domain($v[9]); $purl = str_replace(array('.wordpress', '.blogspot', '.pagesperso-orange'), '', $purl); if ($purl) { $ret[$purl] += 1; } } } } return $ret; }
function batch($f, $d) { $f = utmsrc($f); $fb = nohttp($f); $idt = 'adc'; //if($d=='c')$idt.='p'; if ($f == 'z') { req('sav'); return save_art_batch(); } if (substr($f, 0, 4) != 'http' && $f && $f != 'x' && $f != '1') { $f = 'http://' . $f; } if ($f == 'x') { $_SESSION['vacuum'] = ''; } //p($_SESSION['vacuum']); if (trim($f) && $f != '1' && $d != '1' && $f != 'x' && $d != 'x' && !@$_SESSION['vacuum'][$fb]) { if (joinable($f)) { $_SESSION['vacuum'][$fb] = read_file($f); } } // if ($d == 'x') { unset($_SESSION['vacuum'][$fb]); } //echo $f; //p($_SESSION['vacuum']); if ($d == 'p') { return 'ok'; } if ($d == 'c') { $ret = lj('', sj('popup_batch') . ' closebub(this);', picto('get')); } $ret .= lj('', $idt . '_batch____in_' . $d, picto('reload')); $ret .= lj('', $idt . '_batch___x_1', picto('del')); $ret .= lj('', 'popup_rssjb___rssurl_1', picto('rss')); $ret .= lj('', $idt . '_batchfbi__3', picto('update')); $ret .= lj('', 'page_deskbkg', picto('desktop')); $ret .= msqlink('', ses('qb') . '_rssurl'); $r = $_SESSION['vacuum']; if ($r) { $r = array_reverse($r); } if ($r) { $ret .= lj('popsav', $idt . '_batch___z_1', nms(57)); } if ($r) { foreach ($r as $k => $v) { $i++; if ((!$_SESSION['vacsuj'][$k] or $k == $f) && $k != 1 && $k && $k != 'http://loading...') { list($_SESSION['vacsuj'][$k], $msg) = vacuum($k, ''); } if (!$_SESSION['vacsuj'][$k] && $v) { $suj = 'no_title'; } else { $suj = $_SESSION['vacsuj'][$k]; } $kb = ajx($k, ''); $cat = $_SESSION['vaccat'][$k]; $rid = randid('bth'); $btb = ljc('', 'popup', 'ajxf_batch*preview_' . $kb, picto('view')); $btb .= slct_cat($rid, $cat, $i); //$btb.=select_j($rid,'category',$cat,3,$cat?$cat:picto('list')); $btb .= saveiec($kb, $cat, $rid); $btb .= lj('', 'popup_search__3_' . ajx($suj) . '_', picto('search')); $btb .= lkt('" title="' . preplink($k) . ' ' . $_SESSION['vacdat'][$k], http($k), picto('url')); $btb .= lj('', $idt . '_batch___' . $kb . '_x', picto('del')) . ' '; $btb .= btn('small', http_domain($k)) . br(); $ret .= divc('small', $btb . $suj); } } if ($d != 'in') { $ret = div(atd($idt) . ats('padding:2px; min-width:240px;'), $ret); } return scroll_b($i, $ret, 10); }
function prepdlink($val) { list($k, $v) = explode('§', $val); if (!$v or $v == $k) { $v = http_domain($k); } return array($k, $v); }