filelist_common_header.php
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 4k
Category:

WEB Mail

Development Platform:

PHP

  1. <html>
  2. <head>
  3. <link rel="stylesheet" type="text/css" href="<?php echo $_INT['theme_path'].'pat_style.css'; ?>">
  4. <script language="JavaScript">
  5. <!--
  6. var selected_bg_color = "<?php echo $_INI[selected_item_color]; ?>";
  7. var Nom;
  8. var ie;
  9. var ns;
  10. var op;
  11. var ver;
  12. Nom = navigator.appName;
  13. ver = navigator.appVersion;
  14. ns = (Nom == 'Netscape') ? 1:0  ;
  15. ie = (Nom == 'Microsoft Internet Explorer') ? 1:0 ;
  16. op = (Nom == 'Opera') ? 1:0 ;
  17. function switch_selected_state(element_number,tr_obj)
  18. {
  19.     var theForm;
  20.     var theField;
  21.     theField = document.data_container_element_table.elements[element_number];
  22.   
  23.     state = theField.value;
  24.     newstate = 1 - state;
  25.   
  26.     theField.value = newstate;
  27. }
  28. /***************************************************************
  29.  *
  30.  *  this function always check that backgroung correspond to 
  31.  *  form status : if element is selected or not
  32.  *
  33.  ***************************************************************/
  34. function getElById(idVal) 
  35. {
  36.     if (document.getElementById != null)
  37.         return document.getElementById(idVal);
  38.     
  39.     if (document.all != null)
  40.         return document.all[idVal];
  41.     alert("Problem getting element by id");
  42.     return null;
  43. }
  44. function update_visual()
  45. {    
  46.     total_elmnt = document.data_container_element_table.total_elements.value;
  47.     
  48.     for (i=0;i<total_elmnt;i++)
  49.     {
  50.         Obj = getElById('element_name_'+i);
  51.         current_state = document.data_container_element_table.elements[(i*2)].value + 0;        
  52.         current_state = parseInt(current_state);
  53.         if (current_state != 0)
  54.         {            
  55.             Obj.style.backgroundColor = selected_bg_color;
  56.         }
  57.         else
  58.         {
  59.             Obj.style.backgroundColor = '';
  60.         }        
  61.     }
  62.     
  63.     // refresh rate in ms
  64.     setTimeout("update_visual()",200);
  65. }
  66. /****************************************************************
  67.  *
  68.  *   RIGHT CLICK HANDLER 
  69.  *
  70.  ****************************************************************/
  71. function buttoncheck(e) 
  72. {
  73.     //ie    
  74.     if(document.all && event.button==2) 
  75.         showwindow();
  76.     //ns
  77.     if(document.layers && e.which==3)
  78.         showwindow();
  79.     
  80.     <?php if ($_INI['disable_context_menu']) echo "return false;n"; ?>
  81. }
  82. function showwindow()
  83. {
  84.     //ie    
  85.     if(document.all) 
  86.         document.all.rcMenu.style.visibility = "visible";
  87.     //ns
  88.     if(document.layers)
  89.         document.rcMenu.visibility = "visible";
  90.     
  91.     return false;
  92. }
  93. function closewindow() 
  94. {
  95.     //ie
  96.     if(document.all) 
  97.         document.all.rcMenu.style.visibility = "hidden";
  98.     //ns
  99.     if(document.layers)
  100.         document.rcMenu.visibility = "hidden";
  101. }
  102. // CAPTURE of Right Click
  103. if(document.layers) 
  104. {
  105.    document.captureEvents(Event.MOUSEDOWN);
  106. }
  107. document.onmousedown = buttoncheck;
  108. // ie >= 5
  109. document.oncontextmenu = function() { showwindow(); <?php if ($_INI['disable_context_menu']) echo "return false;n"; ?> }
  110. /****************************************************************
  111.  *
  112.  *   RIGHT CLICK ACTIONS => all rc_ functions
  113.  *
  114.  ****************************************************************/
  115. function rc_copy()
  116. {
  117.     parent.thetoolbar.document.action_copy();
  118.     closewindow();  
  119.     return false;
  120. }
  121. function rc_paste()
  122. {
  123.     parent.thetoolbar.document.action_paste();
  124.     closewindow();
  125.     return false;
  126. }
  127. // -->
  128. </script>
  129. </head>
  130. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="update_visual()">
  131. <?php page_type('filelist'); ?>
  132. <!-- RIGHT CLICK menu -->
  133. <div id="rcMenu" style="position:absolute; top:10px; left:220px; visibility:hidden">
  134. <form action="execute.php" method=POST name=rightclick>
  135. <input type=hidden name=action>
  136. <input type=hidden name=buffer_copy>
  137. <input type=hidden name=buffer_selection>
  138. <input type=hidden name=source_folder>
  139. <input type=hidden name=source_type>
  140. <input type=hidden name=target_folder value="<?php echo urlencode($_GET['path']) ?>">
  141. <input type=hidden name=target_type value="<?php echo $current_target_type; ?>">
  142. </form>
  143. </div>