Jump to content

Recommended Posts

Script is running great!! Heavily modded.

Steve @ yabsoft has work well with me to get where I am now. Using script in an un-intended way.

Working site

Test Download link

Password: 12345

Yes this is my bike, 07 Police demo HD RoadKing...

After files have been uploaded by me or account holder, my issue is the download link created by this script. The script flow originally sends downloader to html asking if they are free user or Premium user. I do not use this feature.

I am attempting to have all downloadlinks go directly to enter password.

Bypassing the "Free user account/ Premium account" choices.

I have attached, download.php and the (in code quote below)skin/download.html & downloadlinks.inc.html..

Thank you for any help!!!

 

Have not figured out how to make download.php advance passed account type choices..

This code is from download.php, I believe is where I need to mod, to get download links to advance passed account type choices?

# begin download preparation
$download_choices = IS_POST&&(isset($input[Free])||isset($input[Premium])|| //Choose button
                    (isset($input[captchacode])||isset($input[downloadpw]))) //captcha OR password verify
                    ?0:1;
$template->assign_vars(array(
'download_choices'=>$download_choices,
'refer_url'=>$downloadurl,
));

## apply the download options by user group
#method 1:decide the downlaod options by the file
//$dl_group=$filerow[uid]==0?$user->guest_group:$user->groups[$filerow[gid]];
#method 2:decide the downlaod options by the user who try to download
$dl_group=$user->uid==0?$user->guest_group:$user->groups[$user->package_id];

 

download.html
<div>
<table width="728" cellspacing="1" class=tableborder cellpadding="0" border="0" align="center">
  <tr>
    <td align="center" colspan=2>
    <table cellspacing="1" cellpadding="5" border="0" align="left" class=tableborder width="100%">
     <tr class=titlerow height=18px>
       <td align=left colspan=4>{L_FileName}</td>
     </tr>
     <tr class=tdrow1>
       <td align=left width=100px><b>{L_FileName}:</b></td>
       <td align=left width=150px>{filename}</td>
       <td align=left width=100px><b>{L_FileDescription}:</b> </td>
       <td align=left>{descr}</td>
     </tr>
     <tr class=tdrow1>
       <td align=left><b>{L_FileSize}:</b></td>
       <td align=left>{filesize}</td>

     </tr>
     
     </tr>
     <tr class=tdrow1>
       <td align=center colspan=2>
       <!-- IF thumburl != '' -->
       <img src="{thumburl}" border=2>
       <!-- ENDIF -->
<br/>Thumbnail Preview
       </td>
<!-- IF download_choices == 1 -->
<TABLE cellPadding=1 width="748" border=0 class=tableborder cellSpacing=1  align="center">
<input type=hidden name=act value={login_act}>
<TBODY>
<TR>
<TD class=titlerow align=center height="26" align=left width=50%>
{L_RUFreeUsers}
</TD>
</TR>
<TR>
<TD align=center width=50% valign=middle>
<form name=entryform1 action="{downloadurl}" method=post>
<input type=submit class=button onclick="" name="Free" value="{L_FreeUsers}">
</form>
</TD>
</TR>
</TBODY>    
       </div>
<tr>
<td>
<script type="text/javascript">
try{
    var filelinks=new virtualpaginate({
    piececlass: "virtualpage",
    piececontainer: 'div',
    pieces_per_page: 1,
    defaultpage: 0,
    persist: false
    })
    filelinks.buildpagination(["paginatediv"])
}catch(e){}
</script>
       </td>
     </tr>
    </table>
  </td></tr>
  <TR>
    <TD vAlign=top>
      <!-- INCLUDE siteadleft.inc.html -->
    </TD>
    <TD vAlign=top>
      <!-- INCLUDE siteadright.inc.html -->
    </TD>
  </TR>
</table>
<br>

</form>


<!-- ELSE -->

<!-- IF errorcode -->
<div width="748" border=0 class=tableborder><span class=warn>{errorcode}</span></div><br>
<!-- ENDIF -->
   
<form name="validateform" action="{downloadurl}" method=post>
<table cellspacing="1" class="tableborder" cellpadding="0" border="0" width=748 class="borderup" align="center">
<!-- IF captcha_enabled -->
<tr><td align=right width=40%>
<img id=dynimg style="VERTICAL-ALIGN:middle" src="{baseWeb}/captcha.php">
</td><td align=left>
<input type=text class=textinput name=captchacode value=''>
<input type=button class=button onclick="document.getElementById('dynimg').src='{baseWeb}/captcha.php?rand='+Math.random();" value="{L_Redraw}">
</td></tr>
<!-- ENDIF -->
<!-- IF downloadpw_needed -->
<tr><td align=right>
{L_FilePassword}:
</td><td align=left><input type=text class=textinput name=downloadpw value=''>
</td></tr>
<!-- ENDIF -->
<!-- IF captcha_enabled || downloadpw_needed -->
<tr><td colspan=2 align=center>
<input type="submit" class="button" name="Update" value="Submit">
</td></tr>
<!-- ENDIF -->
</table>
</form>

