主要的论点是集中在SELECT something FROM table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) < = 5; 上,我试验了半天,结果还是出错,今天看了MYSQL的函数,终于出来了结果,不敢独享,贴出来供大家研究,(虽然技术含量不高,别扔我柿子就行,呵呵)

MYSQL的TO_DAYS(DATE)函数是这样说明的:
传回DATE到公元1年的总日数,我测试了一下

(1)date
用法:
date(格式,[时间]);
如果没有时间参数,则使用当前时间.
格式是一个字符串,其中以下字符有特殊意义:
U 替换成从一个起始时间(好象是1970年1月1日)以来的秒数
Y 替换成4位的年号.
y 替换成2位的年号.

mysql常用日期函数 不指定

jed , 2006-10-3 10:04 , 数据库技术 , 评论(0) , 阅读(3593) , Via 本站原创
这里是一个使用日期函数的例子。下面的查询选择了所有记录,其date_col的值是在最后30天以内:  

mysql> SELECT something FROM table  
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30;  

DAYOFWEEK(date)  
返回日期date的星期索引(1=星期天,2=星期一, ……7=星期六)。这些索引值对应于ODBC标准。  
mysql> select DAYOFWEEK(’1998-02-03’);  

<?
class php_upload_class{

     var $FormName       = 'file'; //文件域名称
     var $Directroy      = './'; //上传至目录
     var $MaxSize        = 2097152; //最大上传大小
     var $CanUpload      = true; //是否可以上传
     var $doUpFile       = ''; //上传的文件名
     var $Error          = 0;  //错误参数
     var $user_post_file = array();  //用户上传的文件
     var $allow_type     = array('gif', 'jpg', 'png', 'bmp','txt','rar','zip','doc', 'pdf');
     var $save_info      = array(); //返回一组有用信息,用于提示用户。
     var $last_error     = '';
   var $mutiple_up_res = '';
   var $img_prefix     = 'p_';//重命名图片前缀
   var $is_same_name   = false; //是否将上传的文件重新名称,默认重名称
   var $custom_dir     = ''; //自定义图片名称
   
   var $to_remote      = false; //是否将上传的图片传到远程服务器
   var $host;                   //远程主机
   var $user;                   //用户名
   var $pw;                     //密码
   var $root_dir;              //远程路径
   
   var $is_zoom        = false; //是否将上传的图片文件生成缩略图,默认不缩放
     var $sm_File        = ''; //缩略图名称
     var $dscChar        = 'sm_';//缩略图名称前缀
   var $width          = 150;//缩略图宽度
   var $height         = 113;//缩略图高度
   
   var $is_watermark   = false; //是否将上传的图片文件打水印,默认不打水印
   var $quality        = 90; //0-100 生成图片质量
    var $errorMsg       = false; //水印处理错误
   var $waterPos       = 0; //水印起始位置
   var $waterImage     = ""; //水印图片路径
   var $waterText      = ""; //水印文字
   var $textFont       = 5; //水印文字大小
   var $textColor      = "#FF0000"; //水印文字颜色

   
     function php_upload_class($ini_array=array()){
             
        $this->user_post_file   = $ini_array['user_post_file'];
        $this->allow_type       = $ini_array['allow_type'];
        $this->is_same_name     = $ini_array['is_same_name'];
       
        $this->to_remote        = $ini_array['to_remote'];
        $this->host             = $ini_array['host'];
        $this->user             = $ini_array['user'];
        $this->pw               = $ini_array['pw'];
        $this->root_dir         = $ini_array['root_dir'];
       
        $this->is_zoom          = $ini_array['is_zoom'];
       
        $this->is_watermark     = $ini_array['is_watermark'];
        $this->waterPos         = $ini_array['waterPos'];
        $this->waterImage       = $ini_array['waterImage'];
        $this->waterText        = $ini_array['waterText'];
        $this->textFont         = $ini_array['textFont'];
        $this->textColor        = $ini_array['textColor'];
       
     }

    /*上传单个文件*/
     
     function upload_single_file($fileName = ''){
              if ($this->CanUpload){
                 if ($_FILES[$this->FormName]['size'] == 0){
                    $this->Error = 3;
                    $this->CanUpload = false;
                    return $this->Error;
                    break;
                 }
              }
 
              if($this->CanUpload){
 
                 if ($fileName == ''){
                     $fileName = $_FILES[$this->FormName]['name'];
                 }
     
                 $this->doUpload=@copy($_FILES[$this->FormName]['tmp_name'], $this->Directroy.$fileName);
 
                 if($this->doUpload){
                   $this->doUpFile = $fileName;
                   chmod($this->Directroy.$fileName, 0777);
                   return true;
                 }else{
                   $this->Error = 4;
                   return $this->Error;
                 }
              }
   
              //是否创建图片缩略图
              if($this->is_zoom){
         $imgInfo = @getimagesize($final_file_path);
         $srcWidth = $imgInfo[0];
         $srcHeight = $imgInfo[1];
         if($srcWidth>$srcHeight){
           $this->height = $srcHeight*$this->width/$srcWidth;
         }elseif($srcWidth<$srcHeight){
           $this->width = $srcWidth*$this->height/$srcHeight;
         }
       
        $this->thumb($this->dscChar,$this->width,$this->height);
              }
        //是否给图片加水印
              if($this->is_watermark){
         $this->imageWaterMark($fileName,$this->waterPos,$this->waterImage,$this->waterText,$this->textFont,$this->textColor);
        }
   
     }
     /*上传发生错误*/
   function parse_upload_error($last_error=0){
            switch($last_error){
               case "1":$last_error = "<li>上传的文件超过了 php.ini 中 upload_max_filesize 选项限制的值。</li>";break;
               case "2":$last_error = "<li>上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值。</li>";break;
               case "3":$last_error = "<li>文件只有部分被上传。</li>";break;
               case "4":$last_error = "<li>没有文件被上传。</li>";break;
               default: $last_error = "";break;
        }
            return $last_error;
   }
   /* 上传多个文件  */
     
     function upload_mutiple_file() {
           
        if($this->to_remote){
          require("php_ftp_class.php");
 
              $ini_array = array();
                $ini_array['host']     = $this->host;
                 $ini_array['user']     = $this->user;
                 $ini_array['pw']       = $this->pw;
                 $ini_array['root_dir'] = $this->root_dir;
 
                  $ftp = new php_ftp_class($ini_array);
                  $ftp->connect();
        }
 
              for ($i = 0; $i < count($this->user_post_file['name']); $i++) {
                 
                  if ($this->user_post_file['error'][$i] == 0) {
                     $name      = $this->user_post_file['name'][$i];
           $tmpname   = $this->user_post_file['tmp_name'][$i];
           $size      = $this->user_post_file['size'][$i];
           $mime_type = $this->user_post_file['type'][$i];
           $type      = $this->getExt($this->user_post_file['name'][$i]);
                   
                     if (!$this->checkSize($size)) {
            $this->last_error .= "<li>允许上传的文件最大值为:<b>".$this->get_real_size($this->MaxSize)."</b>,文件 <b>".$name."</b> 的大小为 <b>".$this->get_real_size($size)."</b> ,上传失败。<br>\n";
            continue;
                     }
                     
                     if (!$this->checkType($type)) {
            $this->last_error .= "<li><b>".$type."</b> 类型的文件不允许上传,<b>".$name."</b> 属于该类型,上传失败</li>";
                        continue;
                     }
                   
                    if(!@is_uploaded_file($tmpname)) {
            $this->last_error .= "<li>警告:文件 <b>".$name."</b>通过非正常渠道上传,上传失败。</li>";
            continue;
                    }
                   
                    $basename = $this->getBaseName($name, ".".$type);
         
          $saveas = $this->img_prefix.date("YmdHis").".".$type;
                    //是否重命名上传文件
          $saveas = $this->is_same_name ? $saveas : $name;
         
          //自定义图片名称
          $custom_dir = $this->custom_dir."/".date("YmdHis")."-".$this->get6random();
          $pathinfo = pathinfo($custom_dir);
          if($pathinfo['dirname']!="."){//自定义名称带有目录
            $pathinfo['dirname'] = (strpos($pathinfo['dirname'],"/")==0) ? substr($pathinfo['dirname'],1,strlen($pathinfo['dirname'])) : $pathinfo['dirname'];
            $pathinfo['dirname'] = str_replace("//","/",$pathinfo['dirname']);
            $dirs = explode("/",$pathinfo['dirname']);
            $dirname = false;
            if($i==0){
              foreach($dirs as $dir){
                     $dirname .= $dir."/";
                 $ftp->mk_dir($dirname,true);
              }
            }
            $ftp->root_dir = $ini_array['root_dir']."/".$pathinfo['dirname'];
          }

          $saveas = $this->custom_dir ? $custom_dir.".".$type : $saveas;
         
          $final_file_path = $this->Directroy."/".$saveas; //本地目录
                   
         
         //是否创建图片缩略图
         if($this->is_zoom){
           $this->CanUpload = true;
           $this->doUpFile  = $tmpname;
           $this->thumb($tmpname,basename($saveas),$this->dscChar,$this->width,$this->height);
           //上传缩略图到远程服务器
           
           if($this->to_remote){
             $ftp->ftp_put($this->dscChar.$this->sm_File,$this->sm_File);
           }else{
             if(!@move_uploaded_file($tmpname, $final_file_path)) {
             $this->last_error .= $this->parse_upload_error($this->user_post_file['error'][$i]);
             continue;
           }
           }
           @unlink($this->sm_File);
         }
         //是否给图片加水印
         if($this->is_watermark){
           $this->imageWaterMark($tmpname,$this->waterPos,$this->waterImage,$this->waterText,$this->textFont,$this->textColor);
         }
         //上传图片到服务器
          if($this->to_remote){
              $ftp->ftp_put(basename($saveas),$tmpname);
            if($ftp->error()){
              $this->last_error .= $ftp->error();
              continue;
            }
          }else{
            if(!@move_uploaded_file($tmpname, $final_file_path)) {
            $this->last_error .= $this->parse_upload_error($this->user_post_file['error'][$i]);
            continue;
            }
          }
                   //存储当前文件的有关信息,以便其它程序调用。
                   $this->save_info[] =  array("name"      => $name,
                                           "type"      => $type,
                                               "mime_type" => $mime_type,
                                               "size"      => $size,
                             "saveas"    => $saveas,
                                               "path"      => $final_file_path
                            );
                  }
              }
        if($this->to_remote){
          $ftp->close();
        }
              $this->mutiple_up_res  = '<ul>上传结果:<br>';
          $this->mutiple_up_res .= '有 <font color=green><b>'.count($this->save_info).'</b></font> 个文件被成功上传。<br>';
          if($this->last_error){
           // $this->mutiple_up_res .= '有 <font color=red><b>'.(count($this->user_post_file)-count($this->save_info)).'</b></font> 个文件上传失败。<br>';
            $this->mutiple_up_res .= '上传失败,详细如下:';
            $this->mutiple_up_res .= $this->last_error;
          }
          $this->mutiple_up_res .= '</ul>';
     
          return $this->mutiple_up_res; //返回上传结果信息
     }


     /*创建图片缩略图 */

     function thumb($srcFile,$dscFile,$dscChar='',$width=150,$height=113){

              if ($this->CanUpload && $this->doUpFile != ''){
                 $srcFile = $srcFile ? $srcFile : $this->doUpFile;
 
                 if ($dscChar == ''){
                     $dscChar = 'sm_';
                 }
           $dscFile = $dscFile ? $dscFile : $this->Directroy."/".$dscChar.$srcFile;
               
         $data    = getimagesize($srcFile);
 
                 switch ($data[2]) {
                        case 1:
                               $im = @imagecreatefromgif($srcFile);
                        break;
 
                        case 2:
                           $im = @imagecreatefromjpeg($srcFile);
                        break;
 
                        case 3:
                              $im = @imagecreatefrompng($srcFile);
                        break;
                }
           
        $srcWidth  = $data[0];
        $srcHeight = $data[1];
        if($srcWidth>$srcHeight){
           $width  = $this->width;
           $height = $srcHeight*$this->width/$srcWidth;
        }elseif($srcWidth<$srcHeight){
           $width  = $srcWidth*$this->height/$srcHeight;
         $height = $this->height;
        }else{
           $width  = $this->height;
         $height = $this->height;
        }
 
                $srcW=imagesx($im);
                $srcH=imagesy($im);
                $ni=imagecreatetruecolor($width,$height);
                imagecopyresized($ni,$im,0,0,0,0,$width,$height,$srcW,$srcH);
                $cr = imagejpeg($ni,$dscFile,$this->quality);
                @chmod($dscFile, 0777);

        if($cr){
          $this->sm_File = $dscFile;
         
          return true;
        }else{
          $this->last_error .= "<li>不能生成<b>&quot;".$dscFile."&quot;</b>的缩略图</li>";
          continue;
        }
              }
     
     }

     /* 功能:PHP图片水印 (水印支持图片或文字)
     * 参数:
     *      $groundImage    背景图片,即需要加水印的图片,暂只支持GIF,JPG,PNG格式;
     *      $waterPos        水印位置,有10种状态,0为随机位置;
     *                        1为顶端居左,2为顶端居中,3为顶端居右;
     *                        4为中部居左,5为中部居中,6为中部居右;
     *                        7为底端居左,8为底端居中,9为底端居右;
     *      $waterImage        图片水印,即作为水印的图片,暂只支持GIF,JPG,PNG格式;
     *      $waterText        文字水印,即把文字作为为水印,支持ASCII码,不支持中文;
     *      $textFont        文字大小,值为1、2、3、4或5,默认为5;
     *      $textColor        文字颜色,值为十六进制颜色值,默认为#FF0000(红色);
     *
     * 注意:Support GD 2.0,Support FreeType、GIF Read、GIF Create、JPG 、PNG
     *      $waterImage 和 $waterText 最好不要同时使用,选其中之一即可,优先使用 $waterImage。
     *      当$waterImage有效时,参数$waterString、$stringFont、$stringColor均不生效。
     *      加水印后的图片的文件名和 $groundImage 一样。
     * 作者:longware @ 2004-11-3 14:15:13 我修改的
     */
     function imageWaterMark($groundImage,$waterPos=0,$waterImage,$waterText,$textFont=5,$textColor="#FF0000"){

              $isWaterImage = FALSE;
              $formatMsg = "警告:暂不支持该文件格式,请用图片处理软件将图片转换为GIF、JPG、PNG格式。";

              //读取水印文件
              if(!empty($waterImage)) {
                $isWaterImage = TRUE;
                $water_info   = @getimagesize($waterImage);
                $water_w      = $water_info[0];//取得水印图片的宽
                $water_h      = $water_info[1];//取得水印图片的高

                switch($water_info[2]){ //取得水印图片的格式
                      case 1:$water_im = @imagecreatefromgif($waterImage);break;
                      case 2:$water_im = @imagecreatefromjpeg($waterImage);break;
                      case 3:$water_im = @imagecreatefrompng($waterImage);break;
                      default:
                    $this->errormsg = $formatMsg;
                    die("");
                break;
                }
              }

              //读取背景图片
              if($groundImage) {
                $ground_info = getimagesize($groundImage);
                $ground_w    = $ground_info[0];//取得背景图片的宽
                $ground_h    = $ground_info[1];//取得背景图片的高

                switch($ground_info[2]){//取得背景图片的格式  
                      case 1:$ground_im = imagecreatefromgif($groundImage);break;
                      case 2:$ground_im = imagecreatefromjpeg($groundImage);break;
                      case 3:$ground_im = imagecreatefrompng($groundImage);break;
                      default:
                $this->errorMsg = $formatMsg;
                    die("");
                break;
                }
              }else{
        $this->errorMsg = "需要加水印的图片不存在!";
                die("");
              }

              //水印位置
              if($isWaterImage){//图片水印  
                $w = $water_w;
                $h = $water_h;
                $label = "图片的";
              }else{ //文字水印  
                $temp = imagettfbbox(ceil($textFont*2.5),0,"./ARIAL.TTF",$waterText);//取得使用 TrueType 字体的文本的范围
                $w = $temp[2] - $temp[6];
                $h = $temp[3] - $temp[7];
                unset($temp);
                $label = "文字区域";
              }
              if( ($ground_w<$w) || ($ground_h<$h) ){
                $this->errorMsg = "需要加水印的图片的长度或宽度比水印".$label."还小,无法生成水印!";
                return;
              }
              switch($waterPos) {
                    case 0://随机
                           $posX = rand(0,($ground_w - $w));
                           $posY = rand(0,($ground_h - $h));
                           break;
                    case 1://1为顶端居左
                           $posX = 0;
                           $posY = 0;
                           break;
                    case 2://2为顶端居中
                           $posX = ($ground_w - $w) / 2;
                           $posY = 0;
                           break;
                    case 3://3为顶端居右
                           $posX = $ground_w - $w;
                           $posY = 0;
                           break;
                    case 4://4为中部居左
                           $posX = 0;
                           $posY = ($ground_h - $h) / 2;
                           break;
                    case 5://5为中部居中
                           $posX = ($ground_w - $w) / 2;
                           $posY = ($ground_h - $h) / 2;
                           break;
                    case 6://6为中部居右
                           $posX = $ground_w - $w;
                           $posY = ($ground_h - $h) / 2;
                           break;
                    case 7://7为底端居左
                           $posX = 0;
                          $posY = $ground_h - $h;
                           break;
                    case 8://8为底端居中
                           $posX = ($ground_w - $w) / 2;
                           $posY = $ground_h - $h;
                           break;
                    case 9://9为底端居右
                           $posX = $ground_w - $w;
                           $posY = $ground_h - $h;
                           break;
                    case 10://自定义
                           $posX = 160;
                           $posY = 265;
                           break;    
                    default://随机
                           $posX = rand(0,($ground_w - $w));
                           $posY = rand(0,($ground_h - $h));
                           break;
              }

              //设定图像的混色模式
              imagealphablending($ground_im, true);

              if($isWaterImage){ //图片水印  
                imagecopy($ground_im, $water_im, $posX, $posY, 0, 0, $water_w,$water_h);//拷贝水印到目标文件        
              }else{//文字水印
                if( !empty($textColor) && (strlen($textColor)==7) ){
                    $R = hexdec(substr($textColor,1,2));
                    $G = hexdec(substr($textColor,3,2));
                    $B = hexdec(substr($textColor,5));
                }else{
          $this->errorMsg = "水印文字颜色格式不正确!";
                    die("");
                }
                imagestring ( $ground_im, $textFont, $posX, $posY, $waterText, imagecolorallocate($ground_im, $R, $G, $B));        
              }

              //生成水印后的图片
              @unlink($groundImage);
              switch($ground_info[2]){ //取得背景图片的格式
                    case 1:imagegif($ground_im,$groundImage);break;
                    case 2:imagejpeg($ground_im,$groundImage,$this->quality);break;
                    case 3:imagepng($ground_im,$groundImage);break;
                    default:
              $this->errorMsg = '不支持该类型背景图片';
                  die("");
              break;
             }

              //释放内存
              if(isset($water_info)) unset($water_info);
              if(isset($water_im)) imagedestroy($water_im);
              unset($ground_info);
              imagedestroy($ground_im);
     }
     //检查文件是否存在
     function scanFile()
     {
              if ($this->CanUpload){
                 $scan = is_readable($_FILES[$this->FormName]['name']);
                 if ($scan){  
                    $this->Error = 2;
                 }
                 return $scan;
             }
     }

     //获取文件大小
     function getSize($format = 'B')
     {
 
              if ($this->CanUpload)
        {
 
                  if ($_FILES[$this->FormName]['size'] == 0){
                      $this->Error = 3;
                      $this->CanUpload = false;
                  }
 
                  switch ($format){
                         case 'B':
                                  return $_FILES[$this->FormName]['size'];
                         break;
 
                         case 'M':
                                  return ($_FILES[$this->FormName]['size'])/(1024*1024);
             break;
                  }
 
               }
      }
      //转换大小
      function get_real_size($size) {

               $kb = 1024;         // Kilobyte
               $mb = 1024 * $kb;   // Megabyte
               $gb = 1024 * $mb;   // Gigabyte
               $tb = 1024 * $gb;   // Terabyte

               if($size < $kb) {
                  return $size." B";
               }else if($size < $mb) {
                  return round($size/$kb,2)." KB";
               }else if($size < $gb) {
                  return round($size/$mb,2)." MB";
               }else if($size < $tb) {
                  return round($size/$gb,2)." GB";
               }else {
                  return round($size/$tb,2)." TB";
               }

       }

     //获取文件类型
     function getExt($filename=false)
     {
           if($filename){
               $stuff = pathinfo($filename);
               return $stuff['extension'];
       }else{
               if ($this->CanUpload){
                  $ext=$_FILES[$this->FormName]['name'];
                  $extStr=explode('.',$ext);
                  $count=count($extStr)-1;
               }
               return $extStr[$count];
       }
     }

     //获取文件名称
     function getName()
     {
              if ($this->CanUpload){
                 return $_FILES[$this->FormName]['name'];
              }
     }

     //新建文件名
     function newName()
     {
             if ($this->CanUpload){
                $FullName=$_FILES[$this->FormName]['name'];
                $extStr=explode('.',$FullName);
                $count=count($extStr)-1;
                $ext = $extStr[$count];
 
                return date('YmdHis').rand(0,9).'.'.$ext;
             }
    }

      //显示错误参数
      function Err(){
               return $this->Error;
      }

     //上传后的文件名
     function UpFile(){

              if ($this->doUpFile != ''){
                 return $this->doUpFile;
              }else{
                 $this->Error = 6;
              }
    }

     //上传文件的路径
     function filePath(){

              if ($this->doUpFile != ''){
                 return $this->Directroy.$this->doUpFile;
             }else{
                 $this->Error = 6;
             }  
     }

     //缩略图文件名称
     function thumbMap(){

              if ($this->sm_File != ''){
                 return $this->sm_File;
              }else{
                $this->Error = 6;
              }
     }
    //////////////////extention
     /**//**
     * 检测用户提交文件类型是否合法
     * @access private
     * @return boolean 如果为true说明类型合法,反之不合法
     */
     function checkType($extension) {
              foreach ($this->allow_type as $type) {
                      if (strcasecmp($extension , $type) == 0)
                      return true;
              }
              return false;
     }


     /**//**
     * 取给定文件文件名,不包括扩展名。
     * eg: getBaseName("j:/hexuzhong.jpg"); //返回 hexuzhong
     *
     * @param String $filename 给定要取文件名的文件
     * @access private
     * @return String 返回文件名
     */

     function getBaseName($filename, $type) {
              $basename = basename($filename, $type);
              return $basename;
     }
   function halt($msg) {
            return $msg;
   }
   /**//**
     * 检测用户提交文件大小是否合法
     * @param Integer $size 用户上传文件的大小
     * @access private
     * @return boolean 如果为true说明大小合法,反之不合法
     */
    function checkSize($size) {
     
           if ($size > $this->MaxSize ) {
                return false;
             }
             else {
                return true;
             }
     }
     
    function get6random(){
             $return = false;
         $str = "1 2 3 4 5 6 7 8 9";
         $arr = explode(" ",$str);
         srand((double)microtime()*1000000);
       
         for($i=0;$i<=6;$i++){
            $salt = rand(0, 9);
          $return .= $arr[$salt];
         }
         return $return;
    }



}

