Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
gotowask.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  * Goto 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 id Http var : document identificator where use the ask
24  * @global waskid Http var : document identificator of the ask
25  */
26 function gotowask(&$action)
27 {
28  $docid = GetHttpVars("id");
29  $dbaccess = $action->GetParam("FREEDOM_DB");
30  if ($docid == "") $action->exitError(_("no document reference"));
32  if (!$doc->isAlive()) $action->exitError(sprintf(_("unknow document reference '%s'") , GetHttpVars("docid")));
33 
34  $err = $doc->control("view");
35  if ($err) $action->exitError($err);
36 
37  if (!$doc->state) $action->exitError(sprintf(_("document '%s' [revision %d] has no state") , $doc->getTitle() , $doc->revision));
38 
39  $action->lay->set("comment", sprintf(_("The latest document %s waiting for a answer") , _($doc->state)));
40  $action->lay->set("lstate", _($doc->state));
41  $action->lay->set("title", $doc->getTitle());
42  $action->lay->set("doctitle", sprintf(_("goto latest %s") , _($doc->state)));
43  $action->lay->set("id", $doc->id);
44 }
45 ?>
← centre documentaire © anakeen - published under CC License - Dynacase