<!-- BEGIN download_section -->
<table width=100% cellspacing="1" cellpadding="0" class=tableborder align=center>
<tr><td align=center class=tdrow1>
<input type=button id=downloadbtn class=warn name=downloadbtn value='{L_DownloadWait}' onclick='if(timeout>0) {alert("{L_DownloadWaitWarn}");return false;}document.location="{downloadfileurl}"; this.disabled=true;'>
<!--<img src="{downloadfileurl}">-->
</td></tr>
<tr><td align=center class=tdrow1>
<!-- IF support_accelerators -->
<span id=downloadfile style="display:none">
My Flirt Tube File Hosting assumes no responsiblity for condition, content or quality of hosted files
<br>
Download files at your own risk
<br>
Should you have trouble with your downloaded file, after successful download,
<br>
Please contact the Flirt you purchased file from. Ownership/copyrights belong to respective owners.
</span>



<!-- ENDIF -->
</td></tr>
</table>
<script type="text/javascript">
<!--
var timeout='{waittime}';

function countdown()
{
    if (timeout <= 0)
    {
      document.getElementById("downloadbtn").value = '{L_DownloadFile}!';
      if(document.getElementById("downloadfile"))document.getElementById("downloadfile").style.display = '';
    }
    if (timeout > 0)
    {
      document.getElementById("downloadbtn").value = '{L_DownloadWait}'+timeout+'{L_DownloadWait2}';
      setTimeout('countdown()',1000);
    }
    timeout--;
}
countdown();
-->
</script>
<!-- END download_section -->
<!-- ENDIF -->
<br>
<br>

</div>
________________________________________________________________________________
downloadlinks.inc.html
            <!-- show download links section start -->
            <div id="linksholder" style="DISPLAY: display">
            <div align=center>{L_CopyAllLinks}<input type=radio name="colseparator" id="colseparator" value="1" checked onchange="buildLinkCodes(codeid);">{L_HTMLLineBreak}<input type=radio name="colseparator" value="2" onchange="buildLinkCodes(codeid);">{L_PlainLineBreak}
<object width="16" height="16" id="clipboardall">
<param name="allowScriptAccess" value="always" />
<PARAM NAME=flashvars VALUE="js=copyLinks&param=all">
<param name="movie" value="{SKIN_DIR}/images/clipboard.swf">
<embed src="{SKIN_DIR}/images/clipboard.swf" name="clipboardall" allowScriptAccess="always" flashvars="js=copyLinks&param=all" width="16" height="16">
</embed>
</object><span id='copyinfo_all'></span>
            <br>
            <textarea class=textarea cols=80 rows=1 name="copyurl_all" style="display:none" id="copyurl_all" onclick="ClipBoard('copyurl_all');"></textarea>
            </div>
            <div id="paginatediv" class="paginationstyle" align="center">
            <a href="#" rel="previous">{L_PreviousPage}</a><select></select><a href="#" rel="next">{L_NextPage}</a>
            </div>
            <!-- BEGIN links -->
            <div class="virtualpage">
            <TABLE cellPadding=0 align=center border=0 width=100% cellspacing=0>
              <TBODY>
              <TR>
                <TD align=left width=150px>
                <!-- IF show_restart_link == 1 -->
                <A href="#" onClick="return overlay(this, 'uploadthumb_div{links.fileid}')"><img src="{SKIN_DIR}/images/upload.gif" border=0><b>{L_UploadThumb}</b></A><br />
                <!-- ENDIF -->
                <!-- IF links.showthumb -->
                <A href="{links.downloadurl}" target=blank><span id='link_{links.fileid}'><img id='thumb_{links.fileid}' src='{links.thumburl}' border=0></span></A>
                <!-- ELSE -->
                <A href="{links.downloadurl}" target=blank><span id='link_{links.fileid}'></span></A>
                <!-- ENDIF -->
                <DIV id="uploadthumb_div{links.fileid}" class=tableborder style="position:absolute; border: 1px solid orange; background-color: white; width: 300px; padding: 1px; display:none">
                <!-- IF links.can_makethumb -->
                <A href="#{links.fileid}" onclick="if(confirm('{L_MakeThumbInfo}')) {document.getElementById('uploadframe{links.fileid}').contentWindow.location='{links.remoteWeb}/uploadthumb.php?&s={links.s}&accessKey={links.accessKey}&act=make&id={links.fileid}';}"><B>{L_MakeThumb}</B></A>
                Or:
                <!-- ENDIF -->
                <form method="post" action="{links.remoteWeb}/uploadthumb.php?accessKey={links.accessKey}&s={links.s}" id="form{links.fileid}" name="form{links.fileid}" target="uploadframe" encType="multipart/form-data">
                <input type=hidden name=act value='upload'>
                <input type=hidden name=id value='{links.fileid}'>
                <input type=hidden name=sessid value='{links.uploadsession}'>
                <input type=file name=thumbfile>
                <input type=submit name=Upload value="Upload" >
                </form>
                </DIV>
                </TD>
                <TD align=center valign=top>
                <b><span id="name_{links.fileid}" title="{L_ClickEditTip}">{links.filename}</span></b>({links.filesize}) <a href="{baseWeb}/folders.php?&admin=1&act=add&folders=1&filelink={links.rawdownloadurl}" target=blank onclick="return myOpenWindow(this,650,450);"><img src="{SKIN_DIR}/images/add.gif" border=0>{L_AddToFolder}</a>
                <br><br>
                <SPAN style="COLOR: green"><B>{L_UDownLink}</B></SPAN>
                <A id=downloadhref href="{links.downloadurl}" target=_blank>
                <DIV id=downloadurl name="downloadurl">{links.downloadurl}</DIV></A>
                <SPAN style="COLOR: red"><B>{L_UDeleteLink}</B></SPAN><BR>
                <A id=filedelhref href="{links.deleteurl}" target=_blank>
                <DIV id=filedel name="filedel">{links.deleteurl}</DIV></A>
                </TD>
              </TR>
              <TR>
                <TD align=center colspan=2>
                <div id="paginatediv{links.fileid}" class="paginationstyle">
                <a href="#" rel="previous">{L_PreviousPage}</a> <span class="flatview"></span> <a href="#" rel="next">{L_NextPage}</a>
                </div>

