$r[ftime]) { $sql2="update mr_zxxm set checked='0' where Id='$id' limit 1"; mysql_query($sql2); } } $sql="select * from mr_news where checked=1"; $result=mysql_query($sql); $t=time(); while($r=mysql_fetch_array($result)) { $id=$r['Id']; if($t>$r[ftime]) { $sql2="update mr_news set checked='0' where Id='$id' limit 1"; mysql_query($sql2); } } ?> $value) { $value = trim($value); $get_file = @file_get_contents($value); $rndFileName = "../uploads/pic/".$milliSecond.$key.".".substr($value,-3,3); $fileurl = "/uploads/pic/".$milliSecond.$key.".".substr($value,-3,3); if($get_file) { $fp = @fopen($rndFileName,"w"); @fwrite($fp,$get_file); @fclose($fp); } $body = ereg_replace($value,$fileurl,$body); } return strreplace($body); } function extend($file_name) { $retval=""; $pt=strrpos($file_name, "."); if ($pt) $retval=substr($file_name, $pt+1, strlen($file_name) - $pt); return ($retval); } ///内容转换,单引号双引号均可插入内容中 function checkstr($content) { $content=htmlspecialchars($content); /////特殊字符转成 HTML 的字符串格式,四种特殊字符 return ($content); } ///内容转换后插入表中,单引号双引号转化为特殊字符均可插入内容中 function strreplace($content) { $conntent = str_replace("<","<",$content); $conntent = str_replace(">",">",$content); $content = str_replace("\"",""",$content); $content = str_replace("'","‘",$content); return ($content); } ///内容转换后显示,特殊字符转化为标准html function unstrreplace($content) { $conntent = str_replace("<","<",$content); $conntent = str_replace(">",">",$content); $content = str_replace(""","\"",$content); $content = str_replace("‘","'",$content); $content = str_replace("&","&",$content); return ($content); } //////给用户发送通知邮件//// function sendemail($subject,$body,$fromemail,$fromname,$email) { global $sendmailsmtp,$sendmailport,$sendmail,$senduser,$sendmailpwd; $mail = new PHPMailer(); $mail->CharSet = "UTF-8"; $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = $sendmailsmtp; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = $sendmail; // SMTP username $mail->Password = $sendmailpwd; // SMTP password $mail->From = $fromemail; $mail->FromName = $fromname; $mail->AddAddress("$email", ""); $mail->Subject = $subject; $mail->Body = $body; $mail->AltBody = "To view the message, please use an HTML compatible email viewer"; $mail->MsgHTML($body); if(!$mail->Send()) { echo "Message could not be sent.

