rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gogi1000

Pages: 1 2 3
31
ok for

{.if| {.length|%user%.} |{: {.append| %folder-resource%\{.^movedto.}\hfs.comments.txt |{.filename|%item-resource%.}=%folder%{.^movedto.}, {.time|%item-resource%|format=dd/mm/yyyy.}, %user%
/append.} :}/if.}

but how everytime when new file uploaded i make the write in file hfs.comment.txt in new line like this format

text.txt,/test/bilans stanja,19/07/2016, user
blabla.txt,/test/statut,19/07/2016,user1
.......

thanks

32
i changed your code in part

{.if| {.length|%user%.} |{:{.append| C:\Users\user\Desktop\httpserver\hfs.comments.txt |{.filename|%item-resource%.}, %folder%{.^movedto.}, {.time|%item-resource%|format=dd/mm/yyyy.}, %user%  /append.} :}/if.}

but i want that every time when file uploaded, in hfs.comment.txt  new line text typed in the hfs.comment.txt
how?
txks

33
sorry,

no, you dont understand

two options checked -> file is first duplicated inside BS, and is moved next to STATUS
1 option checked -> file is  moved to the "checked" folder
0 option checked ->  file remains in the upload folder

before uploading

select first element in listbox: 1 option checked

after uploading file

file is  moved to the "checked" folder

before uploading

select second element in listbox: 2 option checked
 i choose another file for uploading

after uploading file
 
file is  moved to the second "checked" folder

i hope that you understand me