////////////////////////////测试
/*
echo '
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input type="file" name="file[]"><br>
<input type="file" name="file[]"><br>
<input type="file" name="file[]"><br>
<input type="file" name="file[]"><br>
<input type="file" name="file[]"><br>
<input type="file" name="file[]"><br>
<input type="submit" name="Submit" value="提交">
<input name="scan" type="hidden" id="up" value="true">
</form>
';
if(!empty($_POST['scan'])){
       
 
 require("config.php");
 require("php_ftp_class.php");
 $ini_array = array();
 *//*
 $settings['FTP_HOST']='192.168.1.8';
 $settings['FTP_USER']='program';
 $settings['FTP_PW']='k8c3321d';
 $settings['FTP_ROOT_DIR']='E:/web/program/product';
 *//*
 $ini_array['host']             = $settings['FTP_HOST'];
 $ini_array['user']             = $settings['FTP_USER'];
 $ini_array['pw']               = $settings['FTP_PW'];
 $ini_array['root_dir']         = $settings['FTP_ROOT_DIR'];

 $ini_array['remote_host_path'] = "http://192.168.1.8/";
 $ini_array['user_post_file']   = $_FILES['file'];
 $ini_array['allow_type']       = array('gif', 'jpg', 'png', 'bmp');

 $ini_array['is_zoom']          = true;//需要生成缩略图
 
 
 $ini_array['is_watermark']     = true;//需要加水印
 $ini_array['waterPos']         = 5 ; //缺省为随机//0为随机 //1为顶端居左 //2为顶端居中 //3为顶端居右 //4为中部居左 //5为中部居中 //6为中部居右 //7为底端居左 //8为底端居中 //9为底端居右
 $ini_array['waterImage']       = "./tmpfolder/angel.gif"; //水印图片
 $ini_array['waterText']        = "";
 $ini_array['textFont']         = 6;
 $ini_array['textColor']        = "#ff0000";

 $ini_array['is_same_name']     = 1;//不需要重命名上传文件

 $upfos = new php_upload_class($ini_array);
 
 $tmpfolder = "./tmpfolder";
 
 if(!file_exists($tmpfolder)) mkdir($tmpfolder, 0777);
 
 $upfos->Directroy  = $tmpfolder;

 $upfos->upload_mutiple_file();

 echo $upfos->mutiple_up_res;
 
 foreach($upfos->save_info as $fileInfo){
     echo '<iframe src="ftp_put.php?to='.$fileInfo['saveas'].'&from='.$fileInfo['path'].'" frameborder="0" height="0" width="0" scrolling="no" ></iframe>';
     if($upfos->is_zoom) {
       echo '<iframe src="ftp_put.php?to=p_small/'.$upfos->dscChar.$fileInfo['saveas'].'&from='.dirname($fileInfo['path'])."/".$upfos->dscChar.$fileInfo['saveas'].'" frameborder="0" height="0" width="0" scrolling="no" ></iframe>';
     }
 }

// if($upfos->is_zoom) echo "<img src='{$tmpfolder}/sm_".$upfos->save_info[0]['name']."'><br>";
 
// echo "<img src='{$tmpfolder}/".$upfos->save_info[0]['name']."'>";

}
*/
?>
以上程序运行必要文件。
php_ftp_class.php

<?
class php_ftp_class{
     var $user     ;
     var $pw       ;
     var $host     ;
     var $root_dir = "";//root ftp dir of server
     var $con_id   = 0;//descriptor on ftp connection
     var $cwd;//current working dir
     var $FTP_MODE = 'FTP_BINARY';// FTP_ASCII | FTP_BINARY
     var $ERR      = false;//must object display ftp errors
     //constr.
     function php_ftp_class($ini_array=array('host'=>"localhost",'user'=>"guest",'pw'=>"guest",'root_dir'=>"",'remote_path'=>'http://localhost')){
              $this->host     = $ini_array['host'];
          $this->user     = $ini_array['user'];
          $this->pw       = $ini_array['pw'];
          $this->root_dir = $ini_array['root_dir'];
         
              if($this->connect()){
                 $this->cwd = @ftp_pwd($this->con_id); //返回当前目录名
              }
     }

     //connect to ftp server
     function connect(){
              $this->con_id = @ftp_connect($this->host);
              if(!$this->con_id){
   
               $this->ERR .= "<li>尝试连接到远程主机".$this->host."时发生错误,连接失败</li>";  
               return false;
 
            }
            if(@ftp_login($this->con_id,$this->user,$this->pw)){
       
             return true;
       
          }else{
       
            $this->ERR .= "<li>用户名 <b>&quot;".$this->user."&quot;</b> 错误,不能登录到远端主机 <b>&quot;".$this->host."&quot;</b>,登录失败</li>";
       
          }
            return false;
     }

     //close ftp connection
     function close(){
              ftp_quit($this->con_id);
     }

     //print error messages
     function error(){
              return   $this->ERR ? "<ul>FTP错误:".$this->ERR."</ul>\n" : false;
     }

     //change current working dir
     function cd($dir){
              if(!@ftp_chdir($this->con_id,$dir)){
                $this->ERR .= "<li>Cannot view directory <b>&quot;".$this->root_dir."/".$dir."&quot;</b>!</li>";
                return false;
              }
              $this->cwd=@ftp_pwd($this->con_id);
              return true;
     }

     //create new empty file
     function mk_file($name){
                if(!$tmpfile=tempnam("/tmp","phpftptmp")){
                  $this->ERR .= "<li>Can't create temp file?</li>";
                  return false;
                }elseif(!ftp_put($this->con_id,$name,$tmpfile,$this->FTP_MODE)){
                   $this->ERR .= "<li>Can't create file <b>&quot;".$this->root_dir."/".$this->cwd."/".$name."&quot;</b></li>";
                   unlink($tmpfile);
                   return false;
                }
                unlink($tmpfile);
                return true;
     }

     //create new dir
     function mk_dir($dir_name,$ret=false){
              $mkdir = @ftp_mkdir($this->con_id,$this->root_dir."/".$this->cwd."/".$dir_name);
        if (!$mkdir && !$ret){
         $this->ERR .= "<li>不能创建文件夹 <b>&quot;".$this->root_dir.$this->cwd.$dir_name."&quot;</b></li>";
         return false;
              }
              return true;
     }

     //change access right to object
     function set_perm($obj,$num){
              //CHMOD 444 ftp.php3
              if(!$this->site("CHMOD ".$num." ".$obj)){
                $this->ERR .= "<li>Cannot change permitions of object <b>&quot;".$this->root_dir."/".$this->cwd."/".$obj."&quot;</b></li>";
                return false;
              }
              return true;
     }

     //send SITE command
     function site($cmd){
              if(!ftp_site($this->con_id, $cmd)){
                $this->ERR .= "<li>Cannot send site command <b>&quot;".$cmd."&quot;</b></li>";
                return false;
              }
              return true;
 }

     //copy file D:/web/images.imp3.net/upload/product $ftp->copy("./images/upload_success.gif","upload_success.gif",true);
     function copy($from,$to){
   /*
 if(file_exists($this->root_dir."/".$to)){
     $this->error("Object <b>&quot;".$this->root_dir."/".$to."&quot;</b> already exists!");
     return false;
   }
   srand((double)microtime()*1000000);
   $tmpfile= dirname(tempnam('',''))."/phpftptmp.".rand() ;
   */
            if(!copy($from,$to)){
                $this->ERR .= "<li>上传<b>&quot;$from&quot;</b>到<b>&quot;$this->root_dir/$to&quot;</b>失败!</li>";
                return false;
              }
              return true;
     }
     function ftp_put($remote_file,$local_file,$ftp_mode=false){
   /*
 if(file_exists($this->root_dir."/".$to)){
     $this->error("Object <b>&quot;".$this->root_dir."/".$to."&quot;</b> already exists!");
     return false;
   }
   */
 //FTP_BINARY为什么不能用变量代替???
            if(!$ftp_mode){
                if(!ftp_put($this->con_id,$this->root_dir."/".$remote_file,$local_file,FTP_BINARY)){
                  $this->ERR .= "<li>上传<b>&quot;$local_file&quot;</b>到<b>&quot;$this->root_dir/$remote_file&quot;</b>失败!</li>";
                  return false;
                }
            }else{
                if(!ftp_put($this->con_id,$this->root_dir."/".$remote_file,$local_file,FTP_ASCII)){
                  $this->ERR .= "<li>上传<b>&quot;$local_file&quot;</b>到<b>&quot;$this->root_dir/$remote_file&quot;</b>失败!</li>";
                  return false;
               }
            }
            return true;
     }
     //move object
     function move($from,$to){
              if(!@ftp_rename($this->con_id,$this->root_dir."/".$from,$this->root_dir."/".$to)){
                $this->ERR .= "<li>移动 <b>&quot;".$this->root_dir."/".$from."&quot;</b> 到 <b>&quot;".$this->root_dir."/".$to."&quot;失败!</b></li>";
                return false;
              }
              return true;
     }

     //rename object
     function rename($from,$to){
              if(!@ftp_rename($this->con_id,$this->root_dir."/".$this->cwd."/".$from,$this->root_dir."/".$this->cwd."/".$to)){
                $this->ERR .= "<li>Cannot rename object <b>&quot;".$this->root_dir."/".$this->cwd."/".$to."&quot;</b></li>";
                return false;
              }
              return true;
     }

     //delete directory  
     function delete_dir($dir){
              if(!@ftp_rmdir($this->con_id, $this->root_dir."/".$this->cwd."/".$dir)){
                $this->ERR .= "<li>不能删除远端文件夹 <b>&quot;".$this->root_dir."/".$dir."&quot;</b></li>";
                return false;
              }
              return true;  
     }
     //delte file
     function delete_file($file){
   
              if(!@ftp_delete($this->con_id, $this->root_dir."/".$this->cwd."/".$file)){
                $this->ERR .= "<li>不能删除远端文件 <b>&quot;".$this->root_dir."/".$file."&quot;</b></li>";
        return false;
              }
              return true;  
     }

     //write into file
     function write($dest,$FILEDATA){
              if(!WIN){
               $old_perm=$this->get_perm($dest,'i');
               $this->set_perm($dest,"666");
             }
             $fd=fopen($this->root_dir."/".$this->cwd."/".$dest,"w");
             if(!fwrite($fd,$FILEDATA)){
               $this->ERR .= "<li>Cannot write file <b>&quot;".$this->root_dir."/".$this->cwd."/".$dest."&quot;</b></li>";
               fclose($fd);
               if(!WIN)$this->set_perm($dest,"644");
               return false;
             }
             fclose($fd);
             if(!WIN)$this->set_perm($dest,"644");
             return true;
     }

     //move uploaded file from TMP into CWD
     function move_uploaded_file($file_to_move,$file_name){
              srand((double)microtime()*1000000);
             if(!$tmp_dir=get_cfg_var('upload_tmp_dir'))$tmp_dir=dirname(tempnam('',''));
             $tmpfile=$tmp_dir."/phpftptmp.".rand();
             if(!copy($file_to_move,$tmpfile)){
               $this->ERR .=  "<li>Can't create temp file?</li>";
               unlink($file_to_move);
               return false;
             }elseif(!ftp_put($this->con_id,$this->cwd."/".$file_name,$tmpfile,$this->FTP_MODE)){
               $this->ERR .= "<li>Can't write file <b>&quot;".$this->root_dir."/".$this->cwd."/".$file_name."&quot;</b></li>";
               unlink($file_to_move);
               unlink($tmpfile);
               return false;
             }
             unlink($file_to_move);
             unlink($tmpfile);
             return true;
     }

     //return access right of an object, at various formats
     function get_perm($obj,$type='i'){
              $num=fileperms($obj);
             $s=array(07=>'rwx',06=>'rw-',05=>'r-x',04=>'r--',03=>'-wx',02=>'-w-',01=>'--x',00=>'---');
             $i=array(07=>'7',06=>'6',05=>'5',04=>'4',03=>'3',02=>'2',01=>'1',00=>'0');
             $b=array(
               07=>array(1,1,1),
               06=>array(1,1,0),
               05=>array(1,0,1),
               04=>array(1,0,0),
               03=>array(0,1,1),
               02=>array(0,1,0),
               01=>array(0,0,1),
               00=>array(0,0,0)
             );
             switch($type){
               case 'b':
                 $ret['o']=$b[($num & 0700)>>6];
                 $ret['g']=$b[($num &  070)>>3];
                 $ret['a']=$b[($num &   07)   ];
                 break;
               case 's':

                 if($num & 0x1000)     $ret ='p';//FIFO pipe
                 elseif($num & 0x2000) $ret.='c';//Character special
                 elseif($num & 0x4000) $ret.='d';//Directory
                 elseif($num & 0x6000) $ret.='b';//Block special
                 elseif($num & 0x8000) $ret.='-';//Regular
                 elseif($num & 0xA000) $ret.='l';//Symbolic Link
                 elseif($num & 0xC000) $ret.='s';//Socket
                 else $str.='?'; //UNKNOWN
                 $ret.=$s[($num & 0700)>>6];
                 $ret.=$s[($num &  070)>>3];
                 $ret.=$s[($num &   07)   ];
                 break;
               case 'i':
                 $ret =$i[($num & 0700)>>6];
                 $ret.=$i[($num &  070)>>3];
                 $ret.=$i[($num &   07)   ];
                 break;
             }
             return $ret;
     }
   //这里显示方式可以按自己的方法修改
     //print dir file list
     function dir_list(){
   //ftp_nlist ?Returns a list of files in the given directory.
   //ftp_rawlist ?Returns a detailed list of files in the given directory.
            $dir_list = '
            <table border=1 cellpadding=3 cellspacing=0><tr><td>Directories</td><td>Files</td></tr>';
            $contents=ftp_nlist($this->con_id, $this->cwd);
            $d_i=0;
            $f_i=0;
            sort($contents);
            for($i=0;$i<count($contents);$i++){
              $file_size=ftp_size($this->con_id,$contents[$i]);
              if(is_dir($this->root_dir.$contents[$i])){
                $nlist_dirs[$d_i]=$contents[$i];
                $d_i++;
              }else{
                $nlist_files[$f_i]=$contents[$i];
                $nlist_filesize[$f_i]=$file_size;
                $f_i++;
              }
            }
           $dir_list .='<tr><td><pre>';
            for($i=0;$i<count($nlist_dirs);$i++)
             $dir_list .=$nlist_dirs[$i]."<br>";
            $dir_list .='</td><td><pre>';
            for($i=0;$i<count($nlist_files);$i++)
             $dir_list .=$nlist_files[$i]." ".(int)$nlist_filesize[$f_i]."<br>";
            $dir_list .='</td></tr></table>';
          return $dir_list;
     }
}
/*测试
    require("config.php");

    $FTP_HOST=$settings['FTP_HOST'];
    $FTP_USER=$settings['FTP_USER'];
    $FTP_PW=$settings['FTP_PW'];
    $FTP_ROOT_DIR=$settings['FTP_ROOT_DIR'];
    $ftp = new php_ftp_class($FTP_USER,$FTP_PW,$FTP_HOST,$FTP_ROOT_DIR);
    $ftp->connect();
        $ftp->ftp_put("upload_success.gif","./images/upload_success.gif");
    $ftp->close();
    $ftp->error();*/


?>

<?
session_start();
//生成验证码图片
Header("Content-type: image/PNG");
$authnum=$_SESSION["authnum"];
srand((double)microtime()*1000000);
$len = strlen($authnum)*12+10;
$im = imagecreate($len,25);
$color[]= array ();
$color[1] = ImageColorAllocate($im, 0x00,0x00,0x00);
$color[2] = ImageColorAllocate($im, 0x00,0x00,0xff);
$color[3] = ImageColorAllocate($im, 0xff,0x33,0x00);
$color[4] = ImageColorAllocate($im, 0x00,0x00,0x99);
$color[5] = ImageColorAllocate($im, 0xff,0x00,0xff);
$color[6] = ImageColorAllocate($im, 0x99,0x66,0xff);
$color[7] = ImageColorAllocate($im, 0x00,0x99,0x99);
$color[8] = ImageColorAllocate($im, 0xff,0xff,0x00);

if($background)
{
$r = substr($background, 0, 2);
$g = substr($background, 2, 2);
$b = substr($background, 4, 2);
$bg = ImageColorAllocate($im, hexdec("0x".$r),hexdec("0x".$g),hexdec("0x".$b));
}
else
{
$bg = ImageColorAllocate($im, 0xcc,0xcc,0xff);
}
imagefill($im, 0, 0, $bg);

for($i=0,$x=5;$i<strlen($authnum);$i++)
{
imagestring($im, 5, $x, rand(2,8), $authnum[$i], $color[rand(1,8)]);
$x+=12;
}
for($i=0;$i<100;$i++)   //加入干扰象素
{
   $randcolor = ImageColorallocate($im,rand(100,255),rand(100,255),rand(100,255));
   imagesetpixel($im, rand()%$len , rand()%30 , $randcolor);
}
ImagePNG($im);
ImageDestroy($im);
?>



hexdec
(PHP 3, PHP 4, PHP 5)

hexdec -- 十六进制转换为十进制
说明
number hexdec ( string hex_string )


返回与 hex_string 参数所表示的十六进制数等值的的十进制数。hexdec() 将一个十六进制字符串转换为十进制数。所能转换的最大数值为 7fffffff,即十进制的 2147483647。PHP 4.1.0 开始,该函数可以处理大数字,这种情况下,它会返回 float 类型。

JavaScript 参考教程 不指定

jed , 2006-10-2 13:42 , 代码编程 , 评论(0) , 阅读(3443) , Via 本站原创
事件处理
事件处理概述
   事件处理是对象化编程的一个很重要的环节,没有了事件处理,程序就会变得很死,缺乏灵活性。事件处理的过程可以这样表示:发生事件 - 启动事件处理程序 - 事件处理程序作出反应。其中,要使事件处理程序能够启动,必须先告诉对象,如果发生了什么事情,要启动什么处理程序,否则这个流程就不能进行下去。事件的处理程序可以是任意 JavaScript 语句,但是我们一般用特定的自定义函数(function)来处理事情。

指定事件处理程序
  指定事件处理程序有三种方法:

方法一 直接在 HTML 标记中指定。这种方法是用得最普遍的。方法是:

<标记 ... ... 事件="事件处理程序" [事件="事件处理程序" ...]>

让我们来看看例子:

<body ... onload="alert('网页读取完成,请慢慢欣赏!')" onunload="alert('再见!')">

这样的定义<body>标记,能使文档读取完毕的时候弹出一个对话框,写着“网页读取完成,请慢慢欣赏”;在用户退出文档(或者关闭窗口,或者到另一个页面去)的时候弹出“再见”。

方法二 编写特定对象特定事件的 JavaScript。这种方法用得比较少,但是在某些场合还是很好用的。方法是:

<script language="JavaScript" for="对象" event="事件">
...
(事件处理程序代码)
...
</script>

例:

<script language="JavaScript" for="window" event="onload">
 alert('网页读取完成,请慢慢欣赏!');
</script>

方法三 在 JavaScript 中说明。方法:

<事件主角 - 对象>.<事件> = <事件处理程序>;

用这种方法要注意的是,“事件处理程序”是真正的代码,而不是字符串形式的代码。如果事件处理程序是一个自定义函数,如无使用参数的需要,就不要加“()”。例:

...

function ignoreError() {
 return true;
}

...

window.onerror = ignoreError; // 没有使用“()”

这个例子将 ignoreError() 函数定义为 window 对象的 onerror 事件的处理程序。它的效果是忽略该 window 对象下任何错误(由引用不允许访问的 location 对象产生的“没有权限”错误是不能忽略的)。

事件详解
onblur 事件 发生在窗口失去焦点的时候。

 应用于:window 对象

onchange 事件 发生在文本输入区的内容被更改,然后焦点从文本输入区移走之后。捕捉此事件主要用于实时检测输入的有效性,或者立刻改变文档内容。

 应用于:Password 对象;Select 对象;Text 对象;Textarea 对象

onclick 事件 发生在对象被单击的时候。单击是指鼠标停留在对象上,按下鼠标键,没有移动鼠标而放开鼠标键这一个完整的过程。

  一个普通按钮对象(Button)通常会有 onclick 事件处理程序,因为这种对象根本不能从用户那里得到任何信息,没有 onclick 事件处理程序就等于废柴。按钮上添加 onclick 事件处理程序,可以模拟“另一个提交按钮”,方法是:在事件处理程序中更改表单的 action, target, encoding, method 等一个或几个属性,然后调用表单的 submit() 方法。

  在 Link 对象的 onclick 事件处理程序中返回 false 值(return false),能阻止浏览器打开此连接。即,如果有一个这样的连接:<a href="http://www.a.com" onclick="return false">Go!</a>,那么无论用户怎样点击,都不会去到 www.a.com 网站,除非用户禁止浏览器运行 JavaScript。

 应用于:Button 对象;Checkbox 对象;Image 对象;Link 对象;Radio 对象;Reset 对象;Submit 对象

onerror 事件 发生在错误发生的时候。它的事件处理程序通常就叫做“错误处理程序”(Error Handler),用来处理错误。上边已经介绍过,要忽略一切错误,就使用:

function ignoreError() {
 return true;
}

window.onerror = ignoreError;

 应用于:window 对象

onfocus 事件 发生在窗口得到焦点的时候。

 应用于:window 对象

onload 事件 发生在文档全部下载完毕的时候。全部下载完毕意味着不但 HTML 文件,而且包含的图片,插件,控件,小程序等全部内容都下载完毕。本事件是 window 的事件,但是在 HTML 中指定事件处理程序的时候,我们是把它写在<body>标记中的。

 应用于:window 对象

onmousedown 事件 发生在用户把鼠标放在对象上按下鼠标键的时候。参考 onmouseup 事件。

 应用于:Button 对象;Link 对象

onmouseout 事件 发生在鼠标离开对象的时候。参考 onmouseover 事件。

 应用于:Link 对象

onmouseover 事件 发生在鼠标进入对象范围的时候。这个事件和 onmouseout 事件,再加上图片的预读,就可以做到当鼠标移到图像连接上,图像更改的效果了。有时我们看到,在指向一个连接时,状态栏上不显示地址,而显示其它的资料,看起来这些资料是可以随时更改的。它们是这样做出来的:

<a href="..."
  onmouseover="window.status='Click Me Please!'; return true;"
  onmouseout="window.status=''; return true;">

 

 应用于:Link 对象

onmouseup 事件 发生在用户把鼠标放在对象上鼠标键被按下的情况下,放开鼠标键的时候。如果按下鼠标键的时候,鼠标并不在放开鼠标的对象上,则本事件不会发生。

 应用于:Button 对象;Link 对象

onreset 事件 发生在表单的“重置”按钮被单击(按下并放开)的时候。通过在事件处理程序中返回 false 值(return false)可以阻止表单重置。

 应用于:Form 对象

onresize 事件 发生在窗口被调整大小的时候。

 应用于:window 对象

onsubmit 事件 发生在表单的“提交”按钮被单击(按下并放开)的时候。可以使用该事件来验证表单的有效性。通过在事件处理程序中返回 false 值(return false)可以阻止表单提交。

 应用于:Form 对象

onunload 事件 发生在用户退出文档(或者关闭窗口,或者到另一个页面去)的时候。与 onload 一样,要写在 HTML 中就写到<body>标记里。

  有的 Web Masters 用这个方法来弹出“调查表单”,以“强迫”来者填写;有的就弹出广告窗口,唆使来者点击连接。我觉得这种“onunload="open..."”的方法很不好,有时甚至会因为弹出太多窗口而导致资源缺乏。有什么对来者说就应该在网页上说完,不对吗?

 应用于:window 对象

