Jump to content

WinHTTP functions


trancexx
 Share

Recommended Posts

And if you run this:

#include <WinHTTP.au3>

Global $hHttpOpen = _WinHttpOpen()
If @error Then
    MsgBox(48, "Error", "Error initializing the usage of WinHTTP functions.")
    Exit
EndIf

Global $hHttpConnect = _WinHttpConnect($hHttpOpen, "192.168.3.88")
If @error Then
    MsgBox(48, "Error", "Error specifying the initial target server of an HTTP request.")
    _WinHttpCloseHandle($hHttpOpen)
    Exit
EndIf

Global $hHttpRequest = _WinHttpOpenRequest($hHttpConnect, "GET", "image.gif")
If @error Then
    MsgBox(48, "Error", "Error creating an HTTP request handle.")
    _WinHttpCloseHandle($hHttpConnect)
    _WinHttpCloseHandle($hHttpOpen)
    Exit
EndIf

_WinHttpSendRequest($hHttpRequest)
If @error Then
    MsgBox(48, "Error", "Error sending specified request.")
    _WinHttpCloseHandle($hHttpConnect)
    _WinHttpCloseHandle($hHttpOpen)
    Exit
EndIf

_WinHttpReceiveResponse($hHttpRequest)

If _WinHttpQueryDataAvailable($hHttpRequest) Then

    Global $sContentType = _WinHttpQueryHeaders($hHttpRequest, $WINHTTP_QUERY_CONTENT_TYPE)
    Global $iContentLength = _WinHttpQueryHeaders($hHttpRequest, $WINHTTP_QUERY_CONTENT_LENGTH)
    
    Global $bChunk, $bData
    While 1
        $bChunk = _WinHttpReadData($hHttpRequest, 2)
        If @error Then ExitLoop
        $bData = _WinHttpBinaryConcat($bData, $bChunk)
        If BinaryLen($bData) = $iContentLength Then ExitLoop
    WEnd

    Global $hFile = FileOpen("test" & StringReplace($sContentType, "/", "."), 26)
    FileWrite($hFile, $bData)
    FileClose($hFile)

Else

    ConsoleWrite("! Nothing available." & @CRLF)

EndIf

_WinHttpCloseHandle($hHttpRequest)
_WinHttpCloseHandle($hHttpConnect)
_WinHttpCloseHandle($hHttpOpen)

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Nah, its the same behaviour. I put a ConsoleWrite( BinaryLen($bData) & @CRLF);

just before the 2nd "...Then ExitLoop". And that's the output:

192
16384
24576
32768
35266
>Exit code: 0   Time: 15.142

The first 4 ConsoleWrites come instantly but the last one takes estimated 14.x seconds to show up.

aboy

Edited by aboy
Link to comment
Share on other sites

Nah, its the same behaviour. I put a ConsoleWrite( BinaryLen($bData) & @CRLF);

just before the 2nd "...Then ExitLoop". And that's the output:

192
16384
24576
32768
35266
>Exit code: 0   Time: 15.142

The first 4 ConsoleWrites come instantly but the last one takes estimated 14.x seconds to show up.

aboy

Well... I don't know ^_^

I cannot reproduce the situation.

All I can suggest more is for you to try to change user agent and add accept types. Like this maybe:

Global $hHttpOpen = _WinHttpOpen("Mozilla/5.0")

Global $hHttpConnect = _WinHttpConnect($hHttpOpen, "192.168.3.88")

Global $hHttpRequest = _WinHttpOpenRequest($hHttpConnect, "GET", "a/i/us/per/pr/dishonest-dating-92.jpg", "HTTP/1.1", $WINHTTP_NO_REFERER, " image/jpeg, image/gif, */*;q=0.1")

If that fails, then wait maybe for ProgAndy's opinion or anyone's...

If you find the solution (or the cause) eventually, please don't forget to post.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

No worries trancexx!

As ProgAndy assumed, the problem might be specific to my USB 2 Ethernet converter,

those are known to not behave like a proper network card.

Regarding to http://msdn.microsoft.com/en-us/library/aa384104(VS.85).aspx

there is the possibility to call GetLastError, maybe it will definetly tell me that it times

out and I can comfortably got to bed.

How is this GetLastError called from AutoIt and how does the _WinHttpReadData