34
I used your code

  {.if|{.=|{.^#bs.}| 2.}|{: {.move|%item-resource%|%folder%/bilans stanja/%item-name%.}:}/if.}
      {.if|{.=|{.^#statut.}|1.}|{: {.move|%item-resource%|%folder%/statut/%item-name%.}:}/if.}
:}/if.}

but when i select element in which is set variable #statut, after uploading file, this file is moving in folder bilans stanja, not in statut. The first line is executing in hfs event, not the second line. Why?
What i do?

35
<quote> and in addition it is not possible in the second line to move something that is no longer in the place where it is supposed to be
</quote>

the second line for moving in another folder in hfs events i use if is selected second element in template after uploading file, then the file is the place where it is supposed to be

36
in template i created function
<script type="text/javascript">
function izbor() {
      if(document.getElementById("lista").selectedIndex = 2)
      {
      {.set|#bs|2.}
      }
         if(document.getElementById("lista").selectedIndex = 1)
      {
      {.set|#statut|1.}
      }
}
</script>
 <form >
         <select id="lista" name="metodologija"  onclick="javascript:izbor();">
         <option value="" ></option>
  <option value="statut" >statut</option>
  <option value="bilans stanja" >bilans stanja</option>
  <option value="racunovodstvena dokumentacija" >racunovodstvena dokumentacija</option>
  <option value="javne nabavke" >javne nabavke</option>
</select>
</form>
that set variable #bs on 2 if is selected second element  in listbox
and in hfs events
i check this variable

[+upload completed]

{.if|{.^#bs.}==2|{.move|%item-resource%|%folder%/bilans stanja/%item-name%.}.}
{.if|{.^#statut.}==1|{.move|%item-resource%|%folder%/statut/%item-name%.}.}


but if statement is not working, if i have for example two if statement just is working first move command {.move|%item-resource%|%folder%/bilans stanja/%item-name%.} and nothing other.

37
i'm found solution using script events with variable but i don't know how get value of variable. the variable have path where i want move file but i don't know how use this path in command move  {.move|%item-resource%|{.^statut.}%item-name%.}. code in hfs events is

[+upload completed]
{.if|{.^statut.}|{.move|%item-resource%|{.^statut.}%item-name%.}.}

code in template is

[upload]
<!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">
{.$copyright.}
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>{.!lv_upload.}</title>
   <link rel="shortcut icon" href="/favicon.ico"/>
   <script type="text/javascript" src="/template/rawr_default/code/rawr_main.js"></script>
   <script type="text/javascript">
      var theme="{.!theme.}";
      var mod_statistics="{.!mod_statistics.}";
      //Language Strings
      var lv_hideTitle="{.!lv_hideTitle.}";
      var lv_showTitle="{.!lv_showTitle.}";
      
       function RegainFocus() {

      if((document.getElementById("lista").value).length == 0) {

        document.getElementById("kontrola").style.display = 'none';

      }
     else
     {
       document.getElementById("kontrola").style.display = 'block';
      if(document.getElementById("lista").selectedIndex = 1)
      {
      {.set|statut|C:\Users\gljubic.DRI\Desktop\httpserver\statut\.}
      }
      if(document.getElementById("lista").selectedIndex = 2)
      {
      {.set|statut|C:\Users\gljubic.DRI\Desktop\httpserver\bilans stanja\.}
      }
      if(document.getElementById("lista").selectedIndex = 3)
      {
      {.set|statut|C:\Users\gljubic.DRI\Desktop\httpserver\javne nabavke\.}
      }
      if(document.getElementById("lista").selectedIndex = 4)
      {
      {.set|statut|C:\Users\gljubic.DRI\Desktop\httpserver\racunovodstvena dokumentacija\.}
      }
     }

    }     
   </script>
   <link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
   <noscript><style type="text/css">.hide{display:none}#f1,#f2,#f3,#f4,#f5,#f6,#f7,#f8,#f9{display:block}</style></noscript>
   <!--[if lte IE 6]>
      <style type="text/css">#mainInner{width:980px}</style>
      <noscript><style type="text/css">#mainInner{width:100%}</style></noscript>
   <![endif]-->
</head>
<body>
<div id="mainOuter">
<div id="mainInner"><div id="mainInner1"><div id="mainInner2"><div id="mainInner3">
   <div id="header">
      <div>
         <div id="bCrumbs">{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!lv_home.}.}/</a>:}.}</div>
      </div>
   </div>
   <div id="content">
      <div id="navbar">
         <noscript>
            <div class="biggerBtn"><a href="~upload" target="_top"><span>{.!lv_closeTransfers.}</span></a></div>
         </noscript>
         <div class="biggerBtn">
            <a href="javascript:void(0);" onclick="window.open('/~progress','{.!lv_transfers.}','width=300,height=500,left=100,top=100,scrollbars=1,resizable=1');" class="hide"><span>{.!lv_openTransfers.}</span></a>
            <noscript><a href="~upload+progress" target="_top"><span>{.!lv_openTransfers.}</span></a></noscript>
         </div>
         {.if|{.{.!btn_back.}=on.}|<div id="backBtn"><a href="%encoded-folder%" target="_parent"><span>{.!lv_back.}</span></a></div>.}
      </div>
      <table cellspacing="0" cellpadding="0" border="0" width="100%">
      <tr>
         <td width="100%" valign="top" id="tableCol">
            %folder-comment%
            <div class="contModule">
               <div class="contHeading">
{.if|{.{.!mod_statistics.}=on.}|
                  <span class="hide">
                     <a href="javascript:pinModule('moduleCol');" id="moduleCol_Link" title="{.!lv_hideTitle.}"><img src="/template/{.!theme.}/images/show.gif" align="top" alt=""/></a>
                  </span>
.}
                  &nbsp;
               </div>
               <div class="contContent" align="center" >
               
                  <form action="%encoded-folder%" id="kontrola" hidden name="upfrm" target="_parent" method="post" enctype="multipart/form-data"  onsubmit="disableBtns();">
                     <input class="uploadInput"  name="upbtn" value="{.!lv_upload.}" type="submit"/>
                     <input class="uploadInput hide"  name="more" onclick="addInput();" value="{.!lv_addInput.}" type="button"/><br/>
                     <input type="file" name="fileupload1"  size="40"/>
                     <input id="f1" type="file" name="fileupload2" size="40"/>
                     <input id="f2" type="file" name="fileupload3" size="40"/>
                     <input id="f3" type="file" name="fileupload4" size="40"/>
                     <input id="f4" type="file" name="fileupload5" size="40"/>
                     <input id="f5" type="file" name="fileupload6" size="40"/>
                     <input id="f6" type="file" name="fileupload7" size="40"/>
                     <input id="f7" type="file" name="fileupload8" size="40"/>
                     <input id="f8" type="file" name="fileupload9" size="40"/>
                     <input id="f9" type="file" name="fileupload10" size="40"/>
                  </form>
                  
               </div>
            </div>
         </td>
           <td width="100%" valign="top" id="tableCol">
         <div class="contModule">
               <div class="contHeading">
               Изаберите тип документа
                     </div>
               <div class="contContent" align="center">
         <form>
         <select id="lista" name="metodologija" onclick="javascript:RegainFocus();">
         <option value="" selected="selected" ></option>
  <option value="statut" >statut</option>
  <option value="bilans stanja" >bilans stanja</option>
  <option value="racunovodstvena dokumentacija" >racunovodstvena dokumentacija</option>
  <option value="javne nabavke" >javne nabavke</option>
</select>
</form>

can you help me

38
i m begginer in macros for hfs http server. i have some questions, can i create section [upload completed] in template and this section i type code or i must set this section in hfs.events file? how i pass to value of listbox selected element to hfs macro variable?

39
i tryed with this code in template but nothing

 <option value="statut" onclick="{.set|statut|C:\Users\gljubic.DRI\Desktop\httpserver\statut\.}">statut</option>
  <option value="bilans stanja" onclick="{.set|bilans stanja|%item-folder%/bilans stanja/.}">bilans stanja</option>
  <option value="racunovodstvena dokumentacija" onclick="{.set|racunovodstvena dokumentacija|%item-folder%/racunovodstvena dokumentacija/.}">racunovodstvena dokumentacija</option>
  <option value="javne nabavke" onclick="{.set|javne nabavke|%item-folder%/javne nabavke/.}">javne nabavke</option>
</select>
</form>
</div></div>
</td>
      </tr>
      </table>
   </div>
   <div id="footer">
      <br/>
      
   </div>
</div></div></div></div>
</div>
<script type="text/javascript">pageLoad()</script>
</body>
</html>
[upload completed]
{.if|{.exists|{.call|statut.}.}|{.move|%item-resource%|C:\Users\gljubic.DRI\Desktop\httpserver\statut.}.}

can you help me?

40
i have listbox in upload page. i want that after upload files on server i move those files on location that is set selected element in list box.

my upload page is

<code>[upload]
<!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">
{.$copyright.}
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>{.!lv_upload.}</title>
   <link rel="shortcut icon" href="/favicon.ico"/>
   <script type="text/javascript" src="/template/rawr_default/code/rawr_main.js"></script>
   <script type="text/javascript">
      var theme="{.!theme.}";
      var mod_statistics="{.!mod_statistics.}";
      //Language Strings
      var lv_hideTitle="{.!lv_hideTitle.}";
      var lv_showTitle="{.!lv_showTitle.}";
      
       function RegainFocus() {

      if((document.getElementById("lista").value).length == 0) {

        document.getElementById("kontrola").style.display = 'none';

      }
     else
     {
       document.getElementById("kontrola").style.display = 'block';
     }

    }     
   </script>
   <link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
   <noscript><style type="text/css">.hide{display:none}#f1,#f2,#f3,#f4,#f5,#f6,#f7,#f8,#f9{display:block}</style></noscript>
   <!--[if lte IE 6]>
      <style type="text/css">#mainInner{width:980px}</style>
      <noscript><style type="text/css">#mainInner{width:100%}</style></noscript>
   <![endif]-->
</head>
<body>
<div id="mainOuter">
<div id="mainInner"><div id="mainInner1"><div id="mainInner2"><div id="mainInner3">
   <div id="header">
      <div>
         <div id="bCrumbs">{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!lv_home.}.}/</a>:}.}</div>
      </div>
   </div>
   <div id="content">
      <div id="navbar">
         <noscript>
            <div class="biggerBtn"><a href="~upload" target="_top"><span>{.!lv_closeTransfers.}</span></a></div>
         </noscript>
         <div class="biggerBtn">
            <a href="javascript:void(0);" onclick="window.open('/~progress','{.!lv_transfers.}','width=300,height=500,left=100,top=100,scrollbars=1,resizable=1');" class="hide"><span>{.!lv_openTransfers.}</span></a>
            <noscript><a href="~upload+progress" target="_top"><span>{.!lv_openTransfers.}</span></a></noscript>
         </div>
         {.if|{.{.!btn_back.}=on.}|<div id="backBtn"><a href="%encoded-folder%" target="_parent"><span>{.!lv_back.}</span></a></div>.}
      </div>
      <table cellspacing="0" cellpadding="0" border="0" width="100%">
      <tr>
         <td width="100%" valign="top" id="tableCol">
            %folder-comment%
            <div class="contModule">
               <div class="contHeading">
{.if|{.{.!mod_statistics.}=on.}|
                  <span class="hide">
                     <a href="javascript:pinModule('moduleCol');" id="moduleCol_Link" title="{.!lv_hideTitle.}"><img src="/template/{.!theme.}/images/show.gif" align="top" alt=""/></a>
                  </span>
.}
                  &nbsp;
               </div>
               <div class="contContent" align="center" >
               
                  <form action="%encoded-folder%" id="kontrola" hidden name="upfrm" target="_parent" method="post" enctype="multipart/form-data"  onsubmit="disableBtns();">
                     <input class="uploadInput"  name="upbtn" value="{.!lv_upload.}" type="submit"/>
                     <input class="uploadInput hide"  name="more" onclick="addInput();" value="{.!lv_addInput.}" type="button"/><br/>
                     <input type="file" name="fileupload1"  size="40"/>
                     <input id="f1" type="file" name="fileupload2" size="40"/>
                     <input id="f2" type="file" name="fileupload3" size="40"/>
                     <input id="f3" type="file" name="fileupload4" size="40"/>
                     <input id="f4" type="file" name="fileupload5" size="40"/>
                     <input id="f5" type="file" name="fileupload6" size="40"/>
                     <input id="f6" type="file" name="fileupload7" size="40"/>
                     <input id="f7" type="file" name="fileupload8" size="40"/>
                     <input id="f8" type="file" name="fileupload9" size="40"/>
                     <input id="f9" type="file" name="fileupload10" size="40"/>
                  </form>
                  
               </div>
            </div>
         </td>
           <td width="100%" valign="top" id="tableCol">
         <div class="contModule">
               <div class="contHeading">
               Изаберите тип документа
                     </div>
               <div class="contContent" align="center">
         <form>
         <select id="lista" name="metodologija" onclick="javascript:RegainFocus();">
         <option value="" selected="selected" ></option>
  <option value="statut">statut</option>
  <option value="bilans stanja">bilans stanja</option>
  <option value="racunovodstvena dokumentacija">racunovodstvena dokumentacija</option>
  <option value="javne nabavke">javne nabavke</option>
</select>
</form>
</div></div>
</td>
      </tr>
      </table>
   </div>
   <div id="footer">
      <br/>
      
   </div>
</div></div></div></div>
</div>
<script type="text/javascript">pageLoad()</script>
</body>
</html>
</code>

how i resolve this problem that i use macro or javascript?can you help me?

Pages: 1 2 3