17 include_once (
"FDL/Class.Doc.php");
18 include_once (
"FDL/mailcard.php");
28 $docid = GetHttpVars(
"id");
29 $uid = GetHttpVars(
"_id_affectuser");
30 $newstate = GetHttpVars(
"newstate", -1);
31 $commentstate = GetHttpVars(
"_statecomment");
32 $commentaction = GetHttpVars(
"_actioncomment");
37 if (!
$doc->isAlive())
$action->exitError(sprintf(_(
"document #%s not found. Affectation aborded") ,
$docid));
41 if (!$docu->isAlive())
$action->addWarningMsg(sprintf(_(
"user #%s not found. Affectation aborded") , $uid));
43 $wuid = $docu->getRawValue(
"us_whatid");
44 if (!($wuid > 0))
$action->addWarningMsg(sprintf(_(
"user #%s has not a real account. Affectation aborded") , $uid));
47 $err =
$doc->changeFreeState($newstate, $commentstate);
51 $action->addWarningMsg(sprintf(_(
"document %s has the new state %s") ,
$doc->title,
$doc->getState()));
55 $err =
$doc->allocate($wuid, $commentaction, $revstate);
61 $action->addWarningMsg(sprintf(_(
"document %s has been allocate to %s") ,
$doc->title, $docu->title));
63 $to = $docu->getRawValue(
"us_mail");
64 $subject = sprintf(_(
"allocation for %s document") ,
$doc->title);
65 $err =
sendCard(
$action,
$doc->id,
$to,
"",
$subject,
"",
true, $commentaction,
"",
"",
"htmlnotif");
70 redirect(
$action, GetHttpVars(
"redirect_app",
"FDL") , GetHttpVars(
"redirect_act",
"FDL_CARD&latest=Y&refreshfld=Y&id=" .
$doc->id) ,
$action->GetParam(
"CORE_STANDURL"));
sendCard(Action &$action, $docid, $to, $cc, $subject, $zonebodycard="", $ulink=false, $comment="", $from="", $bcc="", $format="html", $sendercopy=true, $addfiles=array(), $userinfo=null, $savecopy=false)
if($file) if($subject==""&&$file) if($subject=="") $err