<script type="text/javascript">
var codeid = 0;
{codes_array}
try{
    var filelinks=new virtualpaginate({
    piececlass: "virtualpage{links.fileid}",
    piececontainer: 'div',
    pieces_per_page: 1,
    defaultpage: 0,
    persist: false
    })
    filelinks.onturnpage = function(){
        codeid = (codeids[this.currentpage]);
        document.getElementById('codename').innerHTML = document.getElementById('codename_'+codeid).innerHTML
        buildLinkCodes(codeid);
    }
    filelinks.showpage(0)
    filelinks.buildpagination(["paginatediv{links.fileid}"])
}catch(e){}
</script>
                </TD>
              </TR>
<!-- IF show_restart_link == 1 || links.descr != '' -->
              <TR>
                <TD align=center colspan=2>
                <b>{L_FileDescr}</b><br><span id="descr_{links.fileid}" title="{L_ClickEditTip}">{links.descr}</span>
                </TD>
              </TR>
              <TR>
<!-- ENDIF -->
              </TR>
              </TBODY>
            </TABLE>
<!-- IF show_restart_link == 1 -->
     <script>
try{
    clickEditValues('{links.fileid}','clickeditform','descr','name');
}catch(e){}
     </script>
<!-- ENDIF -->
            </div>
<hr>
            <!-- END links -->
            <div align=center>

            <!-- IF show_restart_link == 1 -->
            <div align=center><a href="#" onclick="if(uploadresultswindow.isClosed) uploadresultswindow.close(); else uploadresultswindow.hide(); return newUploadSession()"><b>{L_StartNewUpload}</b></a></div>
            <!-- ENDIF -->
            </div>
<script type="text/javascript">
try{
    var filelinks=new virtualpaginate({
    piececlass: "virtualpage", //class of container for each piece of content
    piececontainer: 'div', //container element type (ie: "div", "p" etc)
    pieces_per_page: 1, //Pieces of content to show per page (1=1 piece, 2=2 pieces etc)
    defaultpage: 0, //Default page selected (0=1st page, 1=2nd page etc). Persistence if enabled overrides this setting.
    persist: true //Remember last viewed page and recall it when user returns within a browser session?
    })
    filelinks.buildpagination(["paginatediv"],[{uploaded_names}])
}catch(e){}
</script>
<DIV id="clickeditform_div" class=tableborder style="position:absolute; border: 1px solid orange; background-color: white; width: 300px; padding: 1px; display:none">
<form method="get" action="ajax.php" id="clickeditform" name="clickeditform">
<input type="hidden" name="act" VALUE="name" />
<input type="hidden" name="id" VALUE="0" />
<b>{L_EditTitle}:</b><br />
<textarea name=edits rows="2" cols="40"></textarea>
<br /><input value="Submit" type="button" onclick="AjaxSubmit('clickeditform');return false;"/>
</form>
</DIV>
            </div>
            <!-- show download links section end -->

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/208199-yabsoft-mfhs/
Share on other sites

I cannot believe I found it on the download.html

It was a simple as changing the download choices from

choices==1

to

choices==2

 

<!-- IF download_choices == 1 -->

<TABLE cellPadding=1 width="748" border=0 class=tableborder cellSpacing=1 align="center">

<input type=hidden name=act value={login_act}>

<TBODY>

Link to comment
https://forums.phpfreaks.com/topic/208199-yabsoft-mfhs/#findComment-1088887
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.