have to be modified to ConsoleWrite the error?

Thanks

aboy

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

hello there am trying to convert vb to autoit3 am so confused how where to start

this is the code from my vb

accntString = "user=" & "username" & "&passwrd=" & "password" & "&cookielength=-1&hash_passwrd="

htmlstr = htmlstr & "POST /index.php?action=login2 HTTP/1.1" & vbCrLf
htmlstr = htmlstr & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19" & vbCrLf
htmlstr = htmlstr & "http://xxxxxxx/index.php" & vbCrLf
htmlstr = htmlstr & "Cache -Control: Max -age = 0" & vbCrLf
htmlstr = htmlstr & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
htmlstr = htmlstr & "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf
htmlstr = htmlstr & "Accept -Encoding: gzip , deflate, bzip2, sdch" & vbCrLf
htmlstr = htmlstr & "Accept -Language: en -US, en" & vbCrLf
htmlstr = htmlstr & "Accept-Charset: ISO-8859-1,*,utf-8" & vbCrLf
htmlstr = htmlstr & "Host: xxxxx.xxxxx.com" & vbCrLf
htmlstr = htmlstr & "Content-Length: " & Len(accntString) & vbCrLf
htmlstr = htmlstr & "Connection: Keep -Alive" & vbCrLf & vbCrLf
htmlstr = htmlstr & accntString

well its working in my program which i've written last year now am trying to convert it to autoit but i think am not that good to rewrite it again. hope somebody can give me a hand here. ty in advance.

Link to comment
Share on other sites

hello there am trying to convert vb to autoit3 am so confused how where to start

this is the code from my vb

accntString = "user=" & "username" & "&passwrd=" & "password" & "&cookielength=-1&hash_passwrd="

htmlstr = htmlstr & "POST /index.php?action=login2 HTTP/1.1" & vbCrLf
htmlstr = htmlstr & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19" & vbCrLf
htmlstr = htmlstr & "http://xxxxxxx/index.php" & vbCrLf
htmlstr = htmlstr & "Cache -Control: Max -age = 0" & vbCrLf
htmlstr = htmlstr & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
htmlstr = htmlstr & "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf
htmlstr = htmlstr & "Accept -Encoding: gzip , deflate, bzip2, sdch" & vbCrLf
htmlstr = htmlstr & "Accept -Language: en -US, en" & vbCrLf
htmlstr = htmlstr & "Accept-Charset: ISO-8859-1,*,utf-8" & vbCrLf
htmlstr = htmlstr & "Host: xxxxx.xxxxx.com" & vbCrLf
htmlstr = htmlstr & "Content-Length: " & Len(accntString) & vbCrLf
htmlstr = htmlstr & "Connection: Keep -Alive" & vbCrLf & vbCrLf
htmlstr = htmlstr & accntString

well its working in my program which i've written last year now am trying to convert it to autoit but i think am not that good to rewrite it again. hope somebody can give me a hand here. ty in advance.

That is string concatenation. You need help with what precisely?

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

sorry i cant edit above post.. i forgot to mention what exactly what am pointing of.

from page 1

#include "WinHTTP.au3"


$LocalIP = "192.168.3.1"

$hw_open = _WinHttpOpen()

$hw_connect = _WinHttpConnect($hw_open, $LocalIP)

$h_openRequest = _WinHttpOpenRequest($hw_connect, "POST", "restart.cgi")

_WinHttpSetCredentials($h_openRequest, $WINHTTP_AUTH_TARGET_SERVER, $WINHTTP_AUTH_SCHEME_BASIC, "admin", "admin")

_WinHttpSendRequest($h_openRequest, $WINHTTP_NO_ADDITIONAL_HEADERS, "restart=Restart?")

_WinHttpReceiveResponse($h_openRequest)

_WinHttpCloseHandle($h_openRequest)

_WinHttpCloseHandle($hw_connect)

_WinHttpCloseHandle($hw_open)

i tried to used it to make auto login script for my forum using the above concatinated string but i think i did not put the data in the right place. got recvd data from the forum of "200", means not successfully login.

my main purpose is to create a script that can check if the user of my program is a registered member or not. my vb code is working ok but need to provide files just to run that simple checking so i decided to used autoit. so thats it hope i state it clearly, and thnx for the reply. sorry for my bad english.

