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
HTML & templates / Re: server-side scripting
« on: August 04, 2016, 06:33:15 AM »
i solved problem with code
<script type="text/javascript">
$(document).ready(function(){
    $("select").ready(function(){
        $("#lista").load("http://localhost/template/pitanja-b.txt");
    });
});
   </script>

<select id="lista"   >
           
         </select>

but how i resolve that if is user memeber of group for example the budzet, he load file pitanja-b.txt, but if he is memeber of group the lokal, he load file the pitanja-l.txt?

thanks

32
HTML & templates / server-side scripting
« on: August 03, 2016, 10:03:21 AM »
i have a question. is template the Rawr Template Modules Mod v.0.1.3.m.1.5 or hfs http server have support for server side scripting. i want that my listbox on page get values from external file. if YES, can you give me some instruction?

thank's

33
i solved problem with format time but i cannot solve a problem:

when i upload the first file i receive picture attached with name first.jpg, but when i back on upload second file i receive picture attached with name second.jpg. in hfs.comment.txt i receive duplicate the write like

text.txt=text.txt; /test/statut; 22/07/2016;14:57:29; test
text.txt=text.txt=text.txt=text.txt; /test/bilans stanja; 22/07/2016;14:58:46; test
text1.xlsx=text1.xlsx; /test/bilans stanja; 22/07/2016;14:58:46; test


my code in diff template is

[upload-success]
{.inc|ok.}
<br/>
{.set|movedto|{.postvar|{.postvar|metodologija.}.}/set.}
{.switch|{.postvar|metodologija.}|,|
  1,2,3,4|{:{.mkdir|{.filepath|%item-resource%.}\{.^movedto.}\.}{.move|%item-resource%|%folder%{.^movedto.}/.} <p>Uspesno ste prebacili fajl. Fajl je premesten na lokaciju %folder%{.^movedto.}/ :}|
   0|{:<p>no move has been performed with this action selected:}| {:{.delete|%item-resource%.}<p>Niste izabrali tip dokumenta:}
/switch.}

{.append| %folder-resource%\hfs.comments.txt |{.filename|%item-resource%.}={.filename|%item-resource%.}; %folder%{.^movedto.}; {.time|%item-resource%|format=dd/mm/yyyy;hh:nn:ss.}; %user%
/append.}

34
how show time near date in format dd/mm/yyyy hh/mm?
i have a situation the first write is ok, but if i want upload one fileafter the previous entry  in hfs.comment.txt  i have two the write the previous and the second. how i disable this situation

35
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

36
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

37
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

38
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?

39
<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

40
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.

41
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

42
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?

43
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?

44
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