;====================================================================
;Author Name:     JHD, Email: jhd@jhdscript.com
;Company:         JHDSCRIPT® , Home Page: http://www.jhdscript.com
;--------------------------------------------------------------------
Name:             Site X
;Copyright:       2003-2xxx, Date: 17/05/03
;====================================================================

alias -l ndx { return Remote\siteX\dll\mdx.dll }

alias siteX {
  sockclose siteX
  sockopen siteX fr.wedoo.com 80
}
on 1:sockread:siteX:{ 
  sockread %tmpsiteX
  if ( <a href isin $gettok(%tmpsiteX,1-,61)) && ( <a href isin $gettok(%tmpsiteX,4-,61)) && ( "50" isin $gettok(%tmpsiteX,4,61)) && ($dialog(sitex)) {
    did -a siteX 3 0 $gettok($remove($gettok(%tmpsiteX,4-,61),</a>,</td>,"50" valign="top">,target="_blank",class="dstUrl">),1,60) $chr(9) $gettok($remove($gettok(%tmpsiteX,4-,61),</a>,</td>,"50" valign="top">,target="_blank",class="dstUrl">),-1,32)
  }
}
on 1:sockopen:siteX:{ 
  sockwrite -nt $sockname GET /ranking/network/ $+ %tmpsitex HTTP/1.1
  sockwrite -nt $sockname HEAD http://fr.wedoo.com/ HTTP/1.1 
  sockwrite -nt $sockname Accept: */* 
  sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; mIRC $version $+ )
  sockwrite -nt $sockname Host: fr.wedoo.com $+ : $+ $sock($sockname).port 
  sockwrite -nt $sockname Connection: Keep-Alive 
  sockwrite -nt $sockname $lf
}

alias siteXd {
  dialog -md siteX siteX
}

dialog siteX {
  title "Moteur de recherche de sites X"
  icon Remote\siteX\images\icone\woman.ico
  size 177 109 402 251
  combo 1, 9 9 232 100, drop edit size
  button "Rechercher", 2, 248 9 67 25
  list 3, 8 40 386 206, size
  button "Voir le site", 4, 328 9 67 25
  button "&Hide", 5, 0 0 0 0, hide Ok
}

on *:dialog:sitex:init:*:{
  dll $ndx SetMircVersion $version
  dll $ndx MarkDialog $dname
  dll $ndx SetControlMDX $dname 3 ListView report rowselect single grid > Remote\siteX\dll\views.mdx
  did -i $dname 3 1 headerdims 280 100
  did -i $dname 3 1 headertext Description du site $chr(9) URL
  did -a $dname 1 18 - 21 ans
  did -a $dname 1 Amateurs
  did -a $dname 1 Asiatiques
  did -a $dname 1 Erotiques
  did -a $dname 1 Fétichisme
  did -a $dname 1 Gays
  did -a $dname 1 Hardcore
  did -a $dname 1 Lesbiennes
  did -a $dname 1 Mangas
  did -a $dname 1 Matures
  did -a $dname 1 Photos
  did -a $dname 1 Pour elles
  did -a $dname 1 Sexe
  did -a $dname 1 Transexuels
  did -a $dname 1 Vedettes
  did -a $dname 1 Vidéos
  did -a $dname 1 Voyeurs
  did -a $dname 1 Webcams
}
on *:dialog:sitex:sclick:*:{
  if $did == 1 {
    if ($did($dname,1).sel == 1) {
      set %tmpsitex 144_1.htm
    }
    elseif ($did($dname,1).sel == 2) {
      set %tmpsitex 98_1.htm
    }
    elseif ($did($dname,1).sel == 3) {
      set %tmpsitex 99_1.htm
    }
    elseif ($did($dname,1).sel == 4) {
      set %tmpsitex 100_1.htm
    }
    elseif ($did($dname,1).sel == 5) {
      set %tmpsitex 101_1.htm
    }
    elseif ($did($dname,1).sel == 6) {
      set %tmpsitex 102_1.htm
    }
    elseif ($did($dname,1).sel == 7) {
      set %tmpsitex 146_1.htm
    }
    elseif ($did($dname,1).sel == 8) {
      set %tmpsitex 103_1.htm
    }
    elseif ($did($dname,1).sel == 9) {
      set %tmpsitex 104_1.htm
    }
    elseif ($did($dname,1).sel == 10) {
      set %tmpsitex 105_1.htm
    }
    elseif ($did($dname,1).sel == 11) {
      set %tmpsitex 120_1.htm
    }
    elseif ($did($dname,1).sel == 12) {
      set %tmpsitex 181_1.htm
    }
    elseif ($did($dname,1).sel == 13) {
      set %tmpsitex 106_1.htm
    }
    elseif ($did($dname,1).sel == 14) {
      set %tmpsitex 182_1.htm
    }
    elseif ($did($dname,1).sel == 15) {
      set %tmpsitex 107_1.htm
    }
    elseif ($did($dname,1).sel == 16) {
      set %tmpsitex 121_1.htm
    }
    elseif ($did($dname,1).sel == 17) {
      set %tmpsitex 108_1.htm
    }
    elseif ($did($dname,1).sel == 18) {
      set %tmpsitex 109_1.htm
    }
  }
  if $did == 2 {
    did -r $dname 3
    siteX
  }
  if $did == 3 {
    set %sitexavoir $gettok($did($dname,3).seltext,-1,32) 
  }
  if $did == 4 {
    run %sitexavoir
  }
}

on *:dialog:sitex:dclick:3:{
  if (%sitexavoir != $null) { run %sitexavoir }
}

on 1:LOAD: { echo -a Loading réussi - C'est Chooo (indice) }
