Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
viewwask.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * View ask for a document
8  *
9  * @author Anakeen
10  * @version $Id: fdl_card.php,v 1.42 2008/12/02 15:20:52 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 
17 include_once ("FDL/Class.Dir.php");
18 /**
19  * View a document
20  * @param Action &$action current action
21  * @global docid int Http var : document identifier where use the ask
22  * @global waskid int Http var : document identifier of the ask
23  */
24 function viewwask(Action & $action)
25 {
26  $docid = GetHttpVars("docid");
27  $answers = GetHttpVars("answer");
28  $dbaccess = $action->dbaccess;
29  if ($docid == "") $action->exitError(_("no document reference"));
31  if (!$doc->isAlive()) $action->exitError(sprintf(_("unknow document reference '%s'") , GetHttpVars("docid")));
32  $err = $doc->control("view");
33  if ($err) $action->exitError($err);
34 
35  $answers = $doc->getWasks();
36  $action->lay->setBlockData("WASK", $answers);
37  $action->lay->set("docid", $doc->id);
38 }
global $action
viewwask(Action &$action)
Definition: viewwask.php:24
exitError($texterr, $exit=true, $code="")
$docid
Definition: cleanFamily.php:13
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen