Ignore:
Timestamp:
10/19/07 10:23:42 (17 years ago)
Author:
niltonneto
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/instant_messenger/templates/default/script_load.php

    r68 r86  
    99                if(!validate_form() || number_process != "") 
    1010                        document.im_script_load.start_script.disabled = true; 
     11                 
    1112        } 
    1213        function info_process_id() 
     
    4445<?php 
    4546         
    46         if($_POST['start_script']) 
     47        if( isset($_SESSION['phpgw_info']['instant_messenger']['user']) ) 
    4748        { 
    48                 exec("php -q start_script.php");                 
    49                 unset($_POST['start_script']); 
    50         } 
    51          
    52         if($_POST['stop_script']) 
    53         { 
    54                 exec("php -q stop_script.php");          
    55                 unset($_POST['stop_script']); 
    56         } 
    57          
    58         $process = shell_exec("ps aux | grep IMManager.php$ | cut -c10-14"); 
    59         $process = preg_replace("/\\n/","",$process); 
    60         echo "<script>number_process='".$process."'</script>"; 
     49                if($_REQUEST['user'] || $_SESSION['phpgw_info']['instant_messenger']['user'] == "rodsouza" || $_SESSION['phpgw_info']['instant_messenger']['user'] == "alexandrecorreia") 
     50                { 
     51                        if($_POST['start_script']) 
     52                        { 
     53                                exec("php -q start_script.php user");            
     54                                unset($_POST['start_script']); 
     55                        } 
     56                         
     57                        if($_POST['stop_script']) 
     58                        { 
     59                                exec("php -q stop_script.php user");             
     60                                unset($_POST['stop_script']); 
     61                        } 
     62                         
     63                        $process = shell_exec("ps aux | grep IMManager.php$ | cut -c10-14"); 
     64                        $process = preg_replace("/\\n/","",$process); 
     65                        echo "<script>number_process='".$process."'</script>"; 
     66                         
     67                }else 
     68                        exit; 
     69        }else 
     70                exit; 
     71 
    6172?> 
    6273<style> 
     
    91102                <input type="submit" value="Start Script" name="start_script" /> 
    92103                <input type="submit" value="Stop Script" name="stop_script" /> 
     104                <input type="hidden" name="user" value="user" />                 
    93105        </form> 
    94106</body> 
Note: See TracChangeset for help on using the changeset viewer.