Link to comment
Share on other sites

sorry i cant edit above post.. i forgot to mention what exactly what am pointing of.

from page 1

#include "WinHTTP.au3"


$LocalIP = "192.168.3.1"

$hw_open = _WinHttpOpen()

$hw_connect = _WinHttpConnect($hw_open, $LocalIP)

$h_openRequest = _WinHttpOpenRequest($hw_connect, "POST", "restart.cgi")

_WinHttpSetCredentials($h_openRequest, $WINHTTP_AUTH_TARGET_SERVER, $WINHTTP_AUTH_SCHEME_BASIC, "admin", "admin")

_WinHttpSendRequest($h_openRequest, $WINHTTP_NO_ADDITIONAL_HEADERS, "restart=Restart?")

_WinHttpReceiveResponse($h_openRequest)

_WinHttpCloseHandle($h_openRequest)

_WinHttpCloseHandle($hw_connect)

_WinHttpCloseHandle($hw_open)

i tried to used it to make auto login script for my forum using the above concatinated string but i think i did not put the data in the right place. got recvd data from the forum of "200", means not successfully login.

my main purpose is to create a script that can check if the user of my program is a registered member or not. my vb code is working ok but need to provide files just to run that simple checking so i decided to used autoit. so thats it hope i state it clearly, and thnx for the reply. sorry for my bad english.

Try something like this:

#include "WinHTTP.au3"


$sUsername =  "crashburn"
$sPassword = "Top-Secret"

$LocalIP = "192.168.3.1"

$hOpen = _WinHttpOpen()

$hConnect = _WinHttpConnect($hOpen, $LocalIP)

$hRequest = _WinHttpOpenRequest($hConnect, "POST", "index.php?action=login2");, "HTTP/1.1", $WINHTTP_NO_REFERER, "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5")

_WinHttpSendRequest($hRequest, $WINHTTP_NO_ADDITIONAL_HEADERS, "user=" & $sUsername & "&passwrd=" & $sPassword & "&cookielength=-1&hash_passwrd=")

_WinHttpReceiveResponse($hRequest)

;....... blah, blah

_WinHttpCloseHandle($hRequest)

_WinHttpCloseHandle($hConnect)

_WinHttpCloseHandle($hOpen)

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

ty for the reply. after my post i tried it once more to see if i can make it in auto it.

heres what i made :D

Opt('MustDeclareVars', 1)

Example()
Func Example()

    Local $szIPADDRESS = "xxxxx.xxxx.com"
    Local $nPORT = 80
    Local $MainSocket, 
    Local $recv
    local $accntString
    local $htmlstr

       ;$htmlstr = concatination string here

; Start The TCP Services
;==============================================
    TCPStartup()        
;==============================================
    $MainSocket = TCPNameToIP($szIPADDRESS)
    $MainSocket = TCPConnect($MainSocket, $nPORT)
    sleep(200)
    TCPSend($MainSocket, $htmlstr)
    sleep(100)
    do
    ;----------------------------------------------------------------
        $recv = TCPRecv($MainSocket ,65434)
        MsgBox(0,"",$recv)
    Until $recv <> ""
    msgbox(0,"",StringMid($recv,10,3));if failed, result is 200
    TCPShutdown()
EndFunc  ;==>Example

ty again...

Link to comment
Share on other sites

What do you mean: "if failed, result is 200" ? :D

ummm sir my idea is to login to the forum. let say if my login information is incorrect, the forum will send an error msg with value of 200; but if success the script should recvd a value of 302; well dunno if this is correct.

"if failed, result is 200" is just a comment to remind me that i should put a condition there after I recvd the data.

Link to comment
Share on other sites

ummm sir my idea is to login to the forum. let say if my login information is incorrect, the forum will send an error msg with value of 200; but if success the script should recvd a value of 302; well dunno if this is correct.

"if failed, result is 200" is just a comment to remind me that i should put a condition there after I recvd the data.

2xx are not error messages. Explanation is:

200 - The request has succeeded <- click that

But, you are right. You need different respond.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Hi Trancexx,

I'm using _IE function to do this

Func _LoginSpace($Username, $Password)
    $oIE = _IECreate("http://space.livevn.com/index.php", 0, 0)
    $oForm = _IEFormGetObjByName($oIE, "loginform")
    $UserForm = _IEFormElementGetObjByName($oForm, "username")
    _IEFormElementSetValue($UserForm, $Username)
    $PassForm = _IEFormElementGetObjByName($oForm, "password")
    _IEFormElementSetValue($PassForm, $Password)
    _IEFormSubmit($oForm)
    $title = _IEPropertyGet($oIE, "title")
    If StringLeft($title, 3) = " - " Then
        ;Login success
        Return 1
    Else
        ;Login failed. Wrong ID or Password
        Return -1
    EndIf
    _IEQuit($oIE)
EndFunc

Can i do it if use WinHTTP.au3 UDF?

Thanks,

UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

Hi Trancexx,

I'm using _IE function to do this

Func _LoginSpace($Username, $Password)
    $oIE = _IECreate("http://space.livevn.com/index.php", 0, 0)
    $oForm = _IEFormGetObjByName($oIE, "loginform")
    $UserForm = _IEFormElementGetObjByName($oForm, "username")
    _IEFormElementSetValue($UserForm, $Username)
    $PassForm = _IEFormElementGetObjByName($oForm, "password")
    _IEFormElementSetValue($PassForm, $Password)
    _IEFormSubmit($oForm)
    $title = _IEPropertyGet($oIE, "title")
    If StringLeft($title, 3) = " - " Then
        ;Login success
        Return 1
    Else
        ;Login failed. Wrong ID or Password
        Return -1
    EndIf
    _IEQuit($oIE)
EndFunc

Can i do it if use WinHTTP.au3 UDF?

Thanks,

Sure, it would be something like this for your case:

#include "WinHTTP.au3"


$sUsername = "user"
$sPassword = "pass"

$sAddress = "space.livevn.com"

$hOpen = _WinHttpOpen()

$hConnect = _WinHttpConnect($hOpen, $sAddress)

$hRequest = _WinHttpOpenRequest($hConnect, "POST", "/do.php?ac=71ee30ae117cddace55bd01714904227&&ref", "HTTP/1.1", "http://space.livevn.com/index.php", "*/*")

_WinHttpSendRequest($hRequest, _
        $WINHTTP_NO_ADDITIONAL_HEADERS, _; <- cookie here?
        "username=" & $sUsername & "&password=" & $sPassword & "&loginsubmit=&loginsubmit=loginnnnnnnnnnn&refer=network.html&formhash=c51a94db")

_WinHttpReceiveResponse($hRequest)


If _WinHttpQueryDataAvailable($hRequest) Then
    Global $sHeader = _WinHttpQueryHeaders($hRequest)
    ConsoleWrite($sHeader & @CRLF & @CRLF)
    Global $sChunk, $sData, $extended
    While 1
        $sChunk = _WinHttpReadData($hRequest, 1)
        If @error Then ExitLoop
        $sData &= $sChunk
    WEnd

    ConsoleWrite($sData & @CRLF)
    #cs
        Global $sFile = @DesktopDir & "\space.livevn.htm"
        Global $hFile = FileOpen($sFile, 2)
        FileWrite($hFile, $sData)
        FileClose($hFile)
    #ce
Else
    MsgBox(48, "Error", "Site is experiencing problems.")
EndIf



_WinHttpCloseHandle($hRequest)

_WinHttpCloseHandle($hConnect)

_WinHttpCloseHandle($hOpen)

What's to be noticed? Cookie part is missing.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

I've been using these functions a while, but now i stucked.

I created a script for my web page, to get some stuff from it, but now I try to send some message to it.

My problem is when I send the POST message with the given data it sends in an other packet. My browser doesn't splits this data apart from the header, and it sends almost the same http code as my script. Is it possible not to split this data?

My script sends these:

Packet #1:

POST /index.php? HTTP/1.1
Referer: http://www.mypage.com
Accept:
Content-Type: multipart/form-data; boundary=FGOPPTuB
Content-Length: 167
Referer: http://www.mypage.com/index.php?act=post
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
Host: www.mypage.com
Connection: Keep-Alive
Cookie: session_id=c43e25e5c25c12907d8f90aea6e05f16

Packet #2:

