2012-05-15 22:31:36 -07:00
|
|
|
<?php
|
|
|
|
|
2014-07-01 03:27:56 +02:00
|
|
|
require_once('include/submit.php');
|
2012-05-15 22:31:36 -07:00
|
|
|
|
|
|
|
function submit_content(&$a) {
|
|
|
|
|
2014-07-01 03:27:56 +02:00
|
|
|
$url = hex2bin(notags(trim($_GET['url'])));
|
|
|
|
run_submit($a, $url);
|
2012-05-15 22:31:36 -07:00
|
|
|
exit;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function nuke_record($url) {
|
|
|
|
|
|
|
|
$nurl = str_replace(array('https:','//www.'), array('http:','//'), $url);
|
|
|
|
|
|
|
|
$r = q("SELECT `id` FROM `profile` WHERE ( `homepage` = '%s' OR `nurl` = '%s' ) ",
|
|
|
|
dbesc($url),
|
|
|
|
dbesc($nurl)
|
|
|
|
);
|
|
|
|
|
|
|
|
if(count($r)) {
|
|
|
|
foreach($r as $rr) {
|
|
|
|
q("DELETE FROM `photo` WHERE `profile-id` = %d LIMIT 1",
|
|
|
|
intval($rr['id'])
|
|
|
|
);
|
|
|
|
q("DELETE FROM `profile` WHERE `id` = %d LIMIT 1",
|
|
|
|
intval($rr['id'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|