关于对象化编程的语句
  现在我们有实力学习以下关于对象化编程,但其实属于上一章的内容了。

with 语句 为一个或一组语句指定默认对象。

用法:with (<对象>) <语句>;

with 语句通常用来缩短特定情形下必须写的代码量。在下面的例子中,请注意 Math 的重复使用:

x = Math.cos(3 * Math.PI) + Math.sin(Math.LN10);
y = Math.tan(14 * Math.E);

当使用 with 语句时,代码变得更短且更易读:

with (Math) {
 x = cos(3 * PI) + sin(LN10);
 y = tan(14 * E);
}

this 对象 返回“当前”对象。在不同的地方,this 代表不同的对象。如果在 JavaScript 的“主程序”中(不在任何 function 中,不在任何事件处理程序中)使用 this,它就代表 window 对象;如果在 with 语句块中使用 this,它就代表 with 所指定的对象;如果在事件处理程序中使用 this,它就代表发生事件的对象。

一个常用的 this 用法:

<script>
...
function check(formObj) {
 ...
}
...
</script>

<body ...>
...
<form ...>
...
<input type="text" ... onchange="check(this.form)">
...
</form>
...
</body>

这个用法常用于立刻检测表单输入的有效性。

自定义构造函数 我们已经知道,Array(),Image()等构造函数能让我们构造一个变量。其实我们自己也可以写自己的构造函数。自定义构造函数也是用 function。在 function 里边用 this 来定义属性。

function <构造函数名> [(<参数>)] {
 ...
 this.<属性名> = <初始值>;
 ...
}

然后,用 new 构造函数关键字来构造变量:

var <变量名> = new <构造函数名>[(<参数>)];

构造变量以后,<变量名>成为一个对象,它有它自己的属性——用 this 在 function 里设定的属性。

以下是一个从网上找到的搜集浏览器详细资料的自定义构造函数的例子:

function Is() {
 var agent = navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);  //主版本号
 this.minor = parseFloat(navigator.appVersion);//全版本号
 this.ns = ((agent.indexOf('mozilla')!=-1) &&
            ((agent.indexOf('spoofer')==-1) && //是否 Netscape
             (agent.indexOf('compatible') == -1)));
 this.ns2 = (this.ns && (this.major == 3));    //是否 Netscape 2
 this.ns3 = (this.ns && (this.major == 3));    //是否 Netscape 3
 this.ns4b = (this.ns && (this.minor < 4.04)); //是否 Netscape 4 低版本
 this.ns4 = (this.ns && (this.major >= 4));    //是否 Netscape 4 高版本
 this.ie = (agent.indexOf("msie") != -1);      //是否 IE
 this.ie3 = (this.ie && (this.major == 2));    //是否 IE 3
 this.ie4 = (this.ie && (this.major >= 4));    //是否 IE 4
 this.op3 = (agent.indexOf("opera") != -1);    //是否 Opera 3
 this.win = (agent.indexOf("win")!=-1);        //是否 Windows 版本
 this.mac = (agent.indexOf("mac")!=-1);        //是否 Macintosh 版本
 this.unix = (agent.indexOf("x11")!=-1);       //是否 Unix 版本
}

var is = new Is();

这个构造函数非常完整的搜集了浏览器的信息。我们看到它为对象定义了很多个属性:major, minor, ns, ie, win, mac 等等。它们的意思见上面的注释。把 is 变量定义为 Is() 对象后,用 if (is.ns) 这种格式就可以很方便的知道浏览器的信息了。我们也可以从这个构造函数中看到,它也可以使用一般的 JavaScript 语句(上例中为 var 语句)。

让我们再来看一个使用参数的构造函数:

function myFriend(theName, gender, theAge, birthOn, theJob) {
 this.name = theName;
 this.isMale = (gender.toLowerCase == 'male');
 this.age = theAge;
 this.birthday = new Date(birthOn);
 this.job = theJob
}

var Stephen = new myFriend('Stephen', 'Male', 18, 'Dec 22, 1982', 'Student');

从这个构造函数我们不但看到了参数的用法,还看到了不同的属性用不同的数据型是可以的(上例五个属性分别为:字符串,布尔值,数字,日期,字符串),还看到了构造函数里也可以用构造函数来“构造”属性。如果用了足够的“保护措施”来避免无限循环,更可以用构造函数自身来构造自己的属性。

使用框架和Cookies
使用框架
  在讲述 window 对象的时候,我们提到过,一个框架内的网页也是 window 对象,也就是说,Frame 对象也是 window 对象。用最容易理解的话说,每一个 HTML 文件占用一个 window 对象,包括定义框架的网页(“框架网页”)。在 IE 里用“<iframe>”标记在文档中插入的框架也是 window 对象,但是用“包含网页”的方法(在 HTML 中显示为“<!--webbot bot="include" ...-->”)读取的 HTML 就不占用独自的 window 对象。每一个框架都是包含它的页的 window 对象的一个子对象(不知道应该叫“属性”不该),要引用它,可以用以下几种方法之一:

window.frames[x]
window.frames['frameName']
window.frameName

  其中,x 指的是该 window 对象中指定的第几个框架,与其它数组一样,x 也是从零开始的。frameName 指的是该框架的名字,跟<frame>里的“name”属性一样。

  如果使用 window.frameName 指定的 window 对象又是一个框架网页,那么引用它的框架的方法:window.frameName.subFrameName。以此类推。

  要注意的时,无论在何处,引用“window”对象所返回的,都是“当前”window 对象。如果要访问其它 window 对象,就要用到 parent 和 top 属性。parent 指的是“父级”window 对象,也就是包含当前 window 对象的框架网页;top 指的是窗口最顶端的 window 对象。

  使用框架还要密切留意你的 JavaScript 中定义的全局变量和自定义函数。它们都有它们的所属——所在的 window 对象。要引用其它框架中的全局变量或自定义函数,都要用“窗口对象.框架对象[.框架对象…].全局变量或自定义函数”这种很烦的方法。

  以上这个问题在建立连接时经常会被忽略:如果在<head>中定义了一个默认目标窗口(<base target="...">),在<a href="javascript:...">中,要知道输入的 JavaScript 语句是在默认目标窗口中运行的,必要时加一些“parent”“top”属性。

使用 Cookies
  我们已经知道,在 document 对象中有一个 cookie 属性。但是 Cookie 又是什么?“某些 Web 站点在您的硬盘上用很小的文本文件存储了一些信息,这些文件就称为 Cookie。”—— MSIE 帮助。一般来说,Cookies 是 CGI 或类似,比 HTML 高级的文件、程序等创建的,但是 JavaScript 也提供了对 Cookies 的很全面的访问权利。

  在继续之前,我们先要学一学 Cookie 的基本知识。

  每个 Cookie 都是这样的:<cookie名>=<值>

  <cookie名>的限制与 JavaScript 的命名限制大同小异,少了“不能用 JavaScript 关键字”,多了“只能用可以用在 URL 编码中的字符”。后者比较难懂,但是只要你只用字母和数字命名,就完全没有问题了。<值>的要求也是“只能用可以用在 URL 编码中的字符”。

  每个 Cookie 都有失效日期,一旦电脑的时钟过了失效日期,这个 Cookie 就会被删掉。我们不能直接删掉一个 Cookie,但是可以用设定失效日期早于现在时刻的方法来间接删掉它。

  每个网页,或者说每个站点,都有它自己的 Cookies,这些 Cookies 只能由这个站点下的网页来访问,来自其他站点或同一站点下未经授权的区域的网页,是不能访问的。每一“组”Cookies 有规定的总大小(大约 2KB 每“组”),一超过最大总大小,则最早失效的 Cookie 先被删除,来让新的 Cookie“安家”。

  现在我们来学习使用 document.cookie 属性。

  如果直接使用 document.cookie 属性,或者说,用某种方法,例如给变量赋值,来获得 document.cookie 的值,我们就可以知道在现在的文档中有多少个 Cookies,每个 Cookies 的名字,和它的值。例如,在某文档中添加“document.write(document.cookie)”,结果显示:

name=kevin; email=kevin@kevin.com; lastvisited=index.html

这意味着,文档包含 3 个 Cookies:name, email 和 lastvisited,它们的值分别是 kevin, kevin@kevin.com 和 index.html。可以看到,两个 Cookies 之间是用分号和空格隔开的,于是我们可以用 cookieString.split('; ') 方法得到每个 Cookie 分开的一个数组(先用 var cookieString = document.cookie)。

  设定一个 Cookie 的方法是对 document.cookie 赋值。与其它情况下的赋值不同,向 document.cookie 赋值不会删除掉原有的 Cookies,而只会增添 Cookies 或更改原有 Cookie。赋值的格式:

document.cookie = 'cookieName=' + escape('cookieValue')
    + ';expires=' + expirationDateObj.toGMTString();

是不是看到头晕了呢?以上不是粗体字的地方是要照抄不误的,粗体字是要按实际情况做出改动的。cookieName 表示 Cookie 的名称,cookieValue 表示 Cookie 的值,expirationDateObj 表示储存着失效日期的日期对象名,如果不需要指定失效日期,则不需要第二行。不指定失效日期,则浏览器默认是在关闭浏览器(也就是关闭所有窗口)之后过期。

  看到了上面的一些下划线了么?这些是应该注意的地方。
  首先 escape() 方法:为什么一定要用?因为 Cookie 的值的要求是“只能用可以用在 URL 编码中的字符”。我们知道“escape()”方法是把字符串按 URL 编码方法来编码的,那我们只需要用一个“escape()”方法来处理输出到 Cookie 的值,用“unescape()”来处理从 Cookie 接收过来的值就万无一失了。而且这两个方法的最常用途就是处理 Cookies。其实设定一个 Cookie 只是“document.cookie = 'cookieName=cookieValue'”这么简单,但是为了避免在 cookieValue 中出现 URL 里不准出现的字符,还是用一个 escape() 好。
  然后“expires”前面的分号:注意到就行了。是分号而不是其他。
  最后 toGMTString() 方法:设定 Cookie 的时效日期都是用 GMT 格式的时间的,其它格式的时间是没有作用的。

  现在我们来实战一下。设定一个“name=rose”的 Cookie,在 3 个月后过期。

var expires = new Date();
expires.setTime(expires.getTime() + 3 * 30 * 24 * 60 * 60 * 1000);
/*   三个月 x 一个月当作 30 天 x 一天 24 小时
  x 一小时 60 分 x 一分 60 秒 x 一秒 1000 毫秒 */
document.cookie = 'name=rose;expires=' + expires.toGMTString();

为什么没有用 escape() 方法?这是因为我们知道 rose 是一个合法的 URL 编码字符串,也就是说,'rose' == escape('rose')。一般来说,如果设定 Cookie 时不用 escape(),那获取 Cookie 时也不用 unescape()。

  再来一次:编写一个函数,作用是查找指定 Cookie 的值。

function getCookie(cookieName) {
 var cookieString = document.cookie;
 var start = cookieString.indexOf(cookieName + '=');
 // 加上等号的原因是避免在某些 Cookie 的值里有
 // 与 cookieName 一样的字符串。
 if (start == -1) // 找不到
   return null;
 start += cookieName.length + 1;
 var end = cookieString.indexOf(';', start);
 if (end == -1) return unescape(cookieString.substring(start));
 return unescape(cookieString.substring(start, end));
}

这个函数用到了字符串对象的一些方法,如果你不记得了(你是不是这般没记性啊),请快去查查。这个函数所有的 if 语句都没有带上 else,这是因为如果条件成立,程序运行的都是 return 语句,在函数里碰上 return,就会终止运行,所以不加 else 也没问题。该函数在找到 Cookie 时,就会返回 Cookie 的值,否则返回“null”。

  现在我们要删除刚才设定的 name=rose Cookie。

var expires = new Date();
expires.setTime(expires.getTime() - 1);
document.cookie = 'name=rose;expires=' + expires.toGMTString();

可以看到,只需要把失效日期改成比现在日期早一点(这里是早 1 毫秒),再用同样的方法设定 Cookie,就可以删掉 Cookie 了。

ajax.js

/**
* ajax无刷新二级联动下拉菜单(省市联动)
*
* @author      arcow <arcow@126.com>
* @version     1.0
* @lastupdate  2005-12-29
*
*/

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;省市县关联菜单&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot;&gt;
&lt;style&gt;
body,select
{
font-size:9pt;
font-family:Verdana;
}
a
{
color:red;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
&lt;/style&gt;
&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;
&lt;!--
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == &quot;undefined&quot;) return false;
return true;
}

