define('DROOT', dirname(__FILE__) . '/../'); } if (empty($_SERVER['QUERY_STRING'])) { define('ARGV', $_SERVER['argv'][0]); } else { define('ARGV', $_SERVER['QUERY_STRING']); } include DROOT . 'inc/func.php'; include DROOT . 'inc/mysql.php'; include DROOT . 'inc/strip.php'; $sUser = '******'; $sPass = '******'; $sData = 'edudo'; //$sUser='******'; $sPass='******';$sData='edudo'; $gDB = new cMysql($sUser, $sPass, $sData, '', 'utf8'); $aTem = $gDB->select(' select `char`,`value` from var order by id asc '); if (!empty($aTem)) { foreach ($aTem as $a) { $G[$a['char']] = $a['value']; } } $aConf = $gDB->select(' select * from conf order by id asc ', 'cid', 'id'); $aTem = $gDB->select(' select id,name from clas where cid = 0 order by ord asc,id asc '); $aMenu = $gDB->select(' select id,url,name from clas where cid = 4 and status = 1 order by ord asc,id asc ', 'id'); if (!empty($aTem)) { foreach ($aTem as $n => $a) { $aType[$a['id']] = $a['name']; } } header("content-type:text/html; charset=" . CHAR); $QQ = 858857239;
/* * 功能: * 日期: */ include './conf.php'; $asz = explode('x', $G['psize']); $nWidth = $asz[0]; $nHeight = $asz[1]; $spic = $G['ipic']; $cpic = $G['cpic']; $su = 'yyse'; $sp = 'mZcPzymepUH2nuLD'; $gDB = new cMysql($su, $sp, 'edit', '', 'gb2312', '183.136.130.41'); //$gDB->query(' update arc set dao = 0 where status = 1 and cid = 13 and dao = 1'); $aList = $gDB->select(' select id,cid,title,provid,cityid,status,ctime,pic,content from arc where status = 1 and cid = 13 and dao = 0 order by id asc limit 50 '); //p($aList); if (!empty($aList)) { $aSql = array(); $gDB = new cMysql($sUser, $sPass, $sData, '', 'gb2312'); foreach ($aList as $n => $a) { //$b = $gDB->selectOne(' select id from arc where title = \''.addslashes($a['title']).'\' '); //if (empty($b)){ $id = gAID(); $a['content'] = gcon($a['content']); $a['pic'] = gpic($a['pic']); $a['content'] = preg_replace('/&[a-z]+;/', '', $a['content']); $sSql = ' insert into arc(id,cid,uid,bid,mid,oid,status,ctime,etime,view,good,bad,fen,title,`key`,`write`,pic,tag,file,url,ku,fn,ph) values(' . $id . ',0,0,0,0,0,0,' . $a['ctime'] . ',0,0,0,0,0,\'' . addslashes($a['title']) . '\',\'\',\'\',\'' . $a['pic'] . '\',\'\',\'\',\'\',2,\'\',\'\')'; if ($gDB->query($sSql)) { if (!$gDB->query(' insert into arcs(id,txt)values(' . $id . ',\'' . addslashes(rh($a['content'])) . '\') ')) { $gDB->query(' delete from arc where id = ' . $id);