Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
viewwask.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* View ask for a document
9
*
10
* @author Anakeen 2000
11
* @version $Id: fdl_card.php,v 1.42 2008/12/02 15:20:52 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage
15
*/
16
/**
17
*/
18
19
include_once (
"FDL/Class.Dir.php"
);
20
/**
21
* View a document
22
* @param Action &$action current action
23
* @global docid Http var : document identificator where use the ask
24
* @global waskid Http var : document identificator of the ask
25
*/
26
function
viewwask
(&
$action
)
27
{
28
$docid
=
GetHttpVars
(
"docid"
);
29
$answers =
GetHttpVars
(
"answer"
);
30
$dbaccess
=
$action
->GetParam(
"FREEDOM_DB"
);
31
if
(
$docid
==
""
)
$action
->exitError(_(
"no document reference"
));
32
$doc
=
new_Doc
(
$dbaccess
,
$docid
);
33
if
(!
$doc
->isAlive())
$action
->exitError(sprintf(_(
"unknow document reference '%s'"
) ,
GetHttpVars
(
"docid"
)));
34
$err
=
$doc
->control(
"view"
);
35
if
(
$err
)
$action
->exitError(
$err
);
36
37
$answers =
$doc
->getWasks();
38
$action
->lay->setBlockData(
"WASK"
, $answers);
39
$action
->lay->set(
"docid"
,
$doc
->id);
40
}
41
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase