Changeset 86 for trunk/instant_messenger/templates/default/script_load.php
- Timestamp:
- 10/19/07 10:23:42 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/instant_messenger/templates/default/script_load.php
r68 r86 9 9 if(!validate_form() || number_process != "") 10 10 document.im_script_load.start_script.disabled = true; 11 11 12 } 12 13 function info_process_id() … … 44 45 <?php 45 46 46 if( $_POST['start_script'])47 if( isset($_SESSION['phpgw_info']['instant_messenger']['user']) ) 47 48 { 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 61 72 ?> 62 73 <style> … … 91 102 <input type="submit" value="Start Script" name="start_script" /> 92 103 <input type="submit" value="Stop Script" name="stop_script" /> 104 <input type="hidden" name="user" value="user" /> 93 105 </form> 94 106 </body>
Note: See TracChangeset
for help on using the changeset viewer.