--FGOPPTuB
Content-Disposition: form-data; name="User"

Admin
--FGOPPTuB
Content-Disposition: form-data; name="Message"

Some message comes here
--FGOPPTuB--

My browser sends this (FF v3.5):

POST /index.php? HTTP/1.1
Host: www.mypage.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.mypage.com/index.php?act=post
Cookie: session_id=769f31985d8cf428643a62c9b802de51
Content-Type: multipart/form-data; boundary=---------------------------12052273501150
Content-Length: 266

-----------------------------12052273501150
Content-Disposition: form-data; name="User"

Admin
-----------------------------12052273501150
Content-Disposition: form-data; name="Message"

Some message comes here
-----------------------------12052273501150--

Part of my script:

Const $BOUNDARY = _RandomString()
$Data = '--' & $BOUNDARY & @CRLF & _
 'Content-Disposition: form-data; name="User"' & @CRLF & _
 '' & @CRLF & _
 'Admin' & @CRLF & _
 '--' & $BOUNDARY & @CRLF & _ & @CRLF & _
 'Content-Disposition: form-data; name="Message"' & @CRLF & _
 '' & @CRLF & _
 'Some message comes here' & @CRLF & _
 '--' & $BOUNDARY & '--' & @CRLF
$sHeaders = "Content-Type: multipart/form-data; boundary=" & _RandomString() & @CRLF
$sHeaders &= "Content-Length: " & StringLen($Data) & @CRLF
$sHeaders &= "Referer: http://www.mypage.com/index.php?act=post"
_WinHttpSendRequest($hRequest, $sHeaders, $Data, StringLen($Data))

I'm not sure if this is the problem, but i tried to replace the headers to the same as the browsers, but without any success. I appreciate any other advices!

Edited by Izebize
Link to comment
Share on other sites

Hi Trancexx ,

How can i submit this form?

<div class="c_form">
<form enctype="multipart/form-data" action="cp.php?ac=blog&amp;blogid=" method="post">
<table width="100%" cellspacing="4" cellpadding="4" class="infotable">
<tbody><tr>
<td>
<select onchange="addSort(this)" id="classid" name="classid">
<option value="0">Chọn phân loại</option>
<option style="color: red;" value="addoption">+ phân loại mới</option></select>
<input type="text" onblur="relatekw();" size="60" value="" name="subject" id="subject" class="t_input"/>
</td>
</tr>

<tr>
<td>
<textarea style="border: 0px none ; height: 100%; width: 100%; display: none;" id="uchome-ttHtmlEditor" name="message" class="userData"/>
<iframe scrolling="no" height="400" frameborder="0" style="border: 1px solid rgb(197, 197, 197); width: 100%;" border="0" id="uchome-ifrHtmlEditor" name="uchome-ifrHtmlEditor" src="editor.php?charset=utf-8&amp;allowhtml="/>
</td>
</tr>
</tbody></table>
<table width="100%" cellspacing="4" cellpadding="4" class="infotable">
<tbody><tr>
<th width="100">Tag</th>
<td><input type="text" value="" name="tag" id="tag" size="40" class="t_input"/> <input type="button" onclick="relatekw();" class="button" value="Tự động nhận" name="clickbutton[]"/></td>
</tr>
<tr>
<th>Thiết lập cá nhân</th>
<td>
<select onchange="passwordShow(this.value);" name="friend">
<option value="0">Mọi người dùng đều có thể xem</option>
<option value="1">Tất cả bạn bè đều có thể xem</option>
<option value="2">Chỉ bạn bè chỉ định mới có thể xem</option>
<option value="3">Chỉ bản thân mới có thể xem</option>
<option value="4">Xem dựa vào mật khẩu</option>
</select>
<span style="display: none;" id="span_password">Mật khẩu:<input type="text" size="10" value="" name="password"/></span>
<input type="checkbox" value="1" name="noreply"/> Không cho phép bình luận
</td>
</tr>
</tbody><tbody style="display: none;" id="tb_selectgroup">
<tr>
<th>Bạn bè chỉ định</th>
<td><select onchange="getgroup(this.value);" name="selectgroup">
<option value="">Chọn bạn từ trong nhóm bạn bè</option>
<option value="0">Khác</option>
<option value="1">Quen thông qua trang này</option>
<option value="2">Quen thông qua hoạt động</option>
<option value="3">Quen thông qua bạn bè</option>
<option value="4">Người thân</option>
<option value="5">Đồng nghiệp</option>
<option value="6">Bạn học</option>
<option value="7">Không quen</option>
</select> Chọn nhiều lần sẽ tích luỹ vào danh sách bạn bè bên dưới</td>
</tr>
<tr>
<th> </th>
<td>
<textarea rows="3" style="width: 85%;" id="target_names" name="target_names"/>
<br/>(Có thể điền nhiều tên bạn bè, vui lòng dùng khoảng trắng để phân cách)</td>
</tr>
</tbody>
</table>
<input type="hidden" value="true" name="blogsubmit"/>
<input type="button" style="display: none;" onclick="validate(this);" value="Gửi thông báo" name="blogbutton" id="blogbutton"/>
<input type="hidden" value="dd3caa53" name="formhash"/>
</form>
<table width="100%" cellspacing="4" cellpadding="4" class="infotable">
<tbody><tr><th width="100">Ảnh</th><td>
<input type="button" onclick="window.open('cp.php?ac=upload&amp;op=flash')" class="button" value="Upload ảnh" name="clickbutton[]"/>
<input type="button" onclick="edit_album_show('album')" class="button" value="Chèn ảnh" name="clickbutton[]"/>
</td></tr>
</tbody></table>
<table width="100%" cellspacing="4" cellpadding="4" style="display: none;" class="infotable" id="uchome-edit-pic">
<tbody><tr>
<th width="100"> </th>
<td>
<strong>Chọn ảnh</strong>: 
<table cellspacing="2" cellpadding="0" summary="Upload">
<tbody style="display: none;" id="attachbodyhidden">
<tr>
<td>
<form style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" target="uploadframe" enctype="multipart/form-data" action="cp.php?ac=upload" id="upload" method="post">
<input type="file" style="border: 1px solid rgb(204, 204, 204);" name="attach"/>
<span id="localfile"/>
<input type="hidden" value="true" id="uploadsubmit" name="uploadsubmit"/>
<input type="hidden" value="0" id="albumid" name="albumid"/>
<input type="hidden" value="dd3caa53" name="formhash"/>
</form>
</td>
</tr>
</tbody>
<tbody id="attachbody"><tr>
<td>
<form style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" target="uploadframe" enctype="multipart/form-data" action="cp.php?ac=upload" id="upload_1" method="post">
<input type="file" style="border: 1px solid rgb(204, 204, 204);" name="attach" id="attach_1"/>
<span id="localfile_1"/>
<input type="hidden" value="true" id="uploadsubmit" name="uploadsubmit"/>
<input type="hidden" value="0" id="albumid_1" name="albumid"/>
<input type="hidden" value="dd3caa53" name="formhash"/>
</form>
</td>
</tr></tbody>
</table>
<strong>Lưu vào album</strong>: 
<table cellspacing="2" cellpadding="0">
<tbody><tr>
<td>
<select onchange="addSort(this)" id="uploadalbum" name="albumid">
<option value="0">Vui lòng chọn album</option>
<option style="color: red;" value="addoption">+ album mới tạo</option>
</select>
<script type="text/javascript" src="source/script_upload.js"/>
<iframe width="0" height="0" frameborder="0" src="about:blank" marginwidth="0" name="uploadframe" id="uploadframe"/>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<table width="100%" cellspacing="4" cellpadding="4" style="display: none;" id="uchome-edit-album" class="infotable">
<tbody><tr>
<th width="100"> </th>
<td>
Chọn album: <select onchange="picView(this.value)" name="view_albumid">
<option value="none">Chọn 1 album</option>
<option value="0">Album mặc định</option>
</select> (Nhấp vào ảnh để chèn vào nội dung)
<div id="albumpic_body"/>
</td>
</tr>
</tbody></table>
<table width="100%" cellspacing="4" cellpadding="4" class="infotable">
<tbody><tr>
<th width="100"> </th>
<td><input type="button" class="submit" value="Lưu bài viết" onclick="document.getElementById('blogbutton').click();" id="issuance"/></td>
</tr>
</tbody></table>
</div>
Edited by nguyenbason
UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...