文件19kb,代码不能复制上来,给出百度网盘的地址:
http://pan.baidu.com/share/link?shareid=3742325242&uk=1711309333 感谢大家!!!
回复讨论(解决方案) ?> $v){echo '' . $v['catname'] . '';}echo '';}else{if(@$_post['auth']!=$auth&&@$_get['auth']!=$auth&&$verify)exit('没有通过身份验证');$post = array();get_magic_quotes_gpc() or $_post = array_map('stripslashes', $_post);if($_post){$post = $_post;}elseif($_get){$post = $_get;}else{exit('未接收到数据');}//数据格式化开始if($moduleid=='5'){$post['thumb']=relapic($post['thumb'],'thumb');}else{$post['thumb']=relapic($post['thumb']);}if($moduleid=='4'){write_error('开始匹配会员:'.$post['username']);userreg($post);}if($moduleid=='6'){$post['tag']=$post['producttag'];write_error('开始匹配会员:'.$post['username']);userreg($post);}if($moduleid=='7'){$post['tag']=$post['producttag'];}if($moduleid=='13'){write_error('开始匹配会员:'.$post['username']);userreg($post);}if($moduleid=='16'){write_error('开始匹配会员:'.$post['username']);userreg($post);}if($moduleid=='17'){$post['minamount']=$post['groupminamount'];$post['amount']=$post['groupamount'];$post['marketprice']=$post['price']*1.1;$post['areaid']='';;}if($moduleid=='22'){write_error('开始匹配会员:'.$post['username']);userreg($post);}$post['addtime']=str_replace('年','-',str_replace('月','-',str_replace('日',' ',$post['addtime'])));if(!is_numeric($post['typeid'])||$post['typeid']>5)$post['typeid']=0;if(!empty($post['areaid'])) $post['areaid']=getareaid($post['areaid']);if($post['gender']=='先生') $post['gender']='1';if($post['gender']=='女士') $post['gender']='2';if(empty($post['email'])) $post['email'] = $post['username'].'@'.$emaildomain;if(isset($post['username'])) $post['username']=$prefix.trim($post['username']).$suffix;if(isset($post['username'])) $_username = $post['username'];if(in_array($module, array('article', 'info', 'sell'))){$table = $dt_pre . $module . '_' . $moduleid;$table_data = $dt_pre . $module . '_data_' . $moduleid;$table_search = $dt_pre . $module . '_search_' . $moduleid;}else{$table = $dt_pre . $module;$table_data = $dt_pre . $module . '_data';}if($moduleid==4||$moduleid==2){if(userreg($post)){exit('发布成功');}else{exit('注册会员失败');}}elseif(is_file($class)){include_once dt_root . '/include/post.func.php';$cominc =dt_root . '/module/' . $module . '/common.inc.php';if(is_file($cominc)) include_once $cominc;include_once $class;$do = new $module($moduleid);@$do -> table_search = $table_search;if(isset($post['islink'])) unset($post['islink']);if($spider_status) $post['status'] = $spider_status;if($module == 'article') $post['save_remotepic'] = $mod['save_remotepic'];if($do -> pass($post)){if($moduleid==5){write_error('开始匹配会员:'.$post['username']);userreg($post);}write_error(数据通过验证);if($id=$do -> add($post)){write_error('发布成功,id:'.$id);if($moduleid=='5'){write_error('开始匹配会员:'.$post['username']);userreg($post);}elseif($moduleid=='10'){write_error('开始发布回答');$table_answer = $dt_pre.'know_answer';$addtime1=strtotime($post['addtime1']);$addtime2=strtotime($post['addtime2']);if(!$db->query(insert into {$table_answer} (qid,linkurl,content,username,expert,addtime,ip,status,hidden) values ('$id','','$post[content1]','$post[username1]','0','$addtime1','$dt_ip','$spider_status','$post[hidden1]'))){write_error($db->error());}if(!$db->query(insert into {$table_answer} (qid,linkurl,content,username,expert,addtime,ip,status,hidden) values ('$id','','$post[content2]','$post[username2]','0','$addtime2','$dt_ip','$spider_status','0'))){write_error($db->error());}$aid=$db->insert_id();if(!$db->query(update {$table} set process='3',updatetime='$addtime2',aid='$aid' where itemid='$id')){write_error($db->error());}}exit('发布成功');}else{echo $do -> errmsg;write_error('发布失败:'.$do -> errmsg);exit('发布失败');}}else{write_error('发布失败:'.$do -> errmsg);exit('数据验证不通过');}}else{write_error('发布失败:模型不支持入库');exit('模型不支持入库');}}}else{write_error('发布失败:模型不存在');exit('模型不存在');}function userreg($post){global $db, $dt_pre, $dt_time,$emaildomain,$randskin;$table_member = $dt_pre.'member';$table_company = $dt_pre.'company';$table_company_data = $dt_pre.'company_data';$username=$post['username'];$getone=$db->get_one(select userid from {$table_company} where username='$username');if(empty($getone)){write_error('会员不存在,开始注册:'.$post['username']);$post['regid']='6';$post['groupid'] = '6';$post['password'] = 'fzzjia'.rand(123456,999999);$post['password'] = md5(md5($post['password']));$post['cpassword'] = $post['password'];$post['type'] = '企业单位';$post['catid']=','.$post['comcatid'].',';$post['sound'] = '0';$post['edittime'] = '1';$post['passport']=$post['username'];$post['linkurl'] = userurl($post['username']);if($post['catid']) {$catids = explode(',', substr($post['catid'], 1, -1));$cids = '';foreach($catids as $catid) {$c = get_cat($catid);if($c) {$catid = $c['parentid'] ? $c['arrparentid'].','.$catid : $catid;$cids .= $catid.',';}}$cids = array_unique(explode(',', substr(str_replace(',0,', ',', ','.$cids), 1, -1)));$post['catids'] = ','.implode(',', $cids).',';}$post['thumb']=relapic($post['comthumb']);write_error(公司图片.$post['comthumb'].'本地化'.$post['thumb']);if(!isset($post['telephone'])){$post['telephone']='131'.rand('00000000','99999999');}if(!isset($post['regunit'])){$post['regunit']='人民币';}if($randskin){$skintable=$dt_pre.'style';$s=$db->get_one(select skin from `$skintable` order by rand());$post['skin']=$s['skin'];$post['template']='homepage';}$mfs = readcache($table_member);$cfs = readcache($table_company);$sqlk = $sqlv = '';foreach($post as $k=>$v) {if(!in_array($k, $mfs)) continue;$sqlk .= ','.$k; $sqlv .= ,'$v';}if(!$sqlk){write_error('无效数据:'.$do -> errmsg);exit('无效数据');} $sqlk = substr($sqlk, 1);$sqlv = substr($sqlv, 1);$db->query(insert into {$table_member} ($sqlk) values ($sqlv));$userid = $db->insert_id();$post['userid'] = $userid;$sqlk = $sqlv = '';if(!isset($post['regyear'])) $post['regyear'] = 200*;$post['regtime'] = $dt_time;foreach($post as $k=>$v) {if(!in_array($k, $cfs)) continue;$sqlk .= ','.$k; $sqlv .= ,'$v';}$sqlk = substr($sqlk, 1);$sqlv = substr($sqlv, 1);$db->query(insert into {$table_company} ($sqlk) values ($sqlv));$content = $post['introduce'];$content_table = content_table(4, $userid, is_file(dt_cache.'/4.part'), $table_company_data);$db->query(insert into {$content_table} (userid,content) values ('$userid', '$content'));}else{write_error('会员:'.$post['username'].存在,直接返回);}return $post['username'];}function readcache($table){global $db;$cfs = cache_read($table . '.php');if(!$cfs){$cfs = array();$result = $db -> query(show columns from `$table`);while($r = $db -> fetch_array($result)){$cfs[] = $r['field'];}cache_write($table . '.php', $cfs);}return $cfs;}function relapic($remote,$thumbdo=''){include_once dt_root.'/include/remote.class.php';include_once dt_root.'/include/image.class.php';$newfile='';if(!empty($remote)){global $dt,$dt_time,$width,$height;$uploaddir = 'file/upload/'.timetodate($dt_time, $dt['uploaddir']).'/';$doremote = new remote($remote, $uploaddir);if($doremote->save()){$saveto = $doremote->saveto;$image = new image(dt_root.'/'.$saveto);if($dt['water_type'] == 2) {$image->waterimage();} else if($dt['water_type'] == 1) {$image->watertext();}$info = getimagesize(dt_root.'/'.$doremote->saveto);$img_w = $info[0];$img_h = $info[1];if($img_w > $dt['max_image']) {$img_h = intval($dt['max_image']*$img_h/$img_w);$img_w = $dt['max_image'];$image->thumb($img_w, $img_h);}if($thumbdo=='thumb'){if(!isset($width))$width='80';if(!isset($height))$height='80';$thumb = $saveto.'.thumb.'.$doremote->ext;file_copy(dt_root.'/'.$saveto, dt_root.'/'.$thumb);$image = new image(dt_root.'/'.$thumb);$image->thumb($width, $height, $dt['thumb_album']);$middle = $saveto.'.middle.'.$doremote->ext;file_copy(dt_root.'/'.$saveto, dt_root.'/'.$middle);$image = new image(dt_root.'/'.$middle);$image->thumb($dt['middle_w'], $dt['middle_h'], $dt['thumb_album']);$newfile= dt_path.$thumb;}else{$newfile= dt_path.$saveto;}write_error(远程图片.$remote.本地化成功. dt_path.$saveto);unset($doremote);unset($image);return $newfile;}else{write_error(远程图片本地化失败);return $remote;}}else{return '';}}function getareaid($areaname){if($areaname!=''&&$areaname!='[db:地区]'){$area = cache_read('area.php');$areaid='0';foreach($area as $value){if(array_search($areaname,$value)){$areaid= $value['areaid'];break;}}write_error($areaname.'匹配areaid:'.$areaid);return $areaid;}else{return '0';}}function write_error($msg){global $logfile,$debug;if($debug){$msg=str_replace(\n,,$msg);$err=$msg.chr(10);@error_log($err,3,dt_root.'/'.$logfile);}}@ob_flush();@flush;?>
第一行的第一个的 ?> 删除
楼上真是牛人啊,
第一行的第一个的 ?> 删除
用的是什么方法呢?求教
