Core  3.2
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  * @package FDL
5 */
6 /**
7  * Goto 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 id int Http var : document identifier where use the ask
22  * @global waskid int Http var : document identifier of the ask
23  */
24 function gotowask(Action & $action)
25 {
26  $docid = GetHttpVars("id");
27  $dbaccess = $action->dbaccess;
28  if ($docid == "") $action->exitError(_("no document reference"));
30  if (!$doc->isAlive()) $action->exitError(sprintf(_("unknow document reference '%s'") , GetHttpVars("docid")));
31 
32  $err = $doc->control("view");
33  if ($err) $action->exitError($err);
34 
35  if (!$doc->state) $action->exitError(sprintf(_("document '%s' [revision %d] has no state") , $doc->getTitle() , $doc->revision));
36 
37  $action->lay->eSet("comment", sprintf(_("The latest document %s waiting for a answer") , _($doc->state)));
38  $action->lay->rSet("title", urlencode($doc->getTitle()));
39  $action->lay->eSet("doctitle", sprintf(_("goto latest %s") , _($doc->state)));
40  $action->lay->rSet("id", $doc->id);
41 }
global $action
exitError($texterr, $exit=true, $code="")
$docid
Definition: cleanFamily.php:13
gotowask(Action &$action)
Definition: gotowask.php:24
new_Doc($dbaccess, $id= '', $latest=false)
$dbaccess
Definition: checkVault.php:17
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen