/**
  * constructor, acl check
  *
  * @author Andy Bennett
  */
 function __construct()
 {
     parent::__construct();
     parent::init();
     Acl::instance()->redirect(steamauth_helper::get_role(), 'admin');
     Display::instance()->set_template('template-admin');
 }
Пример #2
0
 /**
  * overload steam add function with different add listener
  *
  * @return void
  * @author Andy Bennett
  */
 public function add()
 {
     Event::clear('steamform_' . $this->setup['name'] . '_add.complete');
     Event::add('steamform_' . $this->setup['name'] . '_add.complete', array('Galleries_Controller', 'event_add_complete'));
     // We can't use parent here, as that wipes out the event we've set!
     Steam_Core::add();
 }
Пример #3
0
 /**
  * constructor; set display template
  *
  * @author Andy Bennett
  */
 function __construct()
 {
     Acl::instance()->redirect(Steamauth::instance()->get_role(), 'edit', null, '../');
     parent::__construct();
     parent::init();
     $tpl = request::is_ajax() || isset($_GET['ajax']) ? 'template-ajax' : 'template-admin';
     Display::instance()->set_template($tpl);
 }
 /**
  * constructor, check acl
  *
  * @author Andy Bennett
  */
 function __construct()
 {
     parent::__construct();
     parent::init();
     Acl::instance()->redirect(steamauth_helper::get_role(), 'admin');
     Display::instance()->append_data('page_id', 'containers-admin');
     Display::instance()->set_template('template-admin');
 }
Пример #5
0
 function __construct()
 {
     parent::__construct();
     Event::add('steamcore.item_view_html', array('page_listeners', 'item_html_listener'));
     Event::add('steamcore.item_view_json', array('page_listeners', 'item_json_listener'));
     Event::add('steamcore.item_view_xml', array('page_listeners', 'item_xml_listener'));
     Event::add('steamcore.item_view_rss', array('page_listeners', 'item_rss_listener'));
 }
Пример #6
0
 function __construct()
 {
     parent::__construct();
     // if (!User::instance()->id) { url::redirect('/'); }
     // Acl::instance()->redirect( User::instance()->get_role(), 'moderator', null, '/' );
     Event::add('steamcore.item_view_html', array('page_listeners', 'item_html_listener'));
     Event::add('steamcore.item_view_json', array('page_listeners', 'item_json_listener'));
     Event::add('steamcore.item_view_xml', array('page_listeners', 'item_xml_listener'));
     Event::add('steamcore.item_view_rss', array('page_listeners', 'item_rss_listener'));
 }
 /**
  * constructor; set event listeners, templates
  *
  * @return void
  * @author Andy Bennett
  */
 public function __construct()
 {
     parent::__construct();
     parent::init();
     // Acl::instance()->redirect( Steamauth::instance()->get_role(), null, 'moderate' );
     $tpl = request::is_ajax() || isset($_GET['ajax']) ? 'template-ajax' : 'template-admin';
     Display::instance()->set_template($tpl);
     // Display::instance()->append_data('cssfiles', array( 'app/admin' ) );
     Event::add('show_upload_form', array('Gallery_upload', 'show_upload_form'));
 }
Пример #8
0
 function __construct()
 {
     parent::__construct();
     Event::clear('steamcore.item_confirm_delete');
     Event::add('steamcore.item_confirm_delete', array('auth_listeners', 'event_item_confirm_delete'));
     Event::clear('steamcore.item_deleted');
     Event::add('steamcore.item_deleted', array('auth_admin_listeners', 'event_item_deleted'));
     Event::clear('steamcore.item_view');
     Event::add('steamcore.item_view', array('auth_listeners', 'event_item_view'));
     Event::clear('steamcore_add.complete');
     Event::add('steamcore_add.complete', array('auth_admin_listeners', 'add_complete'));
     Event::clear('steamcore_edit.complete');
     Event::add('steamcore_edit.complete', array('auth_admin_listeners', 'edit_complete'));
 }
Пример #9
0
 /**
  * constructor
  *
  * @return void
  * @author Andy Bennett
  */
 function __construct()
 {
     parent::__construct();
     Event::add('gallery.show_list', array('gallery_listeners', 'gallery_list'));
     Event::add('gallery.save_titles_success', array('gallery_listeners', 'save_titles_success'));
     Event::add('gallery.upload_form', array('gallery_listeners', 'upload_form'));
     Event::add('gallery.post_upload_fail', array('gallery_listeners', 'post_upload_fail'));
     Event::add('gallery.post_upload_form', array('gallery_listeners', 'post_upload_form'));
     Event::clear('steamcore.item_view');
     Event::clear('steamcore.item_confirm_delete');
     Event::clear('xform_' . $this->name . '_edit.complete');
     Event::clear('xform_' . $this->name . '_edit.show_form');
     Event::add('steamcore.item_view', array('gallery_listeners', 'item_view_listener'));
     Event::add('steamcore.item_confirm_delete', array('gallery_listeners', 'item_confirm_delete_listener'));
     Event::add('xform_' . $this->name . '_edit.complete', array('gallery_listeners', 'edit_complete_listener'));
     Event::add('xform_' . $this->name . '_edit.show_form', array('gallery_listeners', 'edit_show_form_listener'));
     $this->set_gallery(URI::instance()->segment(1));
 }
Пример #10
0
 function __construct()
 {
     parent::__construct();
 }
 public function render_table()
 {
     parent::__construct();
     $v = new View('pages/sub-pages/' . $this->setup['view'], self::get_list());
     echo $v->render();
 }
Пример #12
0
 /**
  * constructor; add css / js
  *
  * @author Andy Bennett
  */
 function __construct()
 {
     parent::__construct();
     Assets::instance()->add_css('/cache/blog/css/blog');
     Assets::instance()->add_javascript('/cache/blog/js/blog');
 }
Пример #13
0
 /**
  * edit a user
  *
  * @return void
  * @author Andy Bennett
  */
 public function edit()
 {
     Event::clear('steamform_auth_admin_edit.complete');
     Event::add('steamform_auth_admin_edit.complete', array('auth_admin_events', 'edit_complete'));
     parent::edit();
 }