<?php
!function_exists('adminmsg') && exit('Forbidden');
$basename="$admin_file?adminjob=urlcheck";

if($action!="unsubmit"){
	$urlcheck=$db->get_one("SELECT db_value FROM pw_config WHERE db_name='db_urlcheck'");
	$urlinfo=str_replace(",","\n",$urlcheck['db_value']);
	include PrintEot('urlcheck');exit;
} elseif($_POST['action']=="unsubmit"){
	InitGP(array('urlinfo'),'P');
	$urlinfo = str_replace("\n",",",$urlinfo);
	$rt = $db->get_one("SELECT * FROM pw_config WHERE db_name='db_urlcheck'");
	if ($rt) {
		$db->update("UPDATE pw_config SET db_value=".pwEscape($urlinfo)."WHERE db_name='db_urlcheck'");
	} else {
		$db->update("INSERT INTO pw_config SET db_name='db_urlcheck',db_value=".pwEscape($urlinfo));
	}
	updatecache_c();
	adminmsg('operate_success');
}
?>