phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: etemplate phpGtk_test.php,1.1,1.2


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate phpGtk_test.php,1.1,1.2
Date: Mon, 03 Jun 2002 18:27:28 -0400

Update of /cvsroot/phpgroupware/etemplate
In directory subversions:/tmp/cvs-serv31989

Modified Files:
        phpGtk_test.php 
Log Message:
now creating a session for <login> <passwd> supplied on the commandline

Index: phpGtk_test.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/phpGtk_test.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** phpGtk_test.php     2 Jun 2002 21:13:04 -0000       1.1
--- phpGtk_test.php     3 Jun 2002 22:27:26 -0000       1.2
***************
*** 20,38 ****
  // (for instruction on how to do so look at the phpGtk website 
http://gtk.php.net/).
  
! // As phpGroupWare is not programmed as eTemplate (at least not know) you 
need to log in via Web and the session-id need to be
! // passed in the url, so you can read it and put it in the following lines 
(it NEED to be an active session).
  
! $GLOBALS['HTTP_GET_VARS'] = array(
!       'sessionid' => '2567b6b82e8e8f1ceb6f399342834d92',
!       'kp3' => '5f9dc297f3c4739f92664359ffaf612e',
!       'domain' => 'default'
! );    
  
  $GLOBALS['phpgw_info']['flags'] = array(
!       'currentapp'    => 'etemplate',
!       'noheader'              => True,
!       'nonavbar'              => True
  );
  include('../header.inc.php');
  
  ExecMethod('etemplate.db_tools.edit');
--- 20,42 ----
  // (for instruction on how to do so look at the phpGtk website 
http://gtk.php.net/).
  
! // Then start this script with the parameters <login> <passwd>
  
! global $argv;
  
+ if ($argv[1] == '' || $argv[2] == '')
+ {
+       echo "Usage: $argv[0] <login> <passwd>\n";
+       exit;
+ }
  $GLOBALS['phpgw_info']['flags'] = array(
!       'currentapp'             => 'login',
!       'noheader'               => True,
!       'nonavbar'               => True
  );
  include('../header.inc.php');
+ 
+ $GLOBALS['phpgw']->session->create($argv[1],$argv[2],'text') || die("Can't 
create session !!!\n");
+ 
+ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'etemplate';
  
  ExecMethod('etemplate.db_tools.edit');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]