diff options
Diffstat (limited to 'public/app/controllers/Office.php')
| -rw-r--r-- | public/app/controllers/Office.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index 83135de..f57cf08 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -327,6 +327,26 @@ class Office { + public static function petition_copy($sign) + { + if (false) { //(Auth::in_admin_group()) { + $petition = Content_model::get_petition(['signature' => $sign]); + + } else { + $manager = new App_manager(); + $petition = Content_model::get_petition([ + 'signature' => $sign, + 'user_id' => $manager->getUserToken()->getUser()->getID() + ]); + } + if ($petition === false) Render::view('error/404'); + else { + Render::view( 'templates/create_pdf',['petition' => $petition]); + } + } + + + ## TICKET METHODS (create, remove) ## tickets eliminate CSRF attacks ## ------------------------------------------------------------------------- |