"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } } ///判断后输出是或否 function boolean($c) { if ($c=="1"){ $co = "是"; }else{ $co = "否"; } return ($co); } //中文字符截取 function cnsubstr($string, $sublen ,$a=0) { if($sublen >= strlen($string)) { return $string; } $s = ""; for($i = 0; $i < $sublen; $i++) { if(ord($string{$i}) > 127) { $s .= $string{$i} . $string{++$i}. $string{++$i}; continue; } else { $s .= $string{$i}; continue; } } if($a==0) $s.="…"; return $s; } function GetGoodsMainPic($pic){ if($pic!=""){ $pics = explode("|",$pic); $msg=$pics[0]; if($msg==""){ $msg=$pics[1]; } } return $msg; } ///上传或修改图片时的排序过滤,保证格式符合要求//////////////////// function SortStr($str){ $strs = explode("|",$str); for($i=0;$i<=count($strs);$i++){ if($strs[$i]!="") { $str2.=$strs[$i]."|"; } } ///如果最后一个字符是特定字符,则去掉 if(substr($str,-1,1)=="|"){ $str2=substr($str,0,strlen($str)-1); } return $str2; } //去掉字符串中第一个字符如果为|则删除//////////////////////// function DelFirstStr($str,$a){ if(strpos($str,$a)==0){ $str2=substr($str,1,strlen($str)); }else{ $str2=$str; } return $str2; } ///最后的字符串最后一个字符如果为|,则删除, function DelLastStr($str,$a){ if(substr($str,-1,1)==$a){ $str2=substr($str,0,strlen($str)-1); }else{ $str2=$str; } return $str2; } function DeleteHtml($str) { $str = trim($str); $str = strip_tags($str,""); $str = ereg_replace("\t","",$str); $str = ereg_replace("\r\n","",$str); $str = ereg_replace("\r","",$str); $str = ereg_replace("\n","",$str); $str = ereg_replace(" "," ",$str); return trim($str); } //清除特定字符 ///查找$string 字符串里面有没有 $pattern 这个数组里的东西,如果有就替换成$replacement function clear($string) { $pattern = array("'","\"","","or","&&","!="); $replacement = ""; return preg_replace($pattern,$replacement,$string); }// /////文字高亮显示 function highLight($str, $keywords, $color = "red") { if (empty($keywords)) { return $str; } $keywords = split("[ \t\r\n,]+", $keywords); foreach($keywords as $val) { $tvar = eregi($val, $str, $regs); $finalrep = "" . $regs[0] . ""; } $str = str_ireplace($regs[0], $finalrep, $str); return $str; } /////高亮文字前后字符 function KeyWordStr($str,$kw,$len) { if (empty($kw)) { return substr($str,0,$len); } $pattern = "|([^ ,]*$kw.{{$len}})| "; preg_match($pattern,$str,$match); $str= substr($match[0],0,$len); return $str; } ///判断是否有文件夹,如没有,则新建//////////////////////////////////////////////////////// function createFolder($path) { if (!file_exists($path)) { createFolder(dirname($path)); mkdir($path, 0777); } } //////获取论坛标题的回帖数/////////////////////////////////////////////////////////////////////////////// function GetHuifuNum($tid){ $sql4="select count(Id) from mr_probook where Pid = '$tid' and Checked=1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[0]!=""){ echo $arr4[0]; //$str=$arr4[1]; }else{ $str="0"; } return $str; } //////获取任务分类字符串,带链接//////////////////////////////////////////////////////////////////////////////// function GetGoodsClassStr($tid,$str=""){ $sql4="select * from mr_pclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[1]!=""){ $str="".$arr4[1]." > ".$str; if($arr4[2]) { $str= GetGoodsClassStr($arr4[2],$str); } }else{ $str="暂无城市 "; } $str=substr($str,0,strlen($str)-1); //$str= DelLastStr($str,"> "); return $str; } //////获取整形项目分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function GetClassname($tid){ $sql4="select Typename from mr_pclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[0]!=""){ echo $arr4[Typename]; //$str=$arr4[1]; }else{ $str="未知 "; } return $str; } //////获取整形项目分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function Getproblemtypename($tid){ $sql4="select Typename from mr_qclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[0]!=""){ echo $arr4[Typename]; //$str=$arr4[1]; }else{ $str="未知 "; } return $str; } //////获取整形项目分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function Getexamname($tid){ $sql4="select Typename from mr_eclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[0]!=""){ echo $arr4[Typename]; //$str=$arr4[1]; }else{ $str="未知 "; } return $str; } function Getstname($tid){ $sql4="select Typename from mr_stclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[0]!=""){ echo $arr4[Typename]; //$str=$arr4[1]; }else{ $str="暂无城市 "; } return $str; } //////获取省份分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function GetProductClassStr($tid,$str=""){ $sql4="select Typeid,Typename,Parentid,Depth from mr_stclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[1]!=""){ $str=$arr4[1]." > ".$str; //echo $str; if($arr4["Parentid"]) { $str= GetProductClassStr($arr4["Parentid"],$str); } }else{ $str="未知 "; } $str=substr($str,0,strlen($str)-1); return $str; } //////获取整形项目分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function GetProgramClassStr($tid,$str=""){ $sql4="select Typeid,Typename,Parentid,Depth from mr_pclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[1]!=""){ $str=$arr4[1]." > ".$str; //echo $str; if($arr4["Parentid"]) { $str= GetProgramClassStr($arr4["Parentid"],$str); } }else{ $str="未知 "; } $str=substr($str,0,strlen($str)-1); return $str; } //////获取整形案例分类字符串,不带连接//////////////////////////////////////////////////////////////////////////////// function GetExampleClassStr($tid,$str=""){ $sql4="select Typeid,Typename,Parentid,Depth from mr_eclass where Typeid = '$tid' limit 1"; $res4=mysql_query($sql4); $arr4=mysql_fetch_array($res4); if($arr4[1]!=""){ $str=$arr4[1]." > ".$str; //echo $str; if($arr4["Parentid"]) { $str= GetExampleClassStr($arr4["Parentid"],$str); } }else{ $str="未知 "; } $str=substr($str,0,strlen($str)-1); return $str; } //////分页代码 function GetPage($startrow,$lastrow,$total,$filename,$currpage,$totalpage,$ft1,$ft2,$ft3,$ft4,$ft5,$pagelen=5){ echo "

