Namespaces | Functions

usr_agreement.php File Reference

Go to the source code of this file.

Namespaces

namespace  ilias
 

admin objects frameset


Functions

 getUserAgreement ()

Function Documentation

getUserAgreement (  ) 

Definition at line 81 of file usr_agreement.php.

References $ilias, and $lng.

{
        global $lng, $ilias;

        $tmpPath = getcwd();
        $agrPath = $tmpPath."/agreement";
        chdir($agrPath);

        $agreement = "agreement_".$lng->lang_user.".html";

        if ($agreement)
        {
                if ($content = file($agreement))
                {
                        foreach ($content as $key => $val)
                        {
                                $text .= trim(nl2br($val));
                        }
                        return $text;
                }
                else
                {
                        $ilias->raiseError($lng->txt("usr_agreement_empty"),$ilias->error_obj->MESSAGE);
                }
        }
        else
        {
                $ilias->raiseError($lng->txt("file_not_found"),$ilias->error_obj->MESSAGE);
        }
}