mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
now creating a session for <login> <passwd> supplied on the commandline
This commit is contained in:
parent
273c381628
commit
e94fc7ca21
@ -19,22 +19,26 @@
|
|||||||
// To be able to test eTemplates with phpGtk you need a standalone/cgi php interpreter with compiled-in phpGtk installed
|
// To be able to test eTemplates with phpGtk you need a standalone/cgi php interpreter with compiled-in phpGtk installed
|
||||||
// (for instruction on how to do so look at the phpGtk website http://gtk.php.net/).
|
// (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
|
// Then start this script with the parameters <login> <passwd>
|
||||||
// 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(
|
global $argv;
|
||||||
'sessionid' => '2567b6b82e8e8f1ceb6f399342834d92',
|
|
||||||
'kp3' => '5f9dc297f3c4739f92664359ffaf612e',
|
|
||||||
'domain' => 'default'
|
|
||||||
);
|
|
||||||
|
|
||||||
|
if ($argv[1] == '' || $argv[2] == '')
|
||||||
|
{
|
||||||
|
echo "Usage: $argv[0] <login> <passwd>\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['phpgw_info']['flags'] = array(
|
||||||
'currentapp' => 'etemplate',
|
'currentapp' => 'login',
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True
|
'nonavbar' => True
|
||||||
);
|
);
|
||||||
include('../header.inc.php');
|
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');
|
ExecMethod('etemplate.db_tools.edit');
|
||||||
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
|
Loading…
Reference in New Issue
Block a user