01 | foreach ( $wsnew as $k => $v ) | 04 | $myrow = $dsql ->GetOne( "SELECT distinct concat(replace(b.sitepath,'{cmspath}',''),'/',(case a.filename when '' then a.id else a.filename end),'.html') rpurl FROM dede_archives a,dede_arctype b where a.typeid=b.id And (a.keywords='$k' or a.keywords like'$k,%' or a.keywords like'%,$k'or a.keywords like'%,$k,%') " ); | 08 | $rpurl = $GLOBALS [ 'cfg_basehost' ].trim( $myrow [ 'rpurl' ]); | 10 | $dsql ->SetQuery( "Insert Into `dede_keywords`(keyword,rank,sta,rpurl) Values('" . addslashes ( $k ). "','$v','1','$rpurl')" ); $dsql ->Execute(); | |