diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 00:46:19 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 00:46:19 +0300 |
| commit | 1388a64651f1c61a6aafc32f8e3e60f7a6ffd339 (patch) | |
| tree | dd5bcd7b438929ffec89d32011144831eebabb06 /public/app/controllers/Office.php | |
| parent | d5475ce60729c3f743a6451b42072f1a13ffed59 (diff) | |
| download | gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.tar.gz gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.tar.bz2 gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.zip | |
admin petition ready
Diffstat (limited to 'public/app/controllers/Office.php')
| -rw-r--r-- | public/app/controllers/Office.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index f57cf08..c67249a 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -327,9 +327,21 @@ class Office { + public static function all_petitions() + { + if (Auth::in_admin_group()) { + Render::json([ + 'success' => true, + 'data' => Content_model::all_petitions() + ]); + } + } + + + public static function petition_copy($sign) { - if (false) { //(Auth::in_admin_group()) { + if (Auth::in_admin_group()) { $petition = Content_model::get_petition(['signature' => $sign]); } else { @@ -407,7 +419,19 @@ class Office { ## ADMIN METHODS (insert, updated etc.) ## ------------------------------------------------------------------------- + /** set_protocol + * --- + */ + public static function set_protocol() + { + if (Auth::in_admin_group()) { + $post = Registry::get('REQUEST')->POST; + Content_model::set_protocol( $post['id'], $post['protocol'] ); + } + Render::json(['success' => true]); + } + /** files * echo all files * |