function change(v){
var str=&quot;0&quot;;
for(i=0;i&lt;v;i++){ str+=(&quot;_&quot;+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
&nbsp;length = 0;
&nbsp;options[0]=new Option(opt0[v],opt0[v]);
&nbsp;if(v &amp;&amp; document.getElementById(s[v-1]).selectedIndex&gt;0 &amp;#124;&amp;#124; !v)
&nbsp;{
&nbsp; if(dsy.Exists(str)){
&nbsp; &nbsp;ar = dsy.Items[str];
&nbsp; &nbsp;for(i=0;i&lt;ar.length;i++)options[length]=new Option(ar[i],ar[i]);
&nbsp; &nbsp;if(v)options[1].selected = true;
&nbsp; }
&nbsp;}
&nbsp;if(++v&lt;s.length){change(v);}
}
}

var dsy = new Dsy();

dsy.add(&quot;0&quot;,[&quot;北京&quot;,&quot;安徽&quot;,&quot;福建&quot;,&quot;甘肃&quot;,&quot;广东&quot;,&quot;广西&quot;,&quot;贵州&quot;,&quot;海南&quot;,&quot;河北&quot;,&quot;河南&quot;,&quot;黑龙江&quot;,&quot;湖北&quot;,&quot;湖南&quot;,&quot;吉林&quot;,&quot;江苏&quot;,&quot;江西&quot;,&quot;辽宁&quot;,&quot;内蒙古&quot;,&quot;宁夏&quot;,&quot;青海&quot;,&quot;山东&quot;,&quot;山西&quot;,&quot;陕西&quot;,&quot;上海&quot;,&quot;四川&quot;,&quot;天津&quot;,&quot;西藏&quot;,&quot;新疆&quot;,&quot;云南&quot;,&quot;浙江&quot;,&quot;重庆&quot;]);

dsy.add(&quot;0_0&quot;,[&quot;北京&quot;]);
dsy.add(&quot;0_0_0&quot;,[&quot;北京市&quot;,&quot;东城&quot;,&quot;西城&quot;,&quot;崇文&quot;,&quot;宣武&quot;,&quot;朝阳&quot;,&quot;丰台&quot;,&quot;石景山&quot;,&quot;海淀&quot;,&quot;门头沟&quot;,&quot;房山&quot;,&quot;通州&quot;,&quot;顺义&quot;,&quot;昌平&quot;,&quot;大兴&quot;,&quot;平谷&quot;,&quot;怀柔&quot;,&quot;密云&quot;,&quot;延庆&quot;]);

dsy.add(&quot;0_1&quot;,[&quot;安庆&quot;,&quot;蚌埠&quot;,&quot;巢湖&quot;,&quot;池州&quot;,&quot;滁州&quot;,&quot;阜阳&quot;,&quot;合肥&quot;,&quot;淮北&quot;,&quot;淮南&quot;,&quot;黄山&quot;,&quot;六安&quot;,&quot;马鞍山&quot;,&quot;宿州&quot;,&quot;铜陵&quot;,&quot;芜湖&quot;,&quot;宣城&quot;,&quot;亳州&quot;]);
dsy.add(&quot;0_1_0&quot;,[&quot;安庆市&quot;,&quot;怀宁县&quot;,&quot;潜山县&quot;,&quot;宿松县&quot;,&quot;太湖县&quot;,&quot;桐城市&quot;,&quot;望江县&quot;,&quot;岳西县&quot;,&quot;枞阳县&quot;]);
dsy.add(&quot;0_1_1&quot;,[&quot;蚌埠市&quot;,&quot;固镇县&quot;,&quot;怀远县&quot;,&quot;五河县&quot;]);
dsy.add(&quot;0_1_2&quot;,[&quot;巢湖市&quot;,&quot;含山县&quot;,&quot;和县&quot;,&quot;庐江县&quot;,&quot;无为县&quot;]);
dsy.add(&quot;0_1_3&quot;,[&quot;池州市&quot;,&quot;东至县&quot;,&quot;青阳县&quot;,&quot;石台县&quot;]);
dsy.add(&quot;0_1_4&quot;,[&quot;滁州市&quot;,&quot;定远县&quot;,&quot;凤阳县&quot;,&quot;来安县&quot;,&quot;明光市&quot;,&quot;全椒县&quot;,&quot;天长市&quot;]);
dsy.add(&quot;0_1_5&quot;,[&quot;阜南县&quot;,&quot;阜阳市&quot;,&quot;界首市&quot;,&quot;临泉县&quot;,&quot;太和县&quot;,&quot;颖上县&quot;]);
dsy.add(&quot;0_1_6&quot;,[&quot;长丰县&quot;,&quot;肥东县&quot;,&quot;肥西县&quot;]);
dsy.add(&quot;0_1_7&quot;,[&quot;淮北市&quot;,&quot;濉溪县&quot;]);
dsy.add(&quot;0_1_8&quot;,[&quot;凤台县&quot;,&quot;淮南市&quot;]);
dsy.add(&quot;0_1_9&quot;,[&quot;黄山市&quot;,&quot;祁门县&quot;,&quot;休宁县&quot;,&quot;歙县&quot;,&quot;黟县&quot;]);
dsy.add(&quot;0_1_10&quot;,[&quot;霍邱县&quot;,&quot;霍山县&quot;,&quot;金寨县&quot;,&quot;六安市&quot;,&quot;寿县&quot;,&quot;舒城县&quot;]);
dsy.add(&quot;0_1_11&quot;,[&quot;当涂县&quot;,&quot;马鞍山市&quot;]);
dsy.add(&quot;0_1_12&quot;,[&quot;灵璧县&quot;,&quot;宿州市&quot;,&quot;萧县&quot;,&quot;泗县&quot;,&quot;砀山县&quot;]);
dsy.add(&quot;0_1_13&quot;,[&quot;铜陵市&quot;,&quot;铜陵县&quot;]);
dsy.add(&quot;0_1_14&quot;,[&quot;繁昌县&quot;,&quot;南陵县&quot;,&quot;芜湖市&quot;,&quot;芜湖县&quot;]);
dsy.add(&quot;0_1_15&quot;,[&quot;广德县&quot;,&quot;绩溪县&quot;,&quot;郎溪县&quot;,&quot;宁国市&quot;,&quot;宣城市&quot;,&quot;泾县&quot;,&quot;旌德县&quot;]);
dsy.add(&quot;0_1_16&quot;,[&quot;利辛县&quot;,&quot;蒙城县&quot;,&quot;涡阳县&quot;,&quot;亳州市&quot;]);

dsy.add(&quot;0_2&quot;,[&quot;福州&quot;,&quot;龙岩&quot;,&quot;南平&quot;,&quot;宁德&quot;,&quot;莆田&quot;,&quot;泉州&quot;,&quot;三明&quot;,&quot;厦门&quot;,&quot;漳州&quot;]);
dsy.add(&quot;0_2_0&quot;,[&quot;长乐市&quot;,&quot;福清市&quot;,&quot;福州市&quot;,&quot;连江县&quot;,&quot;罗源县&quot;,&quot;闽侯县&quot;,&quot;闽清县&quot;,&quot;平潭县&quot;,&quot;永泰县&quot;]);
dsy.add(&quot;0_2_1&quot;,[&quot;长汀县&quot;,&quot;连城县&quot;,&quot;龙岩市&quot;,&quot;上杭县&quot;,&quot;武平县&quot;,&quot;永定县&quot;,&quot;漳平市&quot;]);
dsy.add(&quot;0_2_2&quot;,[&quot;光泽县&quot;,&quot;建阳市&quot;,&quot;建瓯市&quot;,&quot;南平市&quot;,&quot;浦城县&quot;,&quot;邵武市&quot;,&quot;顺昌县&quot;,&quot;松溪县&quot;,&quot;武夷山市&quot;,&quot;政和县&quot;]);
dsy.add(&quot;0_2_3&quot;,[&quot;福安市&quot;,&quot;福鼎市&quot;,&quot;古田县&quot;,&quot;宁德市&quot;,&quot;屏南县&quot;,&quot;寿宁县&quot;,&quot;霞浦县&quot;,&quot;周宁县&quot;,&quot;柘荣县&quot;]);
dsy.add(&quot;0_2_4&quot;,[&quot;莆田市&quot;,&quot;仙游县&quot;]);
dsy.add(&quot;0_2_5&quot;,[&quot;安溪县&quot;,&quot;德化县&quot;,&quot;惠安县&quot;,&quot;金门县&quot;,&quot;晋江市&quot;,&quot;南安市&quot;,&quot;泉州市&quot;,&quot;石狮市&quot;,&quot;永春县&quot;]);
dsy.add(&quot;0_2_6&quot;,[&quot;大田县&quot;,&quot;建宁县&quot;,&quot;将乐县&quot;,&quot;明溪县&quot;,&quot;宁化县&quot;,&quot;清流县&quot;,&quot;三明市&quot;,&quot;沙县&quot;,&quot;泰宁县&quot;,&quot;永安市&quot;,&quot;尤溪县&quot;]);
dsy.add(&quot;0_2_7&quot;,[&quot;厦门市&quot;]);
dsy.add(&quot;0_2_8&quot;,[&quot;长泰县&quot;,&quot;东山县&quot;,&quot;华安县&quot;,&quot;龙海市&quot;,&quot;南靖县&quot;,&quot;平和县&quot;,&quot;云霄县&quot;,&quot;漳浦县&quot;,&quot;漳州市&quot;,&quot;诏安县&quot;]);

dsy.add(&quot;0_3&quot;,[&quot;白银&quot;,&quot;定西&quot;,&quot;甘南藏族自治州&quot;,&quot;嘉峪关&quot;,&quot;金昌&quot;,&quot;酒泉&quot;,&quot;兰州&quot;,&quot;临夏回族自治州&quot;,&quot;陇南&quot;,&quot;平凉&quot;,&quot;庆阳&quot;,&quot;天水&quot;,&quot;武威&quot;,&quot;张掖&quot;]);
dsy.add(&quot;0_3_0&quot;,[&quot;白银市&quot;,&quot;会宁县&quot;,&quot;景泰县&quot;,&quot;靖远县&quot;]);
dsy.add(&quot;0_3_1&quot;,[&quot;定西县&quot;,&quot;临洮县&quot;,&quot;陇西县&quot;,&quot;通渭县&quot;,&quot;渭源县&quot;,&quot;漳县&quot;,&quot;岷县&quot;]);
dsy.add(&quot;0_3_2&quot;,[&quot;迭部县&quot;,&quot;合作市&quot;,&quot;临潭县&quot;,&quot;碌曲县&quot;,&quot;玛曲县&quot;,&quot;夏河县&quot;,&quot;舟曲县&quot;,&quot;卓尼县&quot;]);
dsy.add(&quot;0_3_3&quot;,[&quot;嘉峪关市&quot;]);
dsy.add(&quot;0_3_4&quot;,[&quot;金昌市&quot;,&quot;永昌县&quot;]);
dsy.add(&quot;0_3_5&quot;,[&quot;阿克塞哈萨克族自治县&quot;,&quot;安西县&quot;,&quot;敦煌市&quot;,&quot;金塔县&quot;,&quot;酒泉市&quot;,&quot;肃北蒙古族自治县&quot;,&quot;玉门市&quot;]);
dsy.add(&quot;0_3_6&quot;,[&quot;皋兰县&quot;,&quot;兰州市&quot;,&quot;永登县&quot;,&quot;榆中县&quot;]);
dsy.add(&quot;0_3_7&quot;,[&quot;东乡族自治县&quot;,&quot;广河县&quot;,&quot;和政县&quot;,&quot;积石山保安族东乡族撒拉族自治县&quot;,&quot;康乐县&quot;,&quot;临夏市&quot;,&quot;临夏县&quot;,&quot;永靖县&quot;]);
dsy.add(&quot;0_3_8&quot;,[&quot;成县&quot;,&quot;徽县&quot;,&quot;康县&quot;,&quot;礼县&quot;,&quot;两当县&quot;,&quot;文县&quot;,&quot;武都县&quot;,&quot;西和县&quot;,&quot;宕昌县&quot;]);
dsy.add(&quot;0_3_9&quot;,[&quot;崇信县&quot;,&quot;华亭县&quot;,&quot;静宁县&quot;,&quot;灵台县&quot;,&quot;平凉市&quot;,&quot;庄浪县&quot;,&quot;泾川县&quot;]);
dsy.add(&quot;0_3_10&quot;,[&quot;合水县&quot;,&quot;华池县&quot;,&quot;环县&quot;,&quot;宁县&quot;,&quot;庆城县&quot;,&quot;庆阳市&quot;,&quot;镇原县&quot;,&quot;正宁县&quot;]);
dsy.add(&quot;0_3_11&quot;,[&quot;甘谷县&quot;,&quot;秦安县&quot;,&quot;清水县&quot;,&quot;天水市&quot;,&quot;武山县&quot;,&quot;张家川回族自治县&quot;]);
dsy.add(&quot;0_3_12&quot;,[&quot;古浪县&quot;,&quot;民勤县&quot;,&quot;天祝藏族自治县&quot;,&quot;武威市&quot;]);
dsy.add(&quot;0_3_13&quot;,[&quot;高台县&quot;,&quot;临泽县&quot;,&quot;民乐县&quot;,&quot;山丹县&quot;,&quot;肃南裕固族自治县&quot;,&quot;张掖市&quot;]);

dsy.add(&quot;0_4&quot;,[&quot;潮州&quot;,&quot;东莞&quot;,&quot;佛山&quot;,&quot;广州&quot;,&quot;河源&quot;,&quot;惠州&quot;,&quot;江门&quot;,&quot;揭阳&quot;,&quot;茂名&quot;,&quot;梅州&quot;,&quot;清远&quot;,&quot;汕头&quot;,&quot;汕尾&quot;,&quot;韶关&quot;,&quot;深圳&quot;,&quot;阳江&quot;,&quot;云浮&quot;,&quot;湛江&quot;,&quot;肇庆&quot;,&quot;中山&quot;,&quot;珠海&quot;]);
dsy.add(&quot;0_4_0&quot;,[&quot;潮安县&quot;,&quot;潮州市&quot;,&quot;饶平县&quot;]);
dsy.add(&quot;0_4_1&quot;,[&quot;东莞市&quot;]);
dsy.add(&quot;0_4_2&quot;,[&quot;佛山市&quot;]);
dsy.add(&quot;0_4_3&quot;,[&quot;从化市&quot;,&quot;广州市&quot;,&quot;增城市&quot;]);
dsy.add(&quot;0_4_4&quot;,[&quot;东源县&quot;,&quot;和平县&quot;,&quot;河源市&quot;,&quot;连平县&quot;,&quot;龙川县&quot;,&quot;紫金县&quot;]);
dsy.add(&quot;0_4_5&quot;,[&quot;博罗县&quot;,&quot;惠东县&quot;,&quot;惠阳市&quot;,&quot;惠州市&quot;,&quot;龙门县&quot;]);
dsy.add(&quot;0_4_6&quot;,[&quot;恩平市&quot;,&quot;鹤山市&quot;,&quot;江门市&quot;,&quot;开平市&quot;,&quot;台山市&quot;]);
dsy.add(&quot;0_4_7&quot;,[&quot;惠来县&quot;,&quot;揭东县&quot;,&quot;揭西县&quot;,&quot;揭阳市&quot;,&quot;普宁市&quot;]);
dsy.add(&quot;0_4_8&quot;,[&quot;电白县&quot;,&quot;高州市&quot;,&quot;化州市&quot;,&quot;茂名市&quot;,&quot;信宜市&quot;]);
dsy.add(&quot;0_4_9&quot;,[&quot;大埔县&quot;,&quot;丰顺县&quot;,&quot;蕉岭县&quot;,&quot;梅县&quot;,&quot;梅州市&quot;,&quot;平远县&quot;,&quot;五华县&quot;,&quot;兴宁市&quot;]);
dsy.add(&quot;0_4_10&quot;,[&quot;佛冈县&quot;,&quot;连南瑶族自治县&quot;,&quot;连山壮族瑶族自治县&quot;,&quot;连州市&quot;,&quot;清新县&quot;,&quot;清远市&quot;,&quot;阳山县&quot;,&quot;英德市&quot;]);
dsy.add(&quot;0_4_11&quot;,[&quot;潮阳市&quot;,&quot;澄海市&quot;,&quot;南澳县&quot;,&quot;汕头市&quot;]);
dsy.add(&quot;0_4_12&quot;,[&quot;海丰县&quot;,&quot;陆丰市&quot;,&quot;陆河县&quot;,&quot;汕尾市&quot;]);
dsy.add(&quot;0_4_13&quot;,[&quot;乐昌市&quot;,&quot;南雄市&quot;,&quot;曲江县&quot;,&quot;仁化县&quot;,&quot;乳源瑶族自治县&quot;,&quot;韶关市&quot;,&quot;始兴县&quot;,&quot;翁源县&quot;,&quot;新丰县&quot;]);
dsy.add(&quot;0_4_14&quot;,[&quot;深圳市&quot;]);
dsy.add(&quot;0_4_15&quot;,[&quot;阳春市&quot;,&quot;阳东县&quot;,&quot;阳江市&quot;,&quot;阳西县&quot;]);
dsy.add(&quot;0_4_16&quot;,[&quot;罗定市&quot;,&quot;新兴县&quot;,&quot;郁南县&quot;,&quot;云安县&quot;,&quot;云浮市&quot;]);
dsy.add(&quot;0_4_17&quot;,[&quot;雷州市&quot;,&quot;廉江市&quot;,&quot;遂溪县&quot;,&quot;吴川市&quot;,&quot;徐闻县&quot;,&quot;湛江市&quot;]);
dsy.add(&quot;0_4_18&quot;,[&quot;德庆县&quot;,&quot;封开县&quot;,&quot;高要市&quot;,&quot;广宁县&quot;,&quot;怀集县&quot;,&quot;四会市&quot;,&quot;肇庆市&quot;]);
dsy.add(&quot;0_4_19&quot;,[&quot;中山市&quot;]);
dsy.add(&quot;0_4_20&quot;,[&quot;珠海市&quot;]);

dsy.add(&quot;0_5&quot;,[&quot;百色&quot;,&quot;北海&quot;,&quot;崇左&quot;,&quot;防城港&quot;,&quot;桂林&quot;,&quot;贵港&quot;,&quot;河池&quot;,&quot;贺州&quot;,&quot;来宾&quot;,&quot;柳州&quot;,&quot;南宁&quot;,&quot;钦州&quot;,&quot;梧州&quot;,&quot;玉林&quot;]);
dsy.add(&quot;0_5_0&quot;,[&quot;百色市&quot;,&quot;德保县&quot;,&quot;靖西县&quot;,&quot;乐业县&quot;,&quot;凌云县&quot;,&quot;隆林各族自治县&quot;,&quot;那坡县&quot;,&quot;平果县&quot;,&quot;田东县&quot;,&quot;田林县&quot;,&quot;田阳县&quot;,&quot;西林县&quot;]);
dsy.add(&quot;0_5_1&quot;,[&quot;北海市&quot;,&quot;合浦县&quot;]);
dsy.add(&quot;0_5_2&quot;,[&quot;崇左市&quot;,&quot;大新县&quot;,&quot;扶绥县&quot;,&quot;龙州县&quot;,&quot;宁明县&quot;,&quot;凭祥市&quot;,&quot;天等县&quot;]);
dsy.add(&quot;0_5_3&quot;,[&quot;东兴市&quot;,&quot;防城港市&quot;,&quot;上思县&quot;]);
dsy.add(&quot;0_5_4&quot;,[&quot;恭城瑶族自治县&quot;,&quot;灌阳县&quot;,&quot;桂林市&quot;,&quot;荔浦县&quot;,&quot;临桂县&quot;,&quot;灵川县&quot;,&quot;龙胜各族自治县&quot;,&quot;平乐县&quot;,&quot;全州县&quot;,&quot;兴安县&quot;,&quot;阳朔县&quot;,&quot;永福县&quot;,&quot;资源县&quot;]);
dsy.add(&quot;0_5_5&quot;,[&quot;桂平市&quot;,&quot;贵港市&quot;,&quot;平南县&quot;]);
dsy.add(&quot;0_5_6&quot;,[&quot;巴马瑶族自治县&quot;,&quot;大化瑶族自治县&quot;,&quot;东兰县&quot;,&quot;都安瑶族自治县&quot;,&quot;凤山县&quot;,&quot;河池市&quot;,&quot;环江毛南族自治县&quot;,&quot;罗城仡佬族自治县&quot;,&quot;南丹县&quot;,&quot;天峨县&quot;,&quot;宜州市&quot;]);
dsy.add(&quot;0_5_7&quot;,[&quot;富川瑶族自治县&quot;,&quot;贺州市&quot;,&quot;昭平县&quot;,&quot;钟山县&quot;]);
dsy.add(&quot;0_5_8&quot;,[&quot;合山市&quot;,&quot;金秀瑶族自治县&quot;,&quot;来宾市&quot;,&quot;武宣县&quot;,&quot;象州县&quot;,&quot;忻城县&quot;]);
dsy.add(&quot;0_5_9&quot;,[&quot;柳城县&quot;,&quot;柳江县&quot;,&quot;柳州市&quot;,&quot;鹿寨县&quot;,&quot;融安县&quot;,&quot;融水苗族自治县&quot;,&quot;三江侗族自治县&quot;]);
dsy.add(&quot;0_5_10&quot;,[&quot;宾阳县&quot;,&quot;横县&quot;,&quot;隆安县&quot;,&quot;马山县&quot;,&quot;南宁市&quot;,&quot;上林县&quot;,&quot;武鸣县&quot;,&quot;邕宁县&quot;]);
dsy.add(&quot;0_5_11&quot;,[&quot;灵山县&quot;,&quot;浦北县&quot;,&quot;钦州市&quot;]);
dsy.add(&quot;0_5_12&quot;,[&quot;苍梧县&quot;,&quot;蒙山县&quot;,&quot;藤县&quot;,&quot;梧州市&quot;,&quot;岑溪市&quot;]);
dsy.add(&quot;0_5_13&quot;,[&quot;北流市&quot;,&quot;博白县&quot;,&quot;陆川县&quot;,&quot;容县&quot;,&quot;兴业县&quot;,&quot;玉林市&quot;]);
dsy.add(&quot;0_6&quot;,[&quot;安顺&quot;,&quot;毕节&quot;,&quot;贵阳&quot;,&quot;六盘水&quot;,&quot;黔东南苗族侗族自治州&quot;,&quot;黔南布依族苗族自治州&quot;,&quot;黔西南布依族苗族自治州&quot;,&quot;铜仁&quot;,&quot;遵义&quot;]);
dsy.add(&quot;0_6_0&quot;,[&quot;安顺市&quot;,&quot;关岭布依族苗族自治县&quot;,&quot;平坝县&quot;,&quot;普定县&quot;,&quot;镇宁布依族苗族自治县&quot;,&quot;紫云苗族布依族自治县&quot;]);
dsy.add(&quot;0_6_1&quot;,[&quot;毕节市&quot;,&quot;大方县&quot;,&quot;赫章县&quot;,&quot;金沙县&quot;,&quot;纳雍县&quot;,&quot;黔西县&quot;,&quot;威宁彝族回族苗族自治县&quot;,&quot;织金县&quot;]);
dsy.add(&quot;0_6_2&quot;,[&quot;贵阳市&quot;,&quot;开阳县&quot;,&quot;清镇市&quot;,&quot;息烽县&quot;,&quot;修文县&quot;]);
dsy.add(&quot;0_6_3&quot;,[&quot;六盘水市&quot;,&quot;六枝特区&quot;,&quot;盘县&quot;,&quot;水城县&quot;]);
dsy.add(&quot;0_6_4&quot;,[&quot;从江县&quot;,&quot;丹寨县&quot;,&quot;黄平县&quot;,&quot;剑河县&quot;,&quot;锦屏县&quot;,&quot;凯里市&quot;,&quot;雷山县&quot;,&quot;黎平县&quot;,&quot;麻江县&quot;,&quot;三穗县&quot;,&quot;施秉县&quot;,&quot;台江县&quot;,&quot;天柱县&quot;,&quot;镇远县&quot;,&quot;岑巩县&quot;,&quot;榕江县&quot;]);
dsy.add(&quot;0_6_5&quot;,[&quot;长顺县&quot;,&quot;都匀市&quot;,&quot;独山县&quot;,&quot;福泉市&quot;,&quot;贵定县&quot;,&quot;惠水县&quot;,&quot;荔波县&quot;,&quot;龙里县&quot;,&quot;罗甸县&quot;,&quot;平塘县&quot;,&quot;三都水族自治县&quot;,&quot;瓮安县&quot;]);
dsy.add(&quot;0_6_6&quot;,[&quot;安龙县&quot;,&quot;册亨县&quot;,&quot;普安县&quot;,&quot;晴隆县&quot;,&quot;望谟县&quot;,&quot;兴仁县&quot;,&quot;兴义市&quot;,&quot;贞丰县&quot;]);
dsy.add(&quot;0_6_7&quot;,[&quot;德江县&quot;,&quot;江口县&quot;,&quot;石阡县&quot;,&quot;思南县&quot;,&quot;松桃苗族自治县&quot;,&quot;铜仁市&quot;,&quot;万山特区&quot;,&quot;沿河土家族自治县&quot;,&quot;印江土家族苗族自治县&quot;,&quot;玉屏侗族自治县&quot;]);
dsy.add(&quot;0_6_8&quot;,[&quot;赤水市&quot;,&quot;道真仡佬族苗族自治县&quot;,&quot;凤冈县&quot;,&quot;仁怀市&quot;,&quot;绥阳县&quot;,&quot;桐梓县&quot;,&quot;务川仡佬族苗族自治县&quot;,&quot;习水县&quot;,&quot;余庆县&quot;,&quot;正安县&quot;,&quot;遵义市&quot;,&quot;遵义县&quot;,&quot;湄潭县&quot;]);

dsy.add(&quot;0_7&quot;,[&quot;白沙黎族自治县&quot;,&quot;保亭黎族苗族自治县&quot;,&quot;昌江黎族自治县&quot;,&quot;澄迈县&quot;,&quot;定安县&quot;,&quot;东方&quot;,&quot;海口&quot;,&quot;乐东黎族自治县&quot;,&quot;临高县&quot;,&quot;陵水黎族自治县&quot;,&quot;琼海&quot;,&quot;琼中黎族苗族自治县&quot;,&quot;三亚&quot;,&quot;屯昌县&quot;,&quot;万宁&quot;,&quot;文昌&quot;,&quot;五指山&quot;,&quot;儋州&quot;]);
dsy.add(&quot;0_7_0&quot;,[&quot;白沙黎族自治县&quot;]);
dsy.add(&quot;0_7_1&quot;,[&quot;保亭黎族苗族自治县&quot;]);
dsy.add(&quot;0_7_2&quot;,[&quot;昌江黎族自治县&quot;]);
dsy.add(&quot;0_7_3&quot;,[&quot;澄迈县&quot;]);
dsy.add(&quot;0_7_4&quot;,[&quot;定安县&quot;]);
dsy.add(&quot;0_7_5&quot;,[&quot;东方市&quot;]);
dsy.add(&quot;0_7_6&quot;,[&quot;海口市&quot;]);
dsy.add(&quot;0_7_7&quot;,[&quot;乐东黎族自治县&quot;]);
dsy.add(&quot;0_7_8&quot;,[&quot;临高县&quot;]);
dsy.add(&quot;0_7_9&quot;,[&quot;陵水黎族自治县&quot;]);
dsy.add(&quot;0_7_10&quot;,[&quot;琼海市&quot;]);
dsy.add(&quot;0_7_11&quot;,[&quot;琼中黎族苗族自治县&quot;]);
dsy.add(&quot;0_7_12&quot;,[&quot;三亚市&quot;]);
dsy.add(&quot;0_7_13&quot;,[&quot;屯昌县&quot;]);
dsy.add(&quot;0_7_14&quot;,[&quot;万宁市&quot;]);
dsy.add(&quot;0_7_15&quot;,[&quot;文昌市&quot;]);
dsy.add(&quot;0_7_16&quot;,[&quot;五指山市&quot;]);
dsy.add(&quot;0_7_17&quot;,[&quot;儋州市&quot;]);

dsy.add(&quot;0_8&quot;,[&quot;保定&quot;,&quot;沧州&quot;,&quot;承德&quot;,&quot;邯郸&quot;,&quot;衡水&quot;,&quot;廊坊&quot;,&quot;秦皇岛&quot;,&quot;石家庄&quot;,&quot;唐山&quot;,&quot;邢台&quot;,&quot;张家口&quot;]);
dsy.add(&quot;0_8_0&quot;,[&quot;安国市&quot;,&quot;安新县&quot;,&quot;保定市&quot;,&quot;博野县&quot;,&quot;定兴县&quot;,&quot;定州市&quot;,&quot;阜平县&quot;,&quot;高碑店市&quot;,&quot;高阳县&quot;,&quot;满城县&quot;,&quot;清苑县&quot;,&quot;曲阳县&quot;,&quot;容城县&quot;,&quot;顺平县&quot;,&quot;唐县&quot;,&quot;望都县&quot;,&quot;雄县&quot;,&quot;徐水县&quot;,&quot;易县&quot;,&quot;涞水县&quot;,&quot;涞源县&quot;,&quot;涿州市&quot;,&quot;蠡县&quot;]);
dsy.add(&quot;0_8_1&quot;,[&quot;泊头市&quot;,&quot;沧县&quot;,&quot;沧州市&quot;,&quot;东光县&quot;,&quot;海兴县&quot;,&quot;河间市&quot;,&quot;黄骅市&quot;,&quot;孟村回族自治县&quot;,&quot;南皮县&quot;,&quot;青县&quot;,&quot;任丘市&quot;,&quot;肃宁县&quot;,&quot;吴桥县&quot;,&quot;献县&quot;,&quot;盐山县&quot;]);
dsy.add(&quot;0_8_2&quot;,[&quot;承德市&quot;,&quot;承德县&quot;,&quot;丰宁满族自治县&quot;,&quot;宽城满族自治县&quot;,&quot;隆化县&quot;,&quot;滦平县&quot;,&quot;平泉县&quot;,&quot;围场满族蒙古族自治县&quot;,&quot;兴隆县&quot;]);
dsy.add(&quot;0_8_3&quot;,[&quot;成安县&quot;,&quot;磁县&quot;,&quot;大名县&quot;,&quot;肥乡县&quot;,&quot;馆陶县&quot;,&quot;广平县&quot;,&quot;邯郸市&quot;,&quot;邯郸县&quot;,&quot;鸡泽县&quot;,&quot;临漳县&quot;,&quot;邱县&quot;,&quot;曲周县&quot;,&quot;涉县&quot;,&quot;魏县&quot;,&quot;武安市&quot;,&quot;永年县&quot;]);
dsy.add(&quot;0_8_4&quot;,[&quot;安平县&quot;,&quot;阜城县&quot;,&quot;故城县&quot;,&quot;衡水市&quot;,&quot;冀州市&quot;,&quot;景县&quot;,&quot;饶阳县&quot;,&quot;深州市&quot;,&quot;武强县&quot;,&quot;武邑县&quot;,&quot;枣强县&quot;]);
dsy.add(&quot;0_8_5&quot;,[&quot;霸州市&quot;,&quot;大厂回族自治县&quot;,&quot;大城县&quot;,&quot;固安县&quot;,&quot;廊坊市&quot;,&quot;三河市&quot;,&quot;文安县&quot;,&quot;香河县&quot;,&quot;永清县&quot;]);
dsy.add(&quot;0_8_6&quot;,[&quot;昌黎县&quot;,&quot;抚宁县&quot;,&quot;卢龙县&quot;,&quot;秦皇岛市&quot;,&quot;青龙满族自治县&quot;]);
dsy.add(&quot;0_8_7&quot;,[&quot;高邑县&quot;,&quot;晋州市&quot;,&quot;井陉县&quot;,&quot;灵寿县&quot;,&quot;鹿泉市&quot;,&quot;平山县&quot;,&quot;深泽县&quot;,&quot;石家庄市&quot;,&quot;无极县&quot;,&quot;辛集市&quot;,&quot;新乐市&quot;,&quot;行唐县&quot;,&quot;元氏县&quot;,&quot;赞皇县&quot;,&quot;赵县&quot;,&quot;正定县&quot;,&quot;藁城市&quot;,&quot;栾城县&quot;]);
dsy.add(&quot;0_8_8&quot;,[&quot;乐亭县&quot;,&quot;滦南县&quot;,&quot;滦县&quot;,&quot;迁安市&quot;,&quot;迁西县&quot;,&quot;唐海县&quot;,&quot;唐山市&quot;,&quot;玉田县&quot;,&quot;遵化市&quot;]);
dsy.add(&quot;0_8_9&quot;,[&quot;柏乡县&quot;,&quot;广宗县&quot;,&quot;巨鹿县&quot;,&quot;临城县&quot;,&quot;临西县&quot;,&quot;隆尧县&quot;,&quot;南宫市&quot;,&quot;南和县&quot;,&quot;内丘县&quot;,&quot;宁晋县&quot;,&quot;平乡县&quot;,&quot;清河县&quot;,&quot;任县&quot;,&quot;沙河市&quot;,&quot;威县&quot;,&quot;新河县&quot;,&quot;邢台市&quot;,&quot;邢台县&quot;]);
dsy.add(&quot;0_8_10&quot;,[&quot;赤城县&quot;,&quot;崇礼县&quot;,&quot;沽源县&quot;,&quot;怀安县&quot;,&quot;怀来县&quot;,&quot;康保县&quot;,&quot;尚义县&quot;,&quot;万全县&quot;,&quot;蔚县&quot;,&quot;宣化县&quot;,&quot;阳原县&quot;,&quot;张北县&quot;,&quot;张家口市&quot;,&quot;涿鹿县&quot;]);


dsy.add(&quot;0_9&quot;,[&quot;安阳&quot;,&quot;鹤壁&quot;,&quot;济源&quot;,&quot;焦作&quot;,&quot;开封&quot;,&quot;洛阳&quot;,&quot;南阳&quot;,&quot;平顶山&quot;,&quot;三门峡&quot;,&quot;商丘&quot;,&quot;新乡&quot;,&quot;信阳&quot;,&quot;许昌&quot;,&quot;郑州&quot;,&quot;周口&quot;,&quot;驻马店&quot;,&quot;漯河&quot;,&quot;濮阳&quot;]);
dsy.add(&quot;0_9_0&quot;,[&quot;安阳市&quot;,&quot;安阳县&quot;,&quot;滑县&quot;,&quot;林州市&quot;,&quot;内黄县&quot;,&quot;汤阴县&quot;]);
dsy.add(&quot;0_9_1&quot;,[&quot;&quot;,&quot;鹤壁市&quot;,&quot;浚县&quot;,&quot;淇县&quot;]);
dsy.add(&quot;0_9_2&quot;,[&quot;济源市&quot;]);
dsy.add(&quot;0_9_3&quot;,[&quot;博爱县&quot;,&quot;焦作市&quot;,&quot;孟州市&quot;,&quot;沁阳市&quot;,&quot;温县&quot;,&quot;武陟县&quot;,&quot;修武县&quot;]);
dsy.add(&quot;0_9_4&quot;,[&quot;开封市&quot;,&quot;开封县&quot;,&quot;兰考县&quot;,&quot;通许县&quot;,&quot;尉氏县&quot;,&quot;杞县&quot;]);
dsy.add(&quot;0_9_5&quot;,[&quot;洛宁县&quot;,&quot;洛阳市&quot;,&quot;孟津县&quot;,&quot;汝阳县&quot;,&quot;新安县&quot;,&quot;伊川县&quot;,&quot;宜阳县&quot;,&quot;偃师市&quot;,&quot;嵩县&quot;,&quot;栾川县&quot;]);
dsy.add(&quot;0_9_6&quot;,[&quot;邓州市&quot;,&quot;方城县&quot;,&quot;南阳市&quot;,&quot;南召县&quot;,&quot;内乡县&quot;,&quot;社旗县&quot;,&quot;唐河县&quot;,&quot;桐柏县&quot;,&quot;西峡县&quot;,&quot;新野县&quot;,&quot;镇平县&quot;,&quot;淅川县&quot;]);
dsy.add(&quot;0_9_7&quot;,[&quot;宝丰县&quot;,&quot;鲁山县&quot;,&quot;平顶山市&quot;,&quot;汝州市&quot;,&quot;舞钢市&quot;,&quot;叶县&quot;,&quot;郏县&quot;]);
dsy.add(&quot;0_9_8&quot;,[&quot;灵宝市&quot;,&quot;卢氏县&quot;,&quot;三门峡市&quot;,&quot;陕县&quot;,&quot;义马市&quot;,&quot;渑池县&quot;]);
dsy.add(&quot;0_9_9&quot;,[&quot;民权县&quot;,&quot;宁陵县&quot;,&quot;商丘市&quot;,&quot;夏邑县&quot;,&quot;永城市&quot;,&quot;虞城县&quot;,&quot;柘城县&quot;,&quot;睢县&quot;]);
dsy.add(&quot;0_9_10&quot;,[&quot;长垣县&quot;,&quot;封丘县&quot;,&quot;辉县市&quot;,&quot;获嘉县&quot;,&quot;卫辉市&quot;,&quot;新乡市&quot;,&quot;新乡县&quot;,&quot;延津县&quot;,&quot;原阳县&quot;]);
dsy.add(&quot;0_9_11&quot;,[&quot;固始县&quot;,&quot;光山县&quot;,&quot;淮滨县&quot;,&quot;罗山县&quot;,&quot;商城县&quot;,&quot;息县&quot;,&quot;新县&quot;,&quot;信阳市&quot;,&quot;潢川县&quot;]);
dsy.add(&quot;0_9_12&quot;,[&quot;长葛市&quot;,&quot;襄城县&quot;,&quot;许昌市&quot;,&quot;许昌县&quot;,&quot;禹州市&quot;,&quot;鄢陵县&quot;]);
dsy.add(&quot;0_9_13&quot;,[&quot;登封市&quot;,&quot;巩义市&quot;,&quot;新密市&quot;,&quot;新郑市&quot;,&quot;郑州市&quot;,&quot;中牟县&quot;,&quot;荥阳市&quot;]);
dsy.add(&quot;0_9_14&quot;,[&quot;郸城县&quot;,&quot;扶沟县&quot;,&quot;淮阳县&quot;,&quot;鹿邑县&quot;,&quot;商水县&quot;,&quot;沈丘县&quot;,&quot;太康县&quot;,&quot;西华县&quot;,&quot;项城市&quot;,&quot;周口市&quot;]);
dsy.add(&quot;0_9_15&quot;,[&quot;泌阳县&quot;,&quot;平舆县&quot;,&quot;确山县&quot;,&quot;汝南县&quot;,&quot;上蔡县&quot;,&quot;遂平县&quot;,&quot;西平县&quot;,&quot;新蔡县&quot;,&quot;正阳县&quot;,&quot;驻马店市&quot;]);
dsy.add(&quot;0_9_16&quot;,[&quot;临颍县&quot;,&quot;舞阳县&quot;,&quot;郾城县&quot;,&quot;漯河市&quot;]);
dsy.add(&quot;0_9_17&quot;,[&quot;范县&quot;,&quot;南乐县&quot;,&quot;清丰县&quot;,&quot;台前县&quot;,&quot;濮阳市&quot;,&quot;濮阳县&quot;]);


dsy.add(&quot;0_10&quot;,[&quot;大庆&quot;,&quot;大兴安岭&quot;,&quot;哈尔滨&quot;,&quot;鹤岗&quot;,&quot;黑河&quot;,&quot;鸡西&quot;,&quot;佳木斯&quot;,&quot;牡丹江&quot;,&quot;七台河&quot;,&quot;齐齐哈尔&quot;,&quot;双鸭山&quot;,&quot;绥化&quot;,&quot;伊春&quot;]);
dsy.add(&quot;0_10_0&quot;,[&quot;大庆市&quot;,&quot;杜尔伯特蒙古族自治县&quot;,&quot;林甸县&quot;,&quot;肇源县&quot;,&quot;肇州县&quot;]);
dsy.add(&quot;0_10_1&quot;,[&quot;呼玛县&quot;,&quot;漠河县&quot;,&quot;塔河县&quot;]);
dsy.add(&quot;0_10_2&quot;,[&quot;阿城市&quot;,&quot;巴彦县&quot;,&quot;宾县&quot;,&quot;方正县&quot;,&quot;哈尔滨市&quot;,&quot;呼兰县&quot;,&quot;木兰县&quot;,&quot;尚志市&quot;,&quot;双城市&quot;,&quot;通河县&quot;,&quot;五常市&quot;,&quot;延寿县&quot;,&quot;依兰县&quot;]);
dsy.add(&quot;0_10_3&quot;,[&quot;鹤岗市&quot;,&quot;萝北县&quot;,&quot;绥滨县&quot;]);
dsy.add(&quot;0_10_4&quot;,[&quot;北安市&quot;,&quot;黑河市&quot;,&quot;嫩江县&quot;,&quot;孙吴县&quot;,&quot;五大连池市&quot;,&quot;逊克县&quot;]);
dsy.add(&quot;0_10_5&quot;,[&quot;虎林市&quot;,&quot;鸡东县&quot;,&quot;鸡西市&quot;,&quot;密山市&quot;]);
dsy.add(&quot;0_10_6&quot;,[&quot;抚远县&quot;,&quot;富锦市&quot;,&quot;佳木斯市&quot;,&quot;汤原县&quot;,&quot;同江市&quot;,&quot;桦川县&quot;,&quot;桦南县&quot;]);
dsy.add(&quot;0_10_7&quot;,[&quot;东宁县&quot;,&quot;海林市&quot;,&quot;林口县&quot;,&quot;牡丹江市&quot;,&quot;穆棱市&quot;,&quot;宁安市&quot;,&quot;绥芬河市&quot;]);
dsy.add(&quot;0_10_8&quot;,[&quot;勃利县&quot;,&quot;七台河市&quot;]);
dsy.add(&quot;0_10_9&quot;,[&quot;拜泉县&quot;,&quot;富裕县&quot;,&quot;甘南县&quot;,&quot;克东县&quot;,&quot;克山县&quot;,&quot;龙江县&quot;,&quot;齐齐哈尔市&quot;,&quot;泰来县&quot;,&quot;依安县&quot;,&quot;讷河市&quot;]);
dsy.add(&quot;0_10_10&quot;,[&quot;宝清县&quot;,&quot;集贤县&quot;,&quot;饶河县&quot;,&quot;双鸭山市&quot;,&quot;友谊县&quot;]);
dsy.add(&quot;0_10_11&quot;,[&quot;安达市&quot;,&quot;海伦市&quot;,&quot;兰西县&quot;,&quot;明水县&quot;,&quot;青冈县&quot;,&quot;庆安县&quot;,&quot;绥化市&quot;,&quot;绥棱县&quot;,&quot;望奎县&quot;,&quot;肇东市&quot;]);
dsy.add(&quot;0_10_12&quot;,[&quot;嘉荫县&quot;,&quot;铁力市&quot;,&quot;伊春市&quot;]);

dsy.add(&quot;0_11&quot;,[&quot;鄂州&quot;,&quot;恩施土家族苗族自治州&quot;,&quot;黄冈&quot;,&quot;黄石&quot;,&quot;荆门&quot;,&quot;荆州&quot;,&quot;潜江&quot;,&quot;神农架林区&quot;,&quot;十堰&quot;,&quot;随州&quot;,&quot;天门&quot;,&quot;武汉&quot;,&quot;仙桃&quot;,&quot;咸宁&quot;,&quot;襄樊&quot;,&quot;孝感&quot;,&quot;宜昌&quot;]);
dsy.add(&quot;0_11_0&quot;,[&quot;鄂州市&quot;]);
dsy.add(&quot;0_11_1&quot;,[&quot;巴东县&quot;,&quot;恩施市&quot;,&quot;鹤峰县&quot;,&quot;建始县&quot;,&quot;来凤县&quot;,&quot;利川市&quot;,&quot;咸丰县&quot;,&quot;宣恩县&quot;]);
dsy.add(&quot;0_11_2&quot;,[&quot;红安县&quot;,&quot;黄冈市&quot;,&quot;黄梅县&quot;,&quot;罗田县&quot;,&quot;麻城市&quot;,&quot;团风县&quot;,&quot;武穴市&quot;,&quot;英山县&quot;,&quot;蕲春县&quot;,&quot;浠水县&quot;]);
dsy.add(&quot;0_11_3&quot;,[&quot;大冶市&quot;,&quot;黄石市&quot;,&quot;阳新县&quot;]);
dsy.add(&quot;0_11_4&quot;,[&quot;荆门市&quot;,&quot;京山县&quot;,&quot;沙洋县&quot;,&quot;钟祥市&quot;]);
dsy.add(&quot;0_11_5&quot;,[&quot;公安县&quot;,&quot;洪湖市&quot;,&quot;监利县&quot;,&quot;江陵县&quot;,&quot;荆州市&quot;,&quot;石首市&quot;,&quot;松滋市&quot;]);
dsy.add(&quot;0_11_6&quot;,[&quot;潜江市&quot;]);
dsy.add(&quot;0_11_7&quot;,[&quot;神农架林区&quot;]);
dsy.add(&quot;0_11_8&quot;,[&quot;丹江口市&quot;,&quot;房县&quot;,&quot;十堰市&quot;,&quot;郧西县&quot;,&quot;郧县&quot;,&quot;竹山县&quot;,&quot;竹溪县&quot;]);
dsy.add(&quot;0_11_9&quot;,[&quot;广水市&quot;,&quot;随州市&quot;]);
dsy.add(&quot;0_11_10&quot;,[&quot;天门市&quot;]);
dsy.add(&quot;0_11_11&quot;,[&quot;武汉市&quot;]);
dsy.add(&quot;0_11_12&quot;,[&quot;仙桃市&quot;]);
dsy.add(&quot;0_11_13&quot;,[&quot;赤壁市&quot;,&quot;崇阳县&quot;,&quot;嘉鱼县&quot;,&quot;通城县&quot;,&quot;通山县&quot;,&quot;咸宁市&quot;]);
dsy.add(&quot;0_11_14&quot;,[&quot;保康县&quot;,&quot;谷城县&quot;,&quot;老河口市&quot;,&quot;南漳县&quot;,&quot;襄樊市&quot;,&quot;宜城市&quot;,&quot;枣阳市&quot;]);
dsy.add(&quot;0_11_15&quot;,[&quot;安陆市&quot;,&quot;大悟县&quot;,&quot;汉川市&quot;,&quot;孝昌县&quot;,&quot;孝感市&quot;,&quot;应城市&quot;,&quot;云梦县&quot;]);
dsy.add(&quot;0_11_16&quot;,[&quot;长阳土家族自治县&quot;,&quot;当阳市&quot;,&quot;五峰土家族自治县&quot;,&quot;兴山县&quot;,&quot;宜昌市&quot;,&quot;宜都市&quot;,&quot;远安县&quot;,&quot;枝江市&quot;,&quot;秭归县&quot;]);

dsy.add(&quot;0_12&quot;,[&quot;常德&quot;,&quot;长沙&quot;,&quot;郴州&quot;,&quot;衡阳&quot;,&quot;怀化&quot;,&quot;娄底&quot;,&quot;邵阳&quot;,&quot;湘潭&quot;,&quot;湘西土家族苗族自治州&quot;,&quot;益阳&quot;,&quot;永州&quot;,&quot;岳阳&quot;,&quot;张家界&quot;,&quot;株洲&quot;]);
dsy.add(&quot;0_12_0&quot;,[&quot;安乡县&quot;,&quot;常德市&quot;,&quot;汉寿县&quot;,&quot;津市市&quot;,&quot;临澧县&quot;,&quot;石门县&quot;,&quot;桃源县&quot;,&quot;澧县&quot;]);
dsy.add(&quot;0_12_1&quot;,[&quot;长沙市&quot;,&quot;长沙县&quot;,&quot;宁乡县&quot;,&quot;望城县&quot;,&quot;浏阳市&quot;]);
dsy.add(&quot;0_12_2&quot;,[&quot;安仁县&quot;,&quot;郴州市&quot;,&quot;桂东县&quot;,&quot;桂阳县&quot;,&quot;嘉禾县&quot;,&quot;临武县&quot;,&quot;汝城县&quot;,&quot;宜章县&quot;,&quot;永兴县&quot;,&quot;资兴市&quot;]);
dsy.add(&quot;0_12_3&quot;,[&quot;常宁市&quot;,&quot;衡东县&quot;,&quot;衡南县&quot;,&quot;衡山县&quot;,&quot;衡阳市&quot;,&quot;衡阳县&quot;,&quot;祁东县&quot;,&quot;耒阳市&quot;]);
dsy.add(&quot;0_12_4&quot;,[&quot;辰溪县&quot;,&quot;洪江市&quot;,&quot;怀化市&quot;,&quot;会同县&quot;,&quot;靖州苗族侗族自治县&quot;,&quot;麻阳苗族自治县&quot;,&quot;通道侗族自治县&quot;,&quot;新晃侗族自治县&quot;,&quot;中方县&quot;,&quot;芷江侗族自治县&quot;,&quot;沅陵县&quot;,&quot;溆浦县&quot;]);
dsy.add(&quot;0_12_5&quot;,[&quot;冷水江市&quot;,&quot;涟源市&quot;,&quot;娄底市&quot;,&quot;双峰县&quot;,&quot;新化县&quot;]);
dsy.add(&quot;0_12_6&quot;,[&quot;城步苗族自治县&quot;,&quot;洞口县&quot;,&quot;隆回县&quot;,&quot;邵东县&quot;,&quot;邵阳市&quot;,&quot;邵阳县&quot;,&quot;绥宁县&quot;,&quot;武冈市&quot;,&quot;新宁县&quot;,&quot;新邵县&quot;]);
dsy.add(&quot;0_12_7&quot;,[&quot;韶山市&quot;,&quot;湘潭市&quot;,&quot;湘潭县&quot;,&quot;湘乡市&quot;]);
dsy.add(&quot;0_12_8&quot;,[&quot;保靖县&quot;,&quot;凤凰县&quot;,&quot;古丈县&quot;,&quot;花垣县&quot;,&quot;吉首市&quot;,&quot;龙山县&quot;,&quot;永顺县&quot;,&quot;泸溪县&quot;]);
dsy.add(&quot;0_12_9&quot;,[&quot;安化县&quot;,&quot;南县&quot;,&quot;桃江县&quot;,&quot;益阳市&quot;,&quot;沅江市&quot;]);
dsy.add(&quot;0_12_10&quot;,[&quot;道县&quot;,&quot;东安县&quot;,&quot;江华瑶族自治县&quot;,&quot;江永县&quot;,&quot;蓝山县&quot;,&quot;宁远县&quot;,&quot;祁阳县&quot;,&quot;双牌县&quot;,&quot;新田县&quot;,&quot;永州市&quot;]);
dsy.add(&quot;0_12_11&quot;,[&quot;华容县&quot;,&quot;临湘市&quot;,&quot;平江县&quot;,&quot;湘阴县&quot;,&quot;岳阳市&quot;,&quot;岳阳县&quot;,&quot;汨罗市&quot;]);
dsy.add(&quot;0_12_12&quot;,[&quot;慈利县&quot;,&quot;桑植县&quot;,&quot;张家界市&quot;]);
dsy.add(&quot;0_12_13&quot;,[&quot;茶陵县&quot;,&quot;炎陵县&quot;,&quot;株洲市&quot;,&quot;株洲县&quot;,&quot;攸县&quot;,&quot;醴陵市&quot;]);

dsy.add(&quot;0_13&quot;,[&quot;白城&quot;,&quot;白山&quot;,&quot;长春&quot;,&quot;吉林&quot;,&quot;辽源&quot;,&quot;四平&quot;,&quot;松原&quot;,&quot;通化&quot;,&quot;延边朝鲜族自治州&quot;]);
dsy.add(&quot;0_13_0&quot;,[&quot;白城市&quot;,&quot;大安市&quot;,&quot;通榆县&quot;,&quot;镇赉县&quot;,&quot;洮南市&quot;]);
dsy.add(&quot;0_13_1&quot;,[&quot;白山市&quot;,&quot;长白朝鲜族自治县&quot;,&quot;抚松县&quot;,&quot;江源县&quot;,&quot;靖宇县&quot;,&quot;临江市&quot;]);
dsy.add(&quot;0_13_2&quot;,[&quot;长春市&quot;,&quot;德惠市&quot;,&quot;九台市&quot;,&quot;农安县&quot;,&quot;榆树市&quot;]);
dsy.add(&quot;0_13_3&quot;,[&quot;吉林市&quot;,&quot;磐石市&quot;,&quot;舒兰市&quot;,&quot;永吉县&quot;,&quot;桦甸市&quot;,&quot;蛟河市&quot;]);
dsy.add(&quot;0_13_4&quot;,[&quot;东丰县&quot;,&quot;东辽县&quot;,&quot;辽源市&quot;]);
dsy.add(&quot;0_13_5&quot;,[&quot;公主岭市&quot;,&quot;梨树县&quot;,&quot;双辽市&quot;,&quot;四平市&quot;,&quot;伊通满族自治县&quot;]);
dsy.add(&quot;0_13_6&quot;,[&quot;长岭县&quot;,&quot;扶余县&quot;,&quot;乾安县&quot;,&quot;前郭尔罗斯蒙古族自治县&quot;,&quot;松原市&quot;]);
dsy.add(&quot;0_13_7&quot;,[&quot;辉南县&quot;,&quot;集安市&quot;,&quot;柳河县&quot;,&quot;梅河口市&quot;,&quot;通化市&quot;,&quot;通化县&quot;]);
dsy.add(&quot;0_13_8&quot;,[&quot;安图县&quot;,&quot;敦化市&quot;,&quot;和龙市&quot;,&quot;龙井市&quot;,&quot;图们市&quot;,&quot;汪清县&quot;,&quot;延吉市&quot;,&quot;珲春市&quot;]);


dsy.add(&quot;0_14&quot;,[&quot;常州&quot;,&quot;淮安&quot;,&quot;连云港&quot;,&quot;南京&quot;,&quot;南通&quot;,&quot;苏州&quot;,&quot;宿迁&quot;,&quot;泰州&quot;,&quot;无锡&quot;,&quot;徐州&quot;,&quot;盐城&quot;,&quot;扬州&quot;,&quot;镇江&quot;]);
dsy.add(&quot;0_14_0&quot;,[&quot;常州市&quot;,&quot;金坛市&quot;,&quot;溧阳市&quot;]);
dsy.add(&quot;0_14_1&quot;,[&quot;洪泽县&quot;,&quot;淮安市&quot;,&quot;金湖县&quot;,&quot;涟水县&quot;,&quot;盱眙县&quot;]);
dsy.add(&quot;0_14_2&quot;,[&quot;东海县&quot;,&quot;赣榆县&quot;,&quot;灌南县&quot;,&quot;灌云县&quot;,&quot;连云港市&quot;]);
dsy.add(&quot;0_14_3&quot;,[&quot;高淳县&quot;,&quot;南京市&quot;,&quot;溧水县&quot;]);
dsy.add(&quot;0_14_4&quot;,[&quot;海安县&quot;,&quot;海门市&quot;,&quot;南通市&quot;,&quot;启东市&quot;,&quot;如东县&quot;,&quot;如皋市&quot;,&quot;通州市&quot;]);
dsy.add(&quot;0_14_5&quot;,[&quot;常熟市&quot;,&quot;昆山市&quot;,&quot;苏州市&quot;,&quot;太仓市&quot;,&quot;吴江市&quot;,&quot;张家港市&quot;]);
dsy.add(&quot;0_14_6&quot;,[&quot;宿迁市&quot;,&quot;宿豫县&quot;,&quot;沭阳县&quot;,&quot;泗洪县&quot;,&quot;泗阳县&quot;]);
dsy.add(&quot;0_14_7&quot;,[&quot;姜堰市&quot;,&quot;靖江市&quot;,&quot;泰兴市&quot;,&quot;泰州市&quot;,&quot;兴化市&quot;]);
dsy.add(&quot;0_14_8&quot;,[&quot;江阴市&quot;,&quot;无锡市&quot;,&quot;宜兴市&quot;]);
dsy.add(&quot;0_14_9&quot;,[&quot;丰县&quot;,&quot;沛县&quot;,&quot;铜山县&quot;,&quot;新沂市&quot;,&quot;徐州市&quot;,&quot;邳州市&quot;,&quot;睢宁县&quot;]);
dsy.add(&quot;0_14_10&quot;,[&quot;滨海县&quot;,&quot;大丰市&quot;,&quot;东台市&quot;,&quot;阜宁县&quot;,&quot;建湖县&quot;,&quot;射阳县&quot;,&quot;响水县&quot;,&quot;盐城市&quot;,&quot;盐都县&quot;]);
dsy.add(&quot;0_14_11&quot;,[&quot;宝应县&quot;,&quot;高邮市&quot;,&quot;江都市&quot;,&quot;扬州市&quot;,&quot;仪征市&quot;]);
dsy.add(&quot;0_14_12&quot;,[&quot;丹阳市&quot;,&quot;句容市&quot;,&quot;扬中市&quot;,&quot;镇江市&quot;]);

dsy.add(&quot;0_15&quot;,[&quot;抚州&quot;,&quot;赣州&quot;,&quot;吉安&quot;,&quot;景德镇&quot;,&quot;九江&quot;,&quot;南昌&quot;,&quot;萍乡&quot;,&quot;上饶&quot;,&quot;新余&quot;,&quot;宜春&quot;,&quot;鹰潭&quot;]);
dsy.add(&quot;0_15_0&quot;,[&quot;崇仁县&quot;,&quot;东乡县&quot;,&quot;抚州市&quot;,&quot;广昌县&quot;,&quot;金溪县&quot;,&quot;乐安县&quot;,&quot;黎川县&quot;,&quot;南城县&quot;,&quot;南丰县&quot;,&quot;宜黄县&quot;,&quot;资溪县&quot;]);
dsy.add(&quot;0_15_1&quot;,[&quot;安远县&quot;,&quot;崇义县&quot;,&quot;大余县&quot;,&quot;定南县&quot;,&quot;赣县&quot;,&quot;赣州市&quot;,&quot;会昌县&quot;,&quot;龙南县&quot;,&quot;南康市&quot;,&quot;宁都县&quot;,&quot;全南县&quot;,&quot;瑞金市&quot;,&quot;上犹县&quot;,&quot;石城县&quot;,&quot;信丰县&quot;,&quot;兴国县&quot;,&quot;寻乌县&quot;,&quot;于都县&quot;]);
dsy.add(&quot;0_15_2&quot;,[&quot;安福县&quot;,&quot;吉安市&quot;,&quot;吉安县&quot;,&quot;吉水县&quot;,&quot;井冈山市&quot;,&quot;遂川县&quot;,&quot;泰和县&quot;,&quot;万安县&quot;,&quot;峡江县&quot;,&quot;新干县&quot;,&quot;永丰县&quot;,&quot;永新县&quot;]);
dsy.add(&quot;0_15_3&quot;,[&quot;浮梁县&quot;,&quot;景德镇市&quot;,&quot;乐平市&quot;]);
dsy.add(&quot;0_15_4&quot;,[&quot;德安县&quot;,&quot;都昌县&quot;,&quot;湖口县&quot;,&quot;九江市&quot;,&quot;九江县&quot;,&quot;彭泽县&quot;,&quot;瑞昌市&quot;,&quot;武宁县&quot;,&quot;星子县&quot;,&quot;修水县&quot;,&quot;永修县&quot;]);
dsy.add(&quot;0_15_5&quot;,[&quot;安义县&quot;,&quot;进贤县&quot;,&quot;南昌市&quot;,&quot;南昌县&quot;,&quot;新建县&quot;]);
dsy.add(&quot;0_15_6&quot;,[&quot;莲花县&quot;,&quot;芦溪县&quot;,&quot;萍乡市&quot;,&quot;上栗县&quot;]);
dsy.add(&quot;0_15_7&quot;,[&quot;波阳县&quot;,&quot;德兴市&quot;,&quot;广丰县&quot;,&quot;横峰县&quot;,&quot;铅山县&quot;,&quot;上饶市&quot;,&quot;上饶县&quot;,&quot;万年县&quot;,&quot;余干县&quot;,&quot;玉山县&quot;,&quot;弋阳县&quot;,&quot;婺源县&quot;]);
dsy.add(&quot;0_15_8&quot;,[&quot;分宜县&quot;,&quot;新余市&quot;]);
dsy.add(&quot;0_15_9&quot;,[&quot;丰城市&quot;,&quot;奉新县&quot;,&quot;高安市&quot;,&quot;靖安县&quot;,&quot;上高县&quot;,&quot;铜鼓县&quot;,&quot;万载县&quot;,&quot;宜春市&quot;,&quot;宜丰县&quot;,&quot;樟树市&quot;]);
dsy.add(&quot;0_15_10&quot;,[&quot;贵溪市&quot;,&quot;鹰潭市&quot;,&quot;余江县&quot;]);

dsy.add(&quot;0_16&quot;,[&quot;鞍山&quot;,&quot;本溪&quot;,&quot;朝阳&quot;,&quot;大连&quot;,&quot;丹东&quot;,&quot;抚顺&quot;,&quot;阜新&quot;,&quot;葫芦岛&quot;,&quot;锦州&quot;,&quot;辽阳&quot;,&quot;盘锦&quot;,&quot;沈阳&quot;,&quot;铁岭&quot;,&quot;营口&quot;]);
dsy.add(&quot;0_16_0&quot;,[&quot;鞍山市&quot;,&quot;海城市&quot;,&quot;台安县&quot;,&quot;岫岩满族自治县&quot;]);
dsy.add(&quot;0_16_1&quot;,[&quot;本溪满族自治县&quot;,&quot;本溪市&quot;,&quot;桓仁满族自治县&quot;]);
dsy.add(&quot;0_16_2&quot;,[&quot;北票市&quot;,&quot;朝阳市&quot;,&quot;朝阳县&quot;,&quot;建平县&quot;,&quot;喀喇沁左翼蒙古族自治县&quot;,&quot;凌源市&quot;]);
dsy.add(&quot;0_16_3&quot;,[&quot;长海县&quot;,&quot;大连市&quot;,&quot;普兰店市&quot;,&quot;瓦房店市&quot;,&quot;庄河市&quot;]);
dsy.add(&quot;0_16_4&quot;,[&quot;丹东市&quot;,&quot;东港市&quot;,&quot;凤城市&quot;,&quot;宽甸满族自治县&quot;]);
dsy.add(&quot;0_16_5&quot;,[&quot;抚顺市&quot;,&quot;抚顺县&quot;,&quot;清原满族自治县&quot;,&quot;新宾满族自治县&quot;]);
dsy.add(&quot;0_16_6&quot;,[&quot;阜新蒙古族自治县&quot;,&quot;阜新市&quot;,&quot;彰武县&quot;]);
dsy.add(&quot;0_16_7&quot;,[&quot;葫芦岛市&quot;,&quot;建昌县&quot;,&quot;绥中县&quot;,&quot;兴城市&quot;]);
dsy.add(&quot;0_16_8&quot;,[&quot;北宁市&quot;,&quot;黑山县&quot;,&quot;锦州市&quot;,&quot;凌海市&quot;,&quot;义县&quot;]);
dsy.add(&quot;0_16_9&quot;,[&quot;灯塔市&quot;,&quot;辽阳市&quot;,&quot;辽阳县&quot;]);
dsy.add(&quot;0_16_10&quot;,[&quot;大洼县&quot;,&quot;盘锦市&quot;,&quot;盘山县&quot;]);
dsy.add(&quot;0_16_11&quot;,[&quot;法库县&quot;,&quot;康平县&quot;,&quot;辽中县&quot;,&quot;沈阳市&quot;,&quot;新民市&quot;]);
dsy.add(&quot;0_16_12&quot;,[&quot;昌图县&quot;,&quot;调兵山市&quot;,&quot;开原市&quot;,&quot;铁岭市&quot;,&quot;铁岭县&quot;,&quot;西丰县&quot;]);
dsy.add(&quot;0_16_13&quot;,[&quot;大石桥市&quot;,&quot;盖州市&quot;,&quot;营口市&quot;]);


dsy.add(&quot;0_17&quot;,[&quot;阿拉善盟&quot;,&quot;巴彦淖尔盟&quot;,&quot;包头&quot;,&quot;赤峰&quot;,&quot;鄂尔多斯&quot;,&quot;呼和浩特&quot;,&quot;呼伦贝尔&quot;,&quot;通辽&quot;,&quot;乌海&quot;,&quot;乌兰察布盟&quot;,&quot;锡林郭勒盟&quot;,&quot;兴安盟&quot;]);
dsy.add(&quot;0_17_0&quot;,[&quot;阿拉善右旗&quot;,&quot;阿拉善左旗&quot;,&quot;额济纳旗&quot;]);
dsy.add(&quot;0_17_1&quot;,[&quot;杭锦后旗&quot;,&quot;临河市&quot;,&quot;乌拉特后旗&quot;,&quot;乌拉特前旗&quot;,&quot;乌拉特中旗&quot;,&quot;五原县&quot;,&quot;磴口县&quot;]);
dsy.add(&quot;0_17_2&quot;,[&quot;包头市&quot;,&quot;达尔罕茂明安联合旗&quot;,&quot;固阳县&quot;,&quot;土默特右旗&quot;]);
dsy.add(&quot;0_17_3&quot;,[&quot;阿鲁科尔沁旗&quot;,&quot;敖汉旗&quot;,&quot;巴林右旗&quot;,&quot;巴林左旗&quot;,&quot;赤峰市&quot;,&quot;喀喇沁旗&quot;,&quot;克什克腾旗&quot;,&quot;林西县&quot;,&quot;宁城县&quot;,&quot;翁牛特旗&quot;]);
dsy.add(&quot;0_17_4&quot;,[&quot;达拉特旗&quot;,&quot;鄂尔多斯市&quot;,&quot;鄂托克旗&quot;,&quot;鄂托克前旗&quot;,&quot;杭锦旗&quot;,&quot;乌审旗&quot;,&quot;伊金霍洛旗&quot;,&quot;准格尔旗&quot;]);
dsy.add(&quot;0_17_5&quot;,[&quot;和林格尔县&quot;,&quot;呼和浩特市&quot;,&quot;清水河县&quot;,&quot;土默特左旗&quot;,&quot;托克托县&quot;,&quot;武川县&quot;]);
dsy.add(&quot;0_17_6&quot;,[&quot;阿荣旗&quot;,&quot;陈巴尔虎旗&quot;,&quot;额尔古纳市&quot;,&quot;鄂伦春自治旗&quot;,&quot;鄂温克族自治旗&quot;,&quot;根河市&quot;,&quot;呼伦贝尔市&quot;,&quot;满洲里市&quot;,&quot;莫力达瓦达斡尔族自治旗&quot;,&quot;新巴尔虎右旗&quot;,&quot;新巴尔虎左旗&quot;,&quot;牙克石市&quot;,&quot;扎兰屯市&quot;]);
dsy.add(&quot;0_17_7&quot;,[&quot;霍林郭勒市&quot;,&quot;开鲁县&quot;,&quot;科尔沁左翼后旗&quot;,&quot;科尔沁左翼中旗&quot;,&quot;库伦旗&quot;,&quot;奈曼旗&quot;,&quot;通辽市&quot;,&quot;扎鲁特旗&quot;]);
dsy.add(&quot;0_17_8&quot;,[&quot;乌海市&quot;]);
dsy.add(&quot;0_17_9&quot;,[&quot;察哈尔右翼后旗&quot;,&quot;察哈尔右翼前旗&quot;,&quot;察哈尔右翼中旗&quot;,&quot;丰镇市&quot;,&quot;化德县&quot;,&quot;集宁市&quot;,&quot;凉城县&quot;,&quot;商都县&quot;,&quot;四子王旗&quot;,&quot;兴和县&quot;,&quot;卓资县&quot;]);
dsy.add(&quot;0_17_10&quot;,[&quot;阿巴嘎旗&quot;,&quot;东乌珠穆沁旗&quot;,&quot;多伦县&quot;,&quot;二连浩特市&quot;,&quot;苏尼特右旗&quot;,&quot;苏尼特左旗&quot;,&quot;太仆寺旗&quot;,&quot;西乌珠穆沁旗&quot;,&quot;锡林浩特市&quot;,&quot;镶黄旗&quot;,&quot;正蓝旗&quot;,&quot;正镶白旗&quot;]);
dsy.add(&quot;0_17_11&quot;,[&quot;阿尔山市&quot;,&quot;科尔沁右翼前旗&quot;,&quot;科尔沁右翼中旗&quot;,&quot;突泉县&quot;,&quot;乌兰浩特市&quot;,&quot;扎赉特旗&quot;]);


dsy.add(&quot;0_18&quot;,[&quot;固原&quot;,&quot;石嘴山&quot;,&quot;吴忠&quot;,&quot;银川&quot;]);
dsy.add(&quot;0_18_0&quot;,[&quot;固原市&quot;,&quot;海原县&quot;,&quot;隆德县&quot;,&quot;彭阳县&quot;,&quot;西吉县&quot;,&quot;泾源县&quot;]);
dsy.add(&quot;0_18_1&quot;,[&quot;惠农县&quot;,&quot;平罗县&quot;,&quot;石嘴山市&quot;,&quot;陶乐县&quot;]);
dsy.add(&quot;0_18_2&quot;,[&quot;青铜峡市&quot;,&quot;同心县&quot;,&quot;吴忠市&quot;,&quot;盐池县&quot;,&quot;中宁县&quot;,&quot;中卫县&quot;]);
dsy.add(&quot;0_18_3&quot;,[&quot;贺兰县&quot;,&quot;灵武市&quot;,&quot;银川市&quot;,&quot;永宁县&quot;]);


dsy.add(&quot;0_19&quot;,[&quot;果洛藏族自治州&quot;,&quot;海北藏族自治州&quot;,&quot;海东&quot;,&quot;海南藏族自治州&quot;,&quot;海西蒙古族藏族自治州&quot;,&quot;黄南藏族自治州&quot;,&quot;西宁&quot;,&quot;玉树藏族自治州&quot;]);
dsy.add(&quot;0_19_0&quot;,[&quot;班玛县&quot;,&quot;达日县&quot;,&quot;甘德县&quot;,&quot;久治县&quot;,&quot;玛多县&quot;,&quot;玛沁县&quot;]);
dsy.add(&quot;0_19_1&quot;,[&quot;刚察县&quot;,&quot;海晏县&quot;,&quot;门源回族自治县&quot;,&quot;祁连县&quot;]);
dsy.add(&quot;0_19_2&quot;,[&quot;互助土族自治县&quot;,&quot;化隆回族自治县&quot;,&quot;乐都县&quot;,&quot;民和回族土族自治县&quot;,&quot;平安县&quot;,&quot;循化撒拉族自治县&quot;]);
dsy.add(&quot;0_19_3&quot;,[&quot;共和县&quot;,&quot;贵德县&quot;,&quot;贵南县&quot;,&quot;同德县&quot;,&quot;兴海县&quot;]);
dsy.add(&quot;0_19_4&quot;,[&quot;德令哈市&quot;,&quot;都兰县&quot;,&quot;格尔木市&quot;,&quot;天峻县&quot;,&quot;乌兰县&quot;]);
dsy.add(&quot;0_19_5&quot;,[&quot;河南蒙古族自治县&quot;,&quot;尖扎县&quot;,&quot;同仁县&quot;,&quot;泽库县&quot;]);
dsy.add(&quot;0_19_6&quot;,[&quot;大通回族土族自治县&quot;,&quot;西宁市&quot;,&quot;湟源县&quot;,&quot;湟中县&quot;]);
dsy.add(&quot;0_19_7&quot;,[&quot;称多县&quot;,&quot;囊谦县&quot;,&quot;曲麻莱县&quot;,&quot;玉树县&quot;,&quot;杂多县&quot;,&quot;治多县&quot;]);


dsy.add(&quot;0_20&quot;,[&quot;滨州&quot;,&quot;德州&quot;,&quot;东营&quot;,&quot;菏泽&quot;,&quot;济南&quot;,&quot;济宁&quot;,&quot;莱芜&quot;,&quot;聊城&quot;,&quot;临沂&quot;,&quot;青岛&quot;,&quot;日照&quot;,&quot;泰安&quot;,&quot;威海&quot;,&quot;潍坊&quot;,&quot;烟台&quot;,&quot;枣庄&quot;,&quot;淄博&quot;]);
dsy.add(&quot;0_20_0&quot;,[&quot;滨州市&quot;,&quot;博兴县&quot;,&quot;惠民县&quot;,&quot;无棣县&quot;,&quot;阳信县&quot;,&quot;沾化县&quot;,&quot;邹平县&quot;]);
dsy.add(&quot;0_20_1&quot;,[&quot;德州市&quot;,&quot;乐陵市&quot;,&quot;临邑县&quot;,&quot;陵县&quot;,&quot;宁津县&quot;,&quot;平原县&quot;,&quot;齐河县&quot;,&quot;庆云县&quot;,&quot;武城县&quot;,&quot;夏津县&quot;,&quot;禹城市&quot;]);
dsy.add(&quot;0_20_2&quot;,[&quot;东营市&quot;,&quot;广饶县&quot;,&quot;垦利县&quot;,&quot;利津县&quot;]);
dsy.add(&quot;0_20_3&quot;,[&quot;曹县&quot;,&quot;成武县&quot;,&quot;单县&quot;,&quot;定陶县&quot;,&quot;东明县&quot;,&quot;菏泽市&quot;,&quot;巨野县&quot;,&quot;郓城县&quot;,&quot;鄄城县&quot;]);
dsy.add(&quot;0_20_4&quot;,[&quot;济南市&quot;,&quot;济阳县&quot;,&quot;平阴县&quot;,&quot;商河县&quot;,&quot;章丘市&quot;]);
dsy.add(&quot;0_20_5&quot;,[&quot;济宁市&quot;,&quot;嘉祥县&quot;,&quot;金乡县&quot;,&quot;梁山县&quot;,&quot;曲阜市&quot;,&quot;微山县&quot;,&quot;鱼台县&quot;,&quot;邹城市&quot;,&quot;兖州市&quot;,&quot;汶上县&quot;,&quot;泗水县&quot;]);
dsy.add(&quot;0_20_6&quot;,[&quot;莱芜市&quot;]);
dsy.add(&quot;0_20_7&quot;,[&quot;东阿县&quot;,&quot;高唐县&quot;,&quot;冠县&quot;,&quot;聊城市&quot;,&quot;临清市&quot;,&quot;阳谷县&quot;,&quot;茌平县&quot;,&quot;莘县&quot;]);
dsy.add(&quot;0_20_8&quot;,[&quot;苍山县&quot;,&quot;费县&quot;,&quot;临沂市&quot;,&quot;临沭县&quot;,&quot;蒙阴县&quot;,&quot;平邑县&quot;,&quot;沂南县&quot;,&quot;沂水县&quot;,&quot;郯城县&quot;,&quot;莒南县&quot;]);
dsy.add(&quot;0_20_9&quot;,[&quot;即墨市&quot;,&quot;胶南市&quot;,&quot;胶州市&quot;,&quot;莱西市&quot;,&quot;平度市&quot;,&quot;青岛市&quot;]);
dsy.add(&quot;0_20_10&quot;,[&quot;日照市&quot;,&quot;五莲县&quot;,&quot;莒县&quot;]);
dsy.add(&quot;0_20_11&quot;,[&quot;东平县&quot;,&quot;肥城市&quot;,&quot;宁阳县&quot;,&quot;泰安市&quot;,&quot;新泰市&quot;]);
dsy.add(&quot;0_20_12&quot;,[&quot;荣成市&quot;,&quot;乳山市&quot;,&quot;威海市&quot;,&quot;文登市&quot;]);
dsy.add(&quot;0_20_13&quot;,[&quot;安丘市&quot;,&quot;昌乐县&quot;,&quot;昌邑市&quot;,&quot;高密市&quot;,&quot;临朐县&quot;,&quot;青州市&quot;,&quot;寿光市&quot;,&quot;潍坊市&quot;,&quot;诸城市&quot;]);
dsy.add(&quot;0_20_14&quot;,[&quot;长岛县&quot;,&quot;海阳市&quot;,&quot;莱阳市&quot;,&quot;莱州市&quot;,&quot;龙口市&quot;,&quot;蓬莱市&quot;,&quot;栖霞市&quot;,&quot;烟台市&quot;,&quot;招远市&quot;]);
dsy.add(&quot;0_20_15&quot;,[&quot;枣庄市&quot;,&quot;滕州市&quot;]);
dsy.add(&quot;0_20_16&quot;,[&quot;高青县&quot;,&quot;桓台县&quot;,&quot;沂源县&quot;,&quot;淄博市&quot;]);


dsy.add(&quot;0_21&quot;,[&quot;长治&quot;,&quot;大同&quot;,&quot;晋城&quot;,&quot;晋中&quot;,&quot;临汾&quot;,&quot;吕梁&quot;,&quot;朔州&quot;,&quot;太原&quot;,&quot;忻州&quot;,&quot;阳泉&quot;,&quot;运城&quot;]);
dsy.add(&quot;0_21_0&quot;,[&quot;长治市&quot;,&quot;长治县&quot;,&quot;长子县&quot;,&quot;壶关县&quot;,&quot;黎城县&quot;,&quot;潞城市&quot;,&quot;平顺县&quot;,&quot;沁县&quot;,&quot;沁源县&quot;,&quot;屯留县&quot;,&quot;武乡县&quot;,&quot;襄垣县&quot;]);
dsy.add(&quot;0_21_1&quot;,[&quot;大同市&quot;,&quot;大同县&quot;,&quot;广灵县&quot;,&quot;浑源县&quot;,&quot;灵丘县&quot;,&quot;天镇县&quot;,&quot;阳高县&quot;,&quot;左云县&quot;]);
dsy.add(&quot;0_21_2&quot;,[&quot;高平市&quot;,&quot;晋城市&quot;,&quot;陵川县&quot;,&quot;沁水县&quot;,&quot;阳城县&quot;,&quot;泽州县&quot;]);
dsy.add(&quot;0_21_3&quot;,[&quot;和顺县&quot;,&quot;介休市&quot;,&quot;晋中市&quot;,&quot;灵石县&quot;,&quot;平遥县&quot;,&quot;祁县&quot;,&quot;寿阳县&quot;,&quot;太谷县&quot;,&quot;昔阳县&quot;,&quot;榆社县&quot;,&quot;左权县&quot;]);
dsy.add(&quot;0_21_4&quot;,[&quot;安泽县&quot;,&quot;大宁县&quot;,&quot;汾西县&quot;,&quot;浮山县&quot;,&quot;古县&quot;,&quot;洪洞县&quot;,&quot;侯马市&quot;,&quot;霍州市&quot;,&quot;吉县&quot;,&quot;临汾市&quot;,&quot;蒲县&quot;,&quot;曲沃县&quot;,&quot;襄汾县&quot;,&quot;乡宁县&quot;,&quot;翼城县&quot;,&quot;永和县&quot;,&quot;隰县&quot;]);
dsy.add(&quot;0_21_5&quot;,[&quot;方山县&quot;,&quot;汾阳市&quot;,&quot;交城县&quot;,&quot;交口县&quot;,&quot;离石市&quot;,&quot;临县&quot;,&quot;柳林县&quot;,&quot;石楼县&quot;,&quot;文水县&quot;,&quot;孝义市&quot;,&quot;兴县&quot;,&quot;中阳县&quot;,&quot;岚县&quot;]);
dsy.add(&quot;0_21_6&quot;,[&quot;怀仁县&quot;,&quot;山阴县&quot;,&quot;朔州市&quot;,&quot;应县&quot;,&quot;右玉县&quot;]);
dsy.add(&quot;0_21_7&quot;,[&quot;古交市&quot;,&quot;娄烦县&quot;,&quot;清徐县&quot;,&quot;太原市&quot;,&quot;阳曲县&quot;]);
dsy.add(&quot;0_21_8&quot;,[&quot;保德县&quot;,&quot;代县&quot;,&quot;定襄县&quot;,&quot;繁峙县&quot;,&quot;河曲县&quot;,&quot;静乐县&quot;,&quot;宁武县&quot;,&quot;偏关县&quot;,&quot;神池县&quot;,&quot;五台县&quot;,&quot;五寨县&quot;,&quot;忻州市&quot;,&quot;原平市&quot;,&quot;岢岚县&quot;]);
dsy.add(&quot;0_21_9&quot;,[&quot;平定县&quot;,&quot;阳泉市&quot;,&quot;盂县&quot;]);
dsy.add(&quot;0_21_10&quot;,[&quot;河津市&quot;,&quot;临猗县&quot;,&quot;平陆县&quot;,&quot;万荣县&quot;,&quot;闻喜县&quot;,&quot;夏县&quot;,&quot;新绛县&quot;,&quot;永济市&quot;,&quot;垣曲县&quot;,&quot;运城市&quot;,&quot;芮城县&quot;,&quot;绛县&quot;,&quot;稷山县&quot;]);


dsy.add(&quot;0_22&quot;,[&quot;安康&quot;,&quot;宝鸡&quot;,&quot;汉中&quot;,&quot;商洛&quot;,&quot;铜川&quot;,&quot;渭南&quot;,&quot;西安&quot;,&quot;咸阳&quot;,&quot;延安&quot;,&quot;榆林&quot;]);
dsy.add(&quot;0_22_0&quot;,[&quot;安康市&quot;,&quot;白河县&quot;,&quot;汉阴县&quot;,&quot;宁陕县&quot;,&quot;平利县&quot;,&quot;石泉县&quot;,&quot;旬阳县&quot;,&quot;镇坪县&quot;,&quot;紫阳县&quot;,&quot;岚皋县&quot;]);
dsy.add(&quot;0_22_1&quot;,[&quot;宝鸡市&quot;,&quot;宝鸡县&quot;,&quot;凤县&quot;,&quot;凤翔县&quot;,&quot;扶风县&quot;,&quot;陇县&quot;,&quot;眉县&quot;,&quot;千阳县&quot;,&quot;太白县&quot;,&quot;岐山县&quot;,&quot;麟游县&quot;]);
dsy.add(&quot;0_22_2&quot;,[&quot;城固县&quot;,&quot;佛坪县&quot;,&quot;汉中市&quot;,&quot;留坝县&quot;,&quot;略阳县&quot;,&quot;勉县&quot;,&quot;南郑县&quot;,&quot;宁强县&quot;,&quot;西乡县&quot;,&quot;洋县&quot;,&quot;镇巴县&quot;]);
dsy.add(&quot;0_22_3&quot;,[&quot;丹凤县&quot;,&quot;洛南县&quot;,&quot;山阳县&quot;,&quot;商洛市&quot;,&quot;商南县&quot;,&quot;镇安县&quot;,&quot;柞水县&quot;]);
dsy.add(&quot;0_22_4&quot;,[&quot;铜川市&quot;,&quot;宜君县&quot;]);
dsy.add(&quot;0_22_5&quot;,[&quot;白水县&quot;,&quot;澄城县&quot;,&quot;大荔县&quot;,&quot;富平县&quot;,&quot;韩城市&quot;,&quot;合阳县&quot;,&quot;华县&quot;,&quot;华阴市&quot;,&quot;蒲城县&quot;,&quot;渭南市&quot;,&quot;潼关县&quot;]);
dsy.add(&quot;0_22_6&quot;,[&quot;高陵县&quot;,&quot;户县&quot;,&quot;蓝田县&quot;,&quot;西安市&quot;,&quot;周至县&quot;]);
dsy.add(&quot;0_22_7&quot;,[&quot;彬县&quot;,&quot;长武县&quot;,&quot;淳化县&quot;,&quot;礼泉县&quot;,&quot;乾县&quot;,&quot;三原县&quot;,&quot;武功县&quot;,&quot;咸阳市&quot;,&quot;兴平市&quot;,&quot;旬邑县&quot;,&quot;永寿县&quot;,&quot;泾阳县&quot;]);
dsy.add(&quot;0_22_8&quot;,[&quot;安塞县&quot;,&quot;富县&quot;,&quot;甘泉县&quot;,&quot;黄陵县&quot;,&quot;黄龙县&quot;,&quot;洛川县&quot;,&quot;吴旗县&quot;,&quot;延安市&quot;,&quot;延长县&quot;,&quot;延川县&quot;,&quot;宜川县&quot;,&quot;志丹县&quot;,&quot;子长县&quot;]);
dsy.add(&quot;0_22_9&quot;,[&quot;定边县&quot;,&quot;府谷县&quot;,&quot;横山县&quot;,&quot;佳县&quot;,&quot;靖边县&quot;,&quot;米脂县&quot;,&quot;清涧县&quot;,&quot;神木县&quot;,&quot;绥德县&quot;,&quot;吴堡县&quot;,&quot;榆林市&quot;,&quot;子洲县&quot;]);


dsy.add(&quot;0_23&quot;,[&quot;上海&quot;]);
dsy.add(&quot;0_23_0&quot;,[&quot;上海市&quot;,&quot;黄浦&quot;,&quot;卢湾&quot;,&quot;徐汇&quot;,&quot;长宁&quot;,&quot;静安&quot;,&quot;普陀&quot;,&quot;闸北&quot;,&quot;虹口&quot;,&quot;杨浦&quot;,&quot;闵行&quot;,&quot;宝山&quot;,&quot;嘉定&quot;,&quot;浦东&quot;,&quot;金山&quot;,&quot;松江&quot;,&quot;青浦&quot;,&quot;南汇&quot;,&quot;奉贤&quot;,&quot;崇明&quot;]);

dsy.add(&quot;0_24&quot;,[&quot;阿坝藏族羌族自治州&quot;,&quot;巴中&quot;,&quot;成都&quot;,&quot;达州&quot;,&quot;德阳&quot;,&quot;甘孜藏族自治州&quot;,&quot;广安&quot;,&quot;广元&quot;,&quot;乐山&quot;,&quot;凉山彝族自治州&quot;,&quot;眉山&quot;,&quot;绵阳&quot;,&quot;南充&quot;,&quot;内江&quot;,&quot;攀枝花&quot;,&quot;遂宁&quot;,&quot;雅安&quot;,&quot;宜宾&quot;,&quot;资阳&quot;,&quot;自贡&quot;,&quot;泸州&quot;]);
dsy.add(&quot;0_24_0&quot;,[&quot;阿坝县&quot;,&quot;黑水县&quot;,&quot;红原县&quot;,&quot;金川县&quot;,&quot;九寨沟县&quot;,&quot;理县&quot;,&quot;马尔康县&quot;,&quot;茂县&quot;,&quot;壤塘县&quot;,&quot;若尔盖县&quot;,&quot;松潘县&quot;,&quot;小金县&quot;,&quot;汶川县&quot;]);
dsy.add(&quot;0_24_1&quot;,[&quot;巴中市&quot;,&quot;南江县&quot;,&quot;平昌县&quot;,&quot;通江县&quot;]);
dsy.add(&quot;0_24_2&quot;,[&quot;成都市&quot;,&quot;崇州市&quot;,&quot;大邑县&quot;,&quot;都江堰市&quot;,&quot;金堂县&quot;,&quot;彭州市&quot;,&quot;蒲江县&quot;,&quot;双流县&quot;,&quot;新津县&quot;,&quot;邛崃市&quot;,&quot;郫县&quot;]);
dsy.add(&quot;0_24_3&quot;,[&quot;达县&quot;,&quot;达州市&quot;,&quot;大竹县&quot;,&quot;开江县&quot;,&quot;渠县&quot;,&quot;万源市&quot;,&quot;宣汉县&quot;]);
dsy.add(&quot;0_24_4&quot;,[&quot;德阳市&quot;,&quot;广汉市&quot;,&quot;罗江县&quot;,&quot;绵竹市&quot;,&quot;什邡市&quot;,&quot;中江县&quot;]);
dsy.add(&quot;0_24_5&quot;,[&quot;巴塘县&quot;,&quot;白玉县&quot;,&quot;丹巴县&quot;,&quot;稻城县&quot;,&quot;道孚县&quot;,&quot;德格县&quot;,&quot;得荣县&quot;,&quot;甘孜县&quot;,&quot;九龙县&quot;,&quot;康定县&quot;,&quot;理塘县&quot;,&quot;炉霍县&quot;,&quot;色达县&quot;,&quot;石渠县&quot;,&quot;乡城县&quot;,&quot;新龙县&quot;,&quot;雅江县&quot;,&quot;泸定县&quot;]);
dsy.add(&quot;0_24_6&quot;,[&quot;广安市&quot;,&quot;华蓥市&quot;,&quot;邻水县&quot;,&quot;武胜县&quot;,&quot;岳池县&quot;]);
dsy.add(&quot;0_24_7&quot;,[&quot;苍溪县&quot;,&quot;广元市&quot;,&quot;剑阁县&quot;,&quot;青川县&quot;,&quot;旺苍县&quot;]);
dsy.add(&quot;0_24_8&quot;,[&quot;峨边彝族自治县&quot;,&quot;峨眉山市&quot;,&quot;夹江县&quot;,&quot;井研县&quot;,&quot;乐山市&quot;,&quot;马边彝族自治县&quot;,&quot;沐川县&quot;,&quot;犍为县&quot;]);
dsy.add(&quot;0_24_9&quot;,[&quot;布拖县&quot;,&quot;德昌县&quot;,&quot;甘洛县&quot;,&quot;会东县&quot;,&quot;会理县&quot;,&quot;金阳县&quot;,&quot;雷波县&quot;,&quot;美姑县&quot;,&quot;冕宁县&quot;,&quot;木里藏族自治县&quot;,&quot;宁南县&quot;,&quot;普格县&quot;,&quot;西昌市&quot;,&quot;喜德县&quot;,&quot;盐源县&quot;,&quot;越西县&quot;,&quot;昭觉县&quot;]);
dsy.add(&quot;0_24_10&quot;,[&quot;丹棱县&quot;,&quot;洪雅县&quot;,&quot;眉山市&quot;,&quot;彭山县&quot;,&quot;青神县&quot;,&quot;仁寿县&quot;]);
dsy.add(&quot;0_24_11&quot;,[&quot;安县&quot;,&quot;北川县&quot;,&quot;江油市&quot;,&quot;绵阳市&quot;,&quot;平武县&quot;,&quot;三台县&quot;,&quot;盐亭县&quot;,&quot;梓潼县&quot;]);
dsy.add(&quot;0_24_12&quot;,[&quot;南部县&quot;,&quot;南充市&quot;,&quot;蓬安县&quot;,&quot;西充县&quot;,&quot;仪陇县&quot;,&quot;营山县&quot;,&quot;阆中市&quot;]);
dsy.add(&quot;0_24_13&quot;,[&quot;隆昌县&quot;,&quot;内江市&quot;,&quot;威远县&quot;,&quot;资中县&quot;]);
dsy.add(&quot;0_24_14&quot;,[&quot;米易县&quot;,&quot;攀枝花市&quot;,&quot;盐边县&quot;]);
dsy.add(&quot;0_24_15&quot;,[&quot;大英县&quot;,&quot;蓬溪县&quot;,&quot;射洪县&quot;,&quot;遂宁市&quot;]);
dsy.add(&quot;0_24_16&quot;,[&quot;宝兴县&quot;,&quot;汉源县&quot;,&quot;芦山县&quot;,&quot;名山县&quot;,&quot;石棉县&quot;,&quot;天全县&quot;,&quot;雅安市&quot;,&quot;荥经县&quot;]);
dsy.add(&quot;0_24_17&quot;,[&quot;长宁县&quot;,&quot;高县&quot;,&quot;江安县&quot;,&quot;南溪县&quot;,&quot;屏山县&quot;,&quot;兴文县&quot;,&quot;宜宾市&quot;,&quot;宜宾县&quot;,&quot;珙县&quot;,&quot;筠连县&quot;]);
dsy.add(&quot;0_24_18&quot;,[&quot;安岳县&quot;,&quot;简阳市&quot;,&quot;乐至县&quot;,&quot;资阳市&quot;]);
dsy.add(&quot;0_24_19&quot;,[&quot;富顺县&quot;,&quot;荣县&quot;,&quot;自贡市&quot;]);
dsy.add(&quot;0_24_20&quot;,[&quot;古蔺县&quot;,&quot;合江县&quot;,&quot;叙永县&quot;,&quot;泸县&quot;,&quot;泸州市&quot;]);


dsy.add(&quot;0_25&quot;,[&quot;天津&quot;]);
dsy.add(&quot;0_25_0&quot;,[&quot;天津市&quot;,&quot;和平&quot;,&quot;东丽&quot;,&quot;河东&quot;,&quot;西青&quot;,&quot;河西&quot;,&quot;津南&quot;,&quot;南开&quot;,&quot;北辰&quot;,&quot;河北&quot;,&quot;武清&quot;,&quot;红挢&quot;,&quot;塘沽&quot;,&quot;汉沽&quot;,&quot;大港&quot;,&quot;宁河&quot;,&quot;静海&quot;,&quot;宝坻&quot;,&quot;蓟县&quot;]);


dsy.add(&quot;0_26&quot;,[&quot;阿里&quot;,&quot;昌都&quot;,&quot;拉萨&quot;,&quot;林芝&quot;,&quot;那曲&quot;,&quot;日喀则&quot;,&quot;山南&quot;]);
dsy.add(&quot;0_26_0&quot;,[&quot;措勤县&quot;,&quot;噶尔县&quot;,&quot;改则县&quot;,&quot;革吉县&quot;,&quot;普兰县&quot;,&quot;日土县&quot;,&quot;札达县&quot;]);
dsy.add(&quot;0_26_1&quot;,[&quot;八宿县&quot;,&quot;边坝县&quot;,&quot;察雅县&quot;,&quot;昌都县&quot;,&quot;丁青县&quot;,&quot;贡觉县&quot;,&quot;江达县&quot;,&quot;类乌齐县&quot;,&quot;洛隆县&quot;,&quot;芒康县&quot;,&quot;左贡县&quot;]);
dsy.add(&quot;0_26_2&quot;,[&quot;达孜县&quot;,&quot;当雄县&quot;,&quot;堆龙德庆县&quot;,&quot;拉萨市&quot;,&quot;林周县&quot;,&quot;墨竹工卡县&quot;,&quot;尼木县&quot;,&quot;曲水县&quot;]);
dsy.add(&quot;0_26_3&quot;,[&quot;波密县&quot;,&quot;察隅县&quot;,&quot;工布江达县&quot;,&quot;朗县&quot;,&quot;林芝县&quot;,&quot;米林县&quot;,&quot;墨脱县&quot;]);
dsy.add(&quot;0_26_4&quot;,[&quot;安多县&quot;,&quot;巴青县&quot;,&quot;班戈县&quot;,&quot;比如县&quot;,&quot;嘉黎县&quot;,&quot;那曲县&quot;,&quot;尼玛县&quot;,&quot;聂荣县&quot;,&quot;申扎县&quot;,&quot;索县&quot;]);
dsy.add(&quot;0_26_5&quot;,[&quot;昂仁县&quot;,&quot;白朗县&quot;,&quot;定结县&quot;,&quot;定日县&quot;,&quot;岗巴县&quot;,&quot;吉隆县&quot;,&quot;江孜县&quot;,&quot;康马县&quot;,&quot;拉孜县&quot;,&quot;南木林县&quot;,&quot;聂拉木县&quot;,&quot;仁布县&quot;,&quot;日喀则市&quot;,&quot;萨嘎县&quot;,&quot;萨迦县&quot;,&quot;谢通门县&quot;,&quot;亚东县&quot;,&quot;仲巴县&quot;]);
dsy.add(&quot;0_26_6&quot;,[&quot;措美县&quot;,&quot;错那县&quot;,&quot;贡嘎县&quot;,&quot;加查县&quot;,&quot;浪卡子县&quot;,&quot;隆子县&quot;,&quot;洛扎县&quot;,&quot;乃东县&quot;,&quot;琼结县&quot;,&quot;曲松县&quot;,&quot;桑日县&quot;,&quot;扎囊县&quot;]);


dsy.add(&quot;0_27&quot;,[&quot;阿克苏&quot;,&quot;阿拉尔&quot;,&quot;巴音郭楞蒙古自治州&quot;,&quot;博尔塔拉蒙古自治州&quot;,&quot;昌吉回族自治州&quot;,&quot;哈密&quot;,&quot;和田&quot;,&quot;喀什&quot;,&quot;克拉玛依&quot;,&quot;克孜勒苏柯尔克孜自治州&quot;,&quot;石河子&quot;,&quot;图木舒克&quot;,&quot;吐鲁番&quot;,&quot;乌鲁木齐&quot;,&quot;五家渠&quot;,&quot;伊犁哈萨克自治州&quot;]);
dsy.add(&quot;0_27_0&quot;,[&quot;阿克苏市&quot;,&quot;阿瓦提县&quot;,&quot;拜城县&quot;,&quot;柯坪县&quot;,&quot;库车县&quot;,&quot;沙雅县&quot;,&quot;温宿县&quot;,&quot;乌什县&quot;,&quot;新和县&quot;]);
dsy.add(&quot;0_27_1&quot;,[&quot;阿拉尔市&quot;]);
dsy.add(&quot;0_27_2&quot;,[&quot;博湖县&quot;,&quot;和静县&quot;,&quot;和硕县&quot;,&quot;库尔勒市&quot;,&quot;轮台县&quot;,&quot;且末县&quot;,&quot;若羌县&quot;,&quot;尉犁县&quot;,&quot;焉耆回族自治县&quot;]);
dsy.add(&quot;0_27_3&quot;,[&quot;博乐市&quot;,&quot;精河县&quot;,&quot;温泉县&quot;]);
dsy.add(&quot;0_27_4&quot;,[&quot;昌吉市&quot;,&quot;阜康市&quot;,&quot;呼图壁县&quot;,&quot;吉木萨尔县&quot;,&quot;玛纳斯县&quot;,&quot;米泉市&quot;,&quot;木垒哈萨克自治县&quot;,&quot;奇台县&quot;]);
dsy.add(&quot;0_27_5&quot;,[&quot;巴里坤哈萨克自治县&quot;,&quot;哈密市&quot;,&quot;伊吾县&quot;]);
dsy.add(&quot;0_27_6&quot;,[&quot;策勒县&quot;,&quot;和田市&quot;,&quot;和田县&quot;,&quot;洛浦县&quot;,&quot;民丰县&quot;,&quot;墨玉县&quot;,&quot;皮山县&quot;,&quot;于田县&quot;]);
dsy.add(&quot;0_27_7&quot;,[&quot;巴楚县&quot;,&quot;喀什市&quot;,&quot;麦盖提县&quot;,&quot;莎车县&quot;,&quot;疏附县&quot;,&quot;疏勒县&quot;,&quot;塔什库尔干塔吉克自治县&quot;,&quot;叶城县&quot;,&quot;英吉沙县&quot;,&quot;岳普湖县&quot;,&quot;泽普县&quot;,&quot;伽师县&quot;]);
dsy.add(&quot;0_27_8&quot;,[&quot;克拉玛依市&quot;]);
dsy.add(&quot;0_27_9&quot;,[&quot;阿合奇县&quot;,&quot;阿克陶县&quot;,&quot;阿图什市&quot;,&quot;乌恰县&quot;]);
dsy.add(&quot;0_27_10&quot;,[&quot;石河子市&quot;]);
dsy.add(&quot;0_27_11&quot;,[&quot;图木舒克市&quot;]);
dsy.add(&quot;0_27_12&quot;,[&quot;吐鲁番市&quot;,&quot;托克逊县&quot;,&quot;鄯善县&quot;]);
dsy.add(&quot;0_27_13&quot;,[&quot;乌鲁木齐市&quot;,&quot;乌鲁木齐县&quot;]);
dsy.add(&quot;0_27_14&quot;,[&quot;五家渠市&quot;]);
dsy.add(&quot;0_27_15&quot;,[&quot;阿勒泰市&quot;,&quot;布尔津县&quot;,&quot;察布查尔锡伯自治县&quot;,&quot;额敏县&quot;,&quot;福海县&quot;,&quot;富蕴县&quot;,&quot;巩留县&quot;,&quot;哈巴河县&quot;,&quot;和布克赛尔蒙古自治县&quot;,&quot;霍城县&quot;,&quot;吉木乃县&quot;,&quot;奎屯市&quot;,&quot;尼勒克县&quot;,&quot;青河县&quot;,&quot;沙湾县&quot;,&quot;塔城市&quot;,&quot;特克斯县&quot;,&quot;托里县&quot;,&quot;乌苏市&quot;,&quot;新源县&quot;,&quot;伊宁市&quot;,&quot;伊宁县&quot;,&quot;裕民县&quot;,&quot;昭苏县&quot;]);


dsy.add(&quot;0_28&quot;,[&quot;保山&quot;,&quot;楚雄彝族自治州&quot;,&quot;大理白族自治州&quot;,&quot;德宏傣族景颇族自治州&quot;,&quot;迪庆藏族自治州&quot;,&quot;红河哈尼族彝族自治州&quot;,&quot;昆明&quot;,&quot;丽江&quot;,&quot;临沧&quot;,&quot;怒江傈傈族自治州&quot;,&quot;曲靖&quot;,&quot;思茅&quot;,&quot;文山壮族苗族自治州&quot;,&quot;西双版纳傣族自治州&quot;,&quot;玉溪&quot;,&quot;昭通&quot;]);
dsy.add(&quot;0_28_0&quot;,[&quot;保山市&quot;,&quot;昌宁县&quot;,&quot;龙陵县&quot;,&quot;施甸县&quot;,&quot;腾冲县&quot;]);
dsy.add(&quot;0_28_1&quot;,[&quot;楚雄市&quot;,&quot;大姚县&quot;,&quot;禄丰县&quot;,&quot;牟定县&quot;,&quot;南华县&quot;,&quot;双柏县&quot;,&quot;武定县&quot;,&quot;姚安县&quot;,&quot;永仁县&quot;,&quot;元谋县&quot;]);
dsy.add(&quot;0_28_2&quot;,[&quot;宾川县&quot;,&quot;大理市&quot;,&quot;洱源县&quot;,&quot;鹤庆县&quot;,&quot;剑川县&quot;,&quot;弥渡县&quot;,&quot;南涧彝族自治县&quot;,&quot;巍山彝族回族自治县&quot;,&quot;祥云县&quot;,&quot;漾濞彝族自治县&quot;,&quot;永平县&quot;,&quot;云龙县&quot;]);
dsy.add(&quot;0_28_3&quot;,[&quot;梁河县&quot;,&quot;陇川县&quot;,&quot;潞西市&quot;,&quot;瑞丽市&quot;,&quot;盈江县&quot;]);
dsy.add(&quot;0_28_4&quot;,[&quot;德钦县&quot;,&quot;维西傈僳族自治县&quot;,&quot;香格里拉县&quot;]);
dsy.add(&quot;0_28_5&quot;,[&quot;个旧市&quot;,&quot;河口瑶族自治县&quot;,&quot;红河县&quot;,&quot;建水县&quot;,&quot;金平苗族瑶族傣族自治县&quot;,&quot;开远市&quot;,&quot;绿春县&quot;,&quot;蒙自县&quot;,&quot;弥勒县&quot;,&quot;屏边苗族自治县&quot;,&quot;石屏县&quot;,&quot;元阳县&quot;,&quot;泸西县&quot;]);
dsy.add(&quot;0_28_6&quot;,[&quot;安宁市&quot;,&quot;呈贡县&quot;,&quot;富民县&quot;,&quot;晋宁县&quot;,&quot;昆明市&quot;,&quot;禄劝彝族苗族自治县&quot;,&quot;石林彝族自治县&quot;,&quot;寻甸回族自治县&quot;,&quot;宜良县&quot;,&quot;嵩明县&quot;]);
dsy.add(&quot;0_28_7&quot;,[&quot;华坪县&quot;,&quot;丽江市&quot;,&quot;宁蒗彝族自治县&quot;,&quot;永胜县&quot;,&quot;玉龙纳西族自治县&quot;]);
dsy.add(&quot;0_28_8&quot;,[&quot;沧源佤族自治县&quot;,&quot;凤庆县&quot;,&quot;耿马傣族佤族治县&quot;,&quot;临沧县&quot;,&quot;双江拉祜族佤族布朗族傣族自治县&quot;,&quot;永德县&quot;,&quot;云县&quot;,&quot;镇康县&quot;]);
dsy.add(&quot;0_28_9&quot;,[&quot;福贡县&quot;,&quot;贡山独龙族怒族自治县&quot;,&quot;兰坪白族普米族自治县&quot;,&quot;泸水县&quot;]);
dsy.add(&quot;0_28_10&quot;,[&quot;富源县&quot;,&quot;会泽县&quot;,&quot;陆良县&quot;,&quot;罗平县&quot;,&quot;马龙县&quot;,&quot;曲靖市&quot;,&quot;师宗县&quot;,&quot;宣威市&quot;,&quot;沾益县&quot;]);
dsy.add(&quot;0_28_11&quot;,[&quot;江城哈尼族彝族自治县&quot;,&quot;景东彝族自治县&quot;,&quot;景谷彝族傣族自治县&quot;,&quot;澜沧拉祜族自治县&quot;,&quot;孟连傣族拉祜族佤族自治县&quot;,&quot;墨江哈尼族自治县&quot;,&quot;普洱哈尼族彝族自治县&quot;,&quot;思茅市&quot;,&quot;西盟佤族自治县&quot;,&quot;镇沅彝族哈尼族拉祜族自治县&quot;]);
dsy.add(&quot;0_28_12&quot;,[&quot;富宁县&quot;,&quot;广南县&quot;,&quot;麻栗坡县&quot;,&quot;马关县&quot;,&quot;丘北县&quot;,&quot;文山县&quot;,&quot;西畴县&quot;,&quot;砚山县&quot;]);
dsy.add(&quot;0_28_13&quot;,[&quot;景洪市&quot;,&quot;勐海县&quot;,&quot;勐腊县&quot;]);
dsy.add(&quot;0_28_14&quot;,[&quot;澄江县&quot;,&quot;峨山彝族自治县&quot;,&quot;华宁县&quot;,&quot;江川县&quot;,&quot;通海县&quot;,&quot;新平彝族傣族自治县&quot;,&quot;易门县&quot;,&quot;玉溪市&quot;,&quot;元江哈尼族彝族傣族自治县&quot;]);
dsy.add(&quot;0_28_15&quot;,[&quot;大关县&quot;,&quot;鲁甸县&quot;,&quot;巧家县&quot;,&quot;水富县&quot;,&quot;绥江县&quot;,&quot;威信县&quot;,&quot;盐津县&quot;,&quot;彝良县&quot;,&quot;永善县&quot;,&quot;昭通市&quot;,&quot;镇雄县&quot;]);

dsy.add(&quot;0_29&quot;,[&quot;杭州&quot;,&quot;湖州&quot;,&quot;嘉兴&quot;,&quot;金华&quot;,&quot;丽水&quot;,&quot;宁波&quot;,&quot;绍兴&quot;,&quot;台州&quot;,&quot;温州&quot;,&quot;舟山&quot;,&quot;衢州&quot;]);
dsy.add(&quot;0_29_0&quot;,[&quot;淳安县&quot;,&quot;富阳市&quot;,&quot;杭州市&quot;,&quot;建德市&quot;,&quot;临安市&quot;,&quot;桐庐县&quot;]);
dsy.add(&quot;0_29_1&quot;,[&quot;安吉县&quot;,&quot;长兴县&quot;,&quot;德清县&quot;,&quot;湖州市&quot;]);
dsy.add(&quot;0_29_2&quot;,[&quot;海宁市&quot;,&quot;海盐县&quot;,&quot;嘉善县&quot;,&quot;嘉兴市&quot;,&quot;平湖市&quot;,&quot;桐乡市&quot;]);
dsy.add(&quot;0_29_3&quot;,[&quot;东阳市&quot;,&quot;金华市&quot;,&quot;兰溪市&quot;,&quot;磐安县&quot;,&quot;浦江县&quot;,&quot;武义县&quot;,&quot;义乌市&quot;,&quot;永康市&quot;]);
dsy.add(&quot;0_29_4&quot;,[&quot;景宁畲族自治县&quot;,&quot;丽水市&quot;,&quot;龙泉市&quot;,&quot;青田县&quot;,&quot;庆元县&quot;,&quot;松阳县&quot;,&quot;遂昌县&quot;,&quot;云和县&quot;,&quot;缙云县&quot;]);
dsy.add(&quot;0_29_5&quot;,[&quot;慈溪市&quot;,&quot;奉化市&quot;,&quot;宁波市&quot;,&quot;宁海县&quot;,&quot;象山县&quot;,&quot;余姚市&quot;]);
dsy.add(&quot;0_29_6&quot;,[&quot;上虞市&quot;,&quot;绍兴市&quot;,&quot;绍兴县&quot;,&quot;新昌县&quot;,&quot;诸暨市&quot;,&quot;嵊州市&quot;]);
dsy.add(&quot;0_29_7&quot;,[&quot;临海市&quot;,&quot;三门县&quot;,&quot;台州市&quot;,&quot;天台县&quot;,&quot;温岭市&quot;,&quot;仙居县&quot;,&quot;玉环县&quot;]);
dsy.add(&quot;0_29_8&quot;,[&quot;苍南县&quot;,&quot;洞头县&quot;,&quot;乐清市&quot;,&quot;平阳县&quot;,&quot;瑞安市&quot;,&quot;泰顺县&quot;,&quot;温州市&quot;,&quot;文成县&quot;,&quot;永嘉县&quot;]);
dsy.add(&quot;0_29_9&quot;,[&quot;舟山市&quot;,&quot;岱山县&quot;,&quot;嵊泗县&quot;]);
dsy.add(&quot;0_29_10&quot;,[&quot;常山县&quot;,&quot;江山市&quot;,&quot;开化县&quot;,&quot;龙游县&quot;,&quot;衢州市&quot;]);

dsy.add(&quot;0_30&quot;,[&quot;重庆&quot;]);
dsy.add(&quot;0_30_0&quot;,[&quot;城口县&quot;,&quot;大足县&quot;,&quot;垫江县&quot;,&quot;丰都县&quot;,&quot;奉节县&quot;,&quot;合川市&quot;,&quot;江津市&quot;,&quot;开县&quot;,&quot;梁平县&quot;,&quot;南川市&quot;,&quot;彭水苗族土家族自治县&quot;,&quot;荣昌县&quot;,&quot;石柱土家族自治县&quot;,&quot;铜梁县&quot;,&quot;巫山县&quot;,&quot;巫溪县&quot;,&quot;武隆县&quot;,&quot;秀山土家族苗族自治县&quot;,&quot;永川市&quot;,&quot;酉阳土家族苗族自治县&quot;,&quot;云阳县&quot;,&quot;忠县&quot;,&quot;重庆市&quot;,&quot;潼南县&quot;,&quot;璧山县&quot;,&quot;綦江县&quot;]);
//--&gt;
&lt;/SCRIPT&gt;
&lt;SCRIPT LANGUAGE = JavaScript&gt;
&lt;!--
//** Power by Fason(2004-3-11)
//** Email:fason_pfx@hotmail.com

var s=[&quot;s1&quot;,&quot;s2&quot;,&quot;s3&quot;];
var opt0 = [&quot;省份&quot;,&quot;地级市&quot;,&quot;市、县级市、县&quot;];
function setup()
{
for(i=0;i&lt;s.length-1;i++)
&nbsp;document.getElementById(s[i]).onchange=new Function(&quot;change(&quot;+(i+1)+&quot;)&quot;);
change(0);
}
//--&gt;
&lt;/SCRIPT&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#E0E0E0&quot; onload=&quot;setup()&quot;&gt;
多级关联菜单:
&lt;form name=&quot;frm&quot;&gt;
&lt;select id=&quot;s1&quot;&gt;&lt;option&gt;省份&lt;/option&gt;&lt;/select&gt;
&lt;select id=&quot;s2&quot;&gt;&lt;option&gt;地级市&lt;/option&gt;&lt;/select&gt;
&lt;select id=&quot;s3&quot;&gt;&lt;option&gt;市、县级市、县&lt;/option&gt;&lt;/select&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;

网站PR值查询的代码 不指定

jed , 2006-10-2 08:26 , 代码编程 , 评论(0) , 阅读(4377) , Via 本站原创
1. 将以下代码存档为pr.php


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>网站PR值查询 - <? echo $_GET["url"]; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
 table, tr, td                   { font-family: Verdana,Arial,宋体; font-size: 12px; color: #333333 }
 body                            { font: 12px Verdana,宋体; background-color: #fcfcfc; padding: 0; margin: 0 }
 a:link, a:visited, a:active     { color: #000099; text-decoration: none}
 a:hover                         { color: #0000ff; text-decoration: none}
 FORM                            { padding: 0; margin: 0 }

 .textbox                        { border: 1px solid #000000; padding: 1px; width: 100% }
 .headertable                    { background-color: #FFFFFF; border: 1px solid black; padding: 2px }
 .title                          { border: 1px solid #000000; font-size: 12px; font-weight: bold; line-height: 150%; color: #FFFFFF; height: 25px; background-color: #5A7594}
 .table1                         { background-color: #FFFFFF; width: 100%; align: center; border: 1px solid black}
 .tablewrap                      { border: 1px dashed #777777; background-color: #EFEFEF; vertical-align: middle}
 .tdrow1                         { background-color: #E4E4E4; padding: 3px; vertical-align: middle}
 .tdrow2                         { background-color: #EFEFEF; padding: 3px; vertical-align: middle}
 .tdtop                          { font-weight: bold; height: 24px; line-height: 150%; color: #FFFFFF}
 .note                           { margin: 10px; padding: 5px; border: 1px dashed #555555; background-color: #FFFFFF }
</style>
</head>
<body>
     <table align="center" class="tablewrap" cellpadding="0" cellspacing="3" width="350">
       <tr>
         <td align="center" class="title">网站PR值查询</td>
       </tr>
       <tr>
         <td>
           <table class="table1" align="center" width="100%">
       <tr>
         <td>
<form method="GET">
<input name="url">
<input type="submit" value="Get PageRank">
</form>
         </td>
       </tr>
           </table>
<p align="center">
<?
if(!empty($_GET["url"]))
{
include "google_pagerank.php";
print "您查询的网站 <a href='http://".$_GET["url"]."'>".$_GET["url"]."</a> 的PR值是 ".(int)getrank($_GET["url"])." ";
}
?>
</p>
         </td>
       </tr>
     </table>
</body>
</html>



2. 将以下代码存档为google_pagerank.php


<?
/*
Google PR v2.0
author zhil (zhil@ukr.net)
GoogleToolbar 2.0.111-big
*/
function fadd($v1,$v2)
{
       $v3 = $v1 + $v2;
       if($v3 > 4294967295)$v3 = $v3 - 4294967296;
//      print $v3."<BR>";
       return $v3;
}
function fsub($v1,$v2)
{
       $v3 = $v1 - $v2;
       if($v3 < 0 )$v3 = $v3 + 4294967296;
       if($v3 > 4294967295)$v3 = $v3 - 4294967296;
//      print $v3."<BR>";
       return $v3;
}
function fdl($v1,$v2)
{
//      if($v1 > 2147483647){$v1 = 2147483647;$v2++;}
       $v3 = $v1 << $v2;
       while($v3 > 4294967295)$v3 = $v3 - 4294967296;
       return $v3;
}
function fdr($v1,$v2)
{
       if($v1 > 2147483647){$v1 = floor($v1/2);$v2--;}
       $v3 = $v1 >> $v2;
//        while($v3 > 4294967295)$v3 = $v3 - 4294967296;
       return $v3;
}
function fxr($v1,$v2)
{                  
       $v3 = $v1 ^ $v2;
       while($v3 > 4294967295)$v3 = $v3 - 4294967296;
       while($v3 < 0)$v3 = $v3 + 4294967296;
       return $v3;
}
function z($var)
{
       GLOBAL $$var;
       print $var." = ".$$var."<HR>";
}
function get_ch($url)
{
$c1 = 0xE6359A60;
$c2 = 0x9E3779B9;
$url = "info:".$url;
//z('url');

//                        uint $_eax, $_edi, $_ecx, $_edx, _esi, $_edi;
//                        uint _var8, _var4;                      

                       $_var4 = strlen($url);
                       GLOBAL $_eax,$_ebx,$_ecx,$_edx,$_edi,$_esi;

                       $_esi = $c1;
                       $_edi = $_ebx = $c2;

                       if ($_var4 > 11)
//                                goto loc_1002FCD6;
                       {
                       $_var8 = floor($_var4 / 12);
                       $_ecx = 0;

//loc_1002FBFB:
               while($_var8 > 0)
               {
                       $_eax = ord($url[(int)($_ecx+0x7)]);
                       $_edx = ord($url[(int)($_ecx+0x6)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x5)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x4)]);
$_edx = fadd($_edx,$_edi);
$_eax = fdl($_eax,8);
$_edi = fadd($_edx,$_eax);
                       $_eax = ord($url[(int)($_ecx+0xB)]);
                       $_edx = ord($url[(int)($_ecx+0xA)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x9)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x8)]);
$_edx = fadd($_edx,$_esi);
$_eax = fdl($_eax,8);
$_esi = fadd($_edx,$_eax);
                       $_edx = ord($url[(int)($_ecx+0x3)]);
                       $_eax = ord($url[(int)($_ecx+0x2)]);
$_edx = fdl($_edx,8);
$_edx = fadd($_edx,$_eax);
                       $_eax = ord($url[(int)($_ecx+0x1)]);
$_edx = fdl($_edx,8);
$_edx = fadd($_edx,$_eax);
                       $_eax = ord($url[(int)($_ecx+0x0)]);
$_edx = fdl($_edx,8);
$_edx = fadd($_edx,$_eax);
$_edx = fsub($_edx,$_edi);
$_edx = fsub($_edx,$_esi);
                       $_eax = $_esi;
$_eax = fdr($_eax,13);
$_edx = fadd($_edx,$_ebx);
$_edx = fxr($_edx,$_eax);
$_edi = fsub($_edi,$_edx);
$_edi = fsub($_edi,$_esi);
                       $_eax = $_edx;
$_eax = fdl($_eax,8);
$_edi = fxr($_edi,$_eax);
$_esi = fsub($_esi,$_edi);
$_esi = fsub($_esi,$_edx);
                       $_eax = $_edi;
$_eax = fdr($_eax,13);
$_esi = fxr($_esi,$_eax);
$_edx = fsub($_edx,$_edi);
$_edx = fsub($_edx,$_esi);
                       $_eax = $_esi;
$_eax = fdr($_eax,12);
$_edx = fxr($_edx,$_eax);
$_edi = fsub($_edi,$_edx);
$_edi = fsub($_edi,$_esi);
                       $_eax = $_edx;
$_eax = fdl($_eax,16);
$_edi = fxr($_edi,$_eax);
$_esi = fsub($_esi,$_edi);
                       $_var4 -= 12;          
$_esi = fsub($_esi,$_edx);
                       $_eax = $_edi;
$_eax = fdr($_eax,5);
$_esi = fxr($_esi,$_eax);
$_edx = fsub($_edx,$_edi);
                       $_eax = $_esi;
$_eax = fdr($_eax,3);
$_edx = fsub($_edx,$_esi);
$_edx = fxr($_edx,$_eax);
                       $_ebx = $_edx;                    
$_edi = fsub($_edi,$_ebx);
$_edi = fsub($_edi,$_esi);
                       $_eax = $_ebx;
$_eax = fdl($_eax,10);
$_edi = fxr($_edi,$_eax);
$_esi = fsub($_esi,$_edi);
                       $_eax = $_edi;
$_esi = fsub($_esi,$_ebx);
$_eax = fdr($_eax,15);
$_esi = fxr($_esi,$_eax);
                       $_ecx += 12;
//                      z('_eax');z('_ebx');z('_ecx');z('_edx');z('_edi');z('_esi');die();
                       $_var8 --;
               }
}else
{
                       $_ecx = 0;
}

//loc_1002FCD9:  
                       $_esi += strlen($url);
                       $_eax = $_var4;
                       $_eax --;
                       if ($_eax < 11)// goto loc_1002FD81;
{
/*                       switch ($_eax) {
                               case 0x0:
                               break;
                               case 0x1:
                               break;
                               case 0x2:
                               break;
                               case 0x3:
                               break;
                               case 0x4:
                               break;
                               case 0x5:
                               break;
                               case 0x6:
                               break;
                               case 0x7:
                               break;
                               case 0x8:
                               break;
                               case 0x9:
                               break;
                               case 0xA:
                               break;
                       }*/
//loc_1002FCF0: // case 0xa
if($_eax == 0xa)
{
                       $_eax = ord($url[(int)($_ecx+0xA)]);
$_eax = fdl($_eax,24);
$_esi = fadd($_esi,$_eax);
                       $s1 = true;
}
//loc_1002FCF9: // case 0x9
if(($_eax == 0x9)||$s1)
{
                       $_eax = ord($url[(int)($_ecx+0x9)]);
$_eax = fdl($_eax,16);
$_esi = fadd($_esi,$_eax);
                       $s2 = true;
}
//loc_1002FD02: // case 0x8
if(($_eax == 0x8)||$s2)
{

                       $_eax = ord($url[(int)($_ecx+0x8)]);
$_eax = fdl($_eax,8);
$_esi = fadd($_esi,$_eax);
                       $s3 = true;
}
//loc_1002FD0B: // case 0x7
if(($_eax == 0x7)||$s3)
{
                       $_eax = ord($url[(int)($_ecx+0x7)]);
                       $_edx = ord($url[(int)($_ecx+0x6)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x5)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x4)]);
$_eax = fdl($_eax,8);
$_edx = fadd($_edx,$_edi);
$_edi = fadd($_edx,$_eax);
                       $g1 = true;
                       //goto loc_1002FD47;
}
//loc_1002FD2F: // case 0x6
if(($_eax == 0x6))
{
                       $_eax = ord($url[(int)($_ecx+0x6)]);
$_eax = fdl($_eax,16);
$_edi = fadd($_edi,$_eax);
                       $s5 = true;
}
//loc_1002FD38: // case 0x5
if(($_eax == 0x5)||$s5)
{
                       $_eax = ord($url[(int)($_ecx+0x5)]);
$_eax = fdl($_eax,8);
$_edi = fadd($_edi,$_eax);
                       $s6 = true;
}
//loc_1002FD41: // case 0x4
if(($_eax == 0x4)||$s6)
{
                       $_eax = ord($url[(int)($_ecx+0x4)]);
$_edi = fadd($_edi,$_eax);
                       $s7 = true;
}
//loc_1002FD47: // case 0x3
if(($_eax == 0x3)||$g1||$s7)
{                                    
                       $_eax = ord($url[(int)($_ecx+0x3)]);
                       $_edx = ord($url[(int)($_ecx+0x2)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
                       $_edx = ord($url[(int)($_ecx+0x1)]);
                       $_ecx = ord($url[(int)($_ecx+0x0)]);
$_eax = fdl($_eax,8);
$_eax = fadd($_eax,$_edx);
$_eax = fdl($_eax,8);
$_ecx = fadd($_ecx,$_ebx);
$_ebx = fadd($_ecx,$_eax);
                       $g2 = true;
}
//loc_1002FD6A: // case 0x2
if($_eax == 0x2)
{
                       $_eax = ord($url[(int)($_ecx+0x2)]);
$_eax = fdl($_eax,16);
$_ebx = fadd($_ebx,$_eax);
                       $s8 = true;
}
//loc_1002FD73: // case 0x1
if(($_eax == 0x1)||$s8)
{
                       $_eax = ord($url[(int)($_ecx+0x1)]);
$_eax = fdl($_eax,8);
$_ebx = fadd($_ebx,$_eax);
                       $s9 = true;
}
if(($_eax == 0x0)||$s9)
{
//loc_1002FD7C: // case 0x0
                       $_eax = ord($url[(int)($_ecx+0x0)]);
$_ebx = fadd($_ebx,$_eax);
}
}
//loc_1002FD81: // default
$_ebx = fsub($_ebx,$_edi);
$_ebx = fsub($_ebx,$_esi);
                       $_eax = $_esi;
$_eax = fdr($_eax,13);
$_ebx = fxr($_ebx,$_eax);
$_edi = fsub($_edi,$_ebx);
$_edi = fsub($_edi,$_esi);
                       $_eax = $_ebx;
$_eax = fdl($_eax,8);
$_edi = fxr($_edi,$_eax);
$_esi = fsub($_esi,$_edi);
$_esi = fsub($_esi,$_ebx);
                       $_eax = $_edi;
$_eax = fdr($_eax,13);
$_esi = fxr($_esi,$_eax);
                       $_ebx-= $_edi;
$_ebx = fsub($_ebx,$_esi);
                       $_eax = $_esi;
$_eax = fdr($_eax,12);
$_ebx = fxr($_ebx,$_eax);
$_edi = fsub($_edi,$_ebx);
$_edi = fsub($_edi,$_esi);
                       $_eax = $_ebx;
$_eax = fdl($_eax,16);
$_edi = fxr($_edi,$_eax);
$_esi = fsub($_esi,$_edi);
                       $_eax = $_edi;
$_esi = fsub($_esi,$_ebx);
$_eax = fdr($_eax,5);
$_esi = fxr($_esi,$_eax);
$_ebx = fsub($_ebx,$_edi);
                       $_eax = $_esi;
                       $_ecx = $_eax;
$_ebx = fsub($_ebx,$_eax);
$_ecx = fdr($_ecx,3);
$_ebx = fxr($_ebx,$_ecx);
$_edi = fsub($_edi,$_ebx);
$_edi = fsub($_edi,$_eax);
                       $_ecx = $_ebx;
$_ecx = fdl($_ecx,0xA);
$_edi = fxr($_edi,$_ecx);
$_eax = fsub($_eax,$_edi);
$_eax = fsub($_eax,$_ebx);
$_edi = fdr($_edi,0xF);
$_eax = fxr($_eax,$_edi);
       return "6".$_eax;
}
function getrank($url)
{

       ob_start();

       $ch = curl_init();

     curl_setopt($ch, CURLOPT_URL, "http://66.102.11.104/search?client=navclient-auto&ch=".get_ch($url)."&ie=UTF-8&oe=UTF-8&features=Rank&q=info:".$url);
//      print get_ch($url);die();
//        curl_setopt($ch, CURLOPT_URL, "http://66.102.11.104/search?client=navclient-auto&ch=6517667070&ie=UTF-8&oe=UTF-8&features=Rank&q=info:http://www.skinz.org");
//                                     http:///search?client=navclient-auto&ch=6517667070&ie=UTF-8&oe=UTF-8&features=Rank&q=info:http%3A%2F%2Fwww%2Eskinz%2Eorg
       curl_setopt($ch, CURLOPT_HEADER, 0);
       curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; GoogleToolbar 2.0.102-big; Windows XP 5.1)");
       curl_exec($ch);

       curl_close($ch);

       $content = ob_get_contents();
       ob_end_clean();
//        print $content;
       return substr($content,(strrpos($content,":")+1));


}
?>

分页: 72/80 第一页 上页 67 68 69 70 71 72 73 74 75 76 下页 最后页 [ 显示模式: 摘要 | 列表 ]