"; echo "
".$ft1." ".$startrow." ".$ft2." ".$lastrow."条 (".$ft5." ".$total."条)
"; if($currpage==1){ echo ""; }else{ echo "
".$ft3."
"; } $pagelen = ($pagelen%2)?$pagelen:$pagelen+1;//页码个数 $pageoffset = ($pagelen-1)/2;//页码个数左右偏移量 //分页数大于页码个数时可以偏移 if($totalpage>$pagelen+1){ //如果当前页小于等于左偏移 if($currpage<=$pageoffset){ $init=1; $max = $pagelen; }else{//如果当前页大于左偏移 //如果当前页码右偏移超出最大分页数 if($currpage+$pageoffset>=$totalpage+1){ $init = $totalpage-$pagelen+1; $max=$totalpage; }else{ //左右偏移都存在时的计算 $init = $currpage-$pageoffset; $max = $currpage+$pageoffset; } } if($currpage>$pageoffset+2){ echo "
1
...
"; }elseif($currpage>$pageoffset+1){ echo "
1
"; } for($i=$init;$i<=$max;$i++){ if($currpage==$i){ echo "
".$currpage."
"; }else{ echo "
".$i."
"; } } if(($totalpage-$currpage)>$pageoffset+1){ echo "
...
".$totalpage."
"; }elseif(($totalpage-$currpage)>$pageoffset){ echo "
".$totalpage."
"; } ////如果分页数小于页码个数时不用偏移 }else{ for($k=1;$k<=$totalpage;$k++){ if($currpage==$k){ echo "
".$currpage."
"; }else{ echo "
".$k."
"; } } } if($currpage==$totalpage){ echo ""; }else{ echo "
".$ft4."
"; } echo "
"; } //////分页代码 function GetPage2($startrow,$lastrow,$total,$filename,$currpage,$totalpage,$ft1,$ft2,$ft3,$ft4,$ft5,$pagelen=5){ echo "
"; echo "
显示 ".$startrow." 至 ".$lastrow." (共 ".$total."条记录)
"; //echo ""; //echo "Result Pages: "; if($currpage==1){ echo ""; }else{ echo "
上一页
"; } $pagelen = ($pagelen%2)?$pagelen:$pagelen+1;//页码个数 $pageoffset = ($pagelen-1)/2;//页码个数左右偏移量 //分页数大于页码个数时可以偏移 if($totalpage>$pagelen+1){ //如果当前页小于等于左偏移 if($currpage<=$pageoffset){ $init=1; $max = $pagelen; }else{//如果当前页大于左偏移 //如果当前页码右偏移超出最大分页数 if($currpage+$pageoffset>=$totalpage+1){ $init = $totalpage-$pagelen+1; $max=$totalpage; }else{ //左右偏移都存在时的计算 $init = $currpage-$pageoffset; $max = $currpage+$pageoffset; } } if($currpage>$pageoffset+2){ echo "
1
...
"; }elseif($currpage>$pageoffset+1){ echo "
1
"; } for($i=$init;$i<=$max;$i++){ if($currpage==$i){ echo "
".$currpage."
"; }else{ echo "
".$i."
"; } } if(($totalpage-$currpage)>$pageoffset+1){ echo "
...
".$totalpage."
"; }elseif(($totalpage-$currpage)>$pageoffset){ echo "
".$totalpage."
"; } ////如果分页数小于页码个数时不用偏移 }else{ for($k=1;$k<=$totalpage;$k++){ if($currpage==$k){ echo "
".$currpage."
"; }else{ echo "
".$k."
"; } } } if($currpage==$totalpage){ echo ""; }else{ echo "
下一页
"; } echo "
"; } ?>"; }else{ $homepic=""; } /////各分页广告 $sqlgg1=mysql_query("select * from mr_gg where Id=1 "); $infogg1=mysql_fetch_array($sqlgg1); $path1=$infogg1["Picpath"].$infogg1["Pic"]; $path1url=$infogg1["Titleurl"]; $sqlgg2=mysql_query("select * from mr_gg where Id=2 "); $infogg2=mysql_fetch_array($sqlgg2); $path2=$infogg2["Picpath"].$infogg2["Pic"]; $path2url=$infogg2["Titleurl"]; $sqlgg3=mysql_query("select * from mr_gg where Id=3 "); $infogg3=mysql_fetch_array($sqlgg3); $path3=$infogg3["Picpath"].$infogg3["Pic"]; $path3url=$infogg3["Titleurl"]; $sqlgg4=mysql_query("select * from mr_gg where Id=4 "); $infogg4=mysql_fetch_array($sqlgg4); $path4=$infogg4["Picpath"].$infogg4["Pic"]; $path4url=$infogg4["Titleurl"]; $fenye_title1="显示从"; $fenye_title2="至"; $fenye_title3="上一页"; $fenye_title4="下一页"; $fenye_title5="共"; ?> <? echo $sitename."".$sitetitle;?> " /> " />
欢迎访问好整形美容资讯网    24小时全国免费咨询:400-6616-317

好整形LOGO

0){ while($arr=mysql_fetch_array($res)){ if($i==0){ $defaultpic="uploads/ads/".$arr["picpath"]; $defaulturl=$arr["titleurl"]; $i=1; } $pic.="uploads/ads/".$arr["picpath"]."|"; $tlinks.=$arr["titleurl"]."|"; $texts.=$arr["title"]."|"; } } ?>
好整形名医推荐
医生姓名:
医生职称:
所在医院:
擅长手术:
好整形美容项目
好整形互动问答
添加时间:
已评论数:
好整形美容整形
href="" target="_blank">
好整形美容网医院推荐专区
好整形美容网合作医院环境
'' order by Indexid asc limit 6"); $infoyy=mysql_fetch_array($sqlyy); if(infoyy!=""){ do{ ?>
好整形友情链接
关于我们 | 意见反馈 | 互动问答 | 整形项目
Copyright  1996-2010 haozhengxing.com.cn All rights reserved. 好整形美容网 版权所有沪ICP备10028319号-1 京公网安备110114000959号
特别申明:本网站内容来源于网络,仅供参考,如有侵权,请急时联系我们,会在24小时内删除。 地址:北京市海淀区知春路123号
360网站安全检测平台