/**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     global $sess, $available_languages;
     parent::init();
     /* create list of languages */
     $this->languages = array();
     foreach ($available_languages as $k => $tmplang) {
         $this->languages[$k] = $tmplang[2];
     }
     $this->languages = array_unique($this->languages);
     /* initialize array of layout files */
     $this->layout_f =& $this->opt['layout_files'];
     foreach ($this->layout_f as $k => $v) {
         if (!isset($v['desc'])) {
             $this->layout_f[$k]['desc'] = $v['filename'];
         }
         $this->layout_f[$k]['url_edit'] = $sess->url($_SERVER['PHP_SELF'] . "?kvrk=" . uniqID("") . "&edit_layout=1&filename=" . RawURLEncode($v['filename']));
     }
     /* initialize array of text files */
     $this->text_f =& $this->opt['text_files'];
     foreach ($this->text_f as $k => $v) {
         $this->text_f[$k]['lang'] = array();
         $this->text_f[$k]['languages'] = array();
         if (!isset($v['desc'])) {
             $this->text_f[$k]['desc'] = $v['filename'];
         }
         foreach ($this->languages as $klang => $vlang) {
             $this->text_f[$k]['languages'][] = $vlang;
             $this->text_f[$k]['lang'][$vlang]['url_edit'] = $sess->url($_SERVER['PHP_SELF'] . "?kvrk=" . uniqID("") . "&edit_text=1&filename=" . RawURLEncode($v['filename']) . "&lang=" . $klang);
         }
     }
 }
 function init()
 {
     global $_SERWEB;
     parent::init();
     switch ($this->opt['attrs_kind']) {
         case "uri":
             $this->uri_scheme = $this->controler->get_interapu_var('uri_scheme');
             $this->uri_uname = $this->controler->get_interapu_var('uri_uname');
             $this->uri_did = $this->controler->get_interapu_var('uri_did');
             $this->uid = $this->controler->user_id->get_uid();
             $this->did = $this->uri_did;
             break;
         case "user":
             $this->uid = $this->controler->user_id->get_uid();
             $this->did = $this->controler->user_id->get_did();
             break;
         case "domain":
             $this->did = $this->controler->domain_id;
             break;
     }
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     $session_name = empty($this->opt['filter_name']) ? $this->opt['instance_id'] : $this->opt['select_name'];
     if (!isset($_SESSION['apu_attr_sel_grp'][$session_name])) {
         $_SESSION['apu_attr_sel_grp'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_attr_sel_grp'][$session_name];
     if (!isset($this->session['selected_grp'])) {
         $this->session['selected_grp'] = $this->opt['initial_selected_grp'];
     }
     if (!is_a($this->apu_attrs, "apu_attributes")) {
         die(__FILE__ . ":" . __LINE__ . " - apu_attrs is not set or is not type of 'apu_attributes'. May be you forgot call method 'set_apu_attrs'");
     }
     $this->apu_attrs->set_opt("attrs_group", $this->session['selected_grp']);
 }
 function init()
 {
     global $sess, $sess_sd_act_row, $sess_sd_sort, $sess_sd_sort_dir;
     parent::init();
     if (!$sess->is_registered('sess_sd_act_row')) {
         $sess->register('sess_sd_act_row');
     }
     if (!$sess->is_registered('sess_sd_sort')) {
         $sess->register('sess_sd_sort');
     }
     if (!$sess->is_registered('sess_sd_sort_dir')) {
         $sess->register('sess_sd_sort_dir');
     }
     if (!isset($sess_sd_act_row)) {
         $sess_sd_act_row = 0;
     }
     if (!isset($sess_sd_sort)) {
         $sess_sd_sort = 'from_uri';
     }
     if (!isset($sess_sd_sort_dir)) {
         $sess_sd_sort_dir = 'asc';
     }
     if (isset($_GET['act_row'])) {
         $sess_sd_act_row = $_GET['act_row'];
     }
     if (isset($_GET['sd_order_by'])) {
         // save curent sorting column
         $sd_sort = $sess_sd_sort;
         // asign new value to $sess_sd_sort
         switch ($_GET['sd_order_by']) {
             case "tu":
                 $sess_sd_sort = 'to_uri';
                 break;
             case "fn":
                 $sess_sd_sort = 'fname';
                 break;
             case "ln":
                 $sess_sd_sort = 'lname';
                 break;
             default:
                 $sess_sd_sort = 'from_uri';
         }
         $sess_sd_act_row = 0;
         // if form was not submited
         if (!$this->was_form_submited()) {
             // if $sd_sort = $sess_sd_sort change sorting direction
             if ($sd_sort == $sess_sd_sort) {
                 if ($sess_sd_sort_dir == 'asc') {
                     $sess_sd_sort_dir = 'desc';
                 } else {
                     $sess_sd_sort_dir = 'asc';
                 }
             } else {
                 if ($this->opt['sort_asc_on_change_col']) {
                     $sess_sd_sort_dir = 'asc';
                 }
             }
         }
     }
     $this->reg = new Creg();
     // create regular expressions class
 }
 function init()
 {
     global $_SERWEB;
     parent::init();
 }
 function init()
 {
     parent::init();
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     $session_name = empty($this->opt['sorter_name']) ? md5($_SERVER["PHP_SELF"]) : $this->opt['sorter_name'];
     if (!isset($_SESSION['apu_sorter'][$session_name])) {
         $_SESSION['apu_sorter'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_sorter'][$session_name];
     if (!isset($this->session['reverse_order'])) {
         $this->session['reverse_order'] = $this->opt['desc_order_by_default'];
     }
 }
 function init()
 {
     parent::init();
     $this->privileges = array();
     $this->privileges['acl_control'] = array();
     $this->privileges['is_admin'] = false;
     $this->privileges['hostmaster'] = false;
     $this->enabled_privileges = array('is_admin' => 1, 'hostmaster' => 1, 'acl_control' => 1);
     foreach ($this->opt['disabled_privileges'] as $v) {
         $this->enabled_privileges[$v] = 0;
     }
 }
 function init()
 {
     parent::init();
     $this->controler->set_onload_js("\n\t\t\tif (document.forms['" . $this->opt['form_name'] . "']['uname'].value != '') {\n\t\t\t\tdocument.forms['" . $this->opt['form_name'] . "']['passw'].focus();\n\t\t\t} else {\n\t\t\t\tdocument.forms['" . $this->opt['form_name'] . "']['uname'].focus();\n\t\t\t}\n\t\t");
 }
 /**
  *  this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     if (!isset($_SESSION['apu_hello_world'][$this->opt['instance_id']])) {
         $_SESSION['apu_hello_world'][$this->opt['instance_id']] = array();
     }
     $this->session =& $_SESSION['apu_hello_world'][$this->opt['instance_id']];
     if (!isset($this->session['smarty_action'])) {
         $this->session['smarty_action'] = 'default';
     }
     if (!isset($this->session['name'])) {
         $this->session['name'] = '';
     }
 }
Exemple #11
0
 function init()
 {
     global $sess, $sess_lcr_act_row;
     parent::init();
     if (!$sess->is_registered('sess_lcr_act_row')) {
         $sess->register('sess_lcr_act_row');
     }
     if (!isset($sess_lcr_act_row)) {
         $sess_lcr_act_row = 0;
     }
     if (isset($_GET['act_row'])) {
         $sess_lcr_act_row = $_GET['act_row'];
     }
 }
 function init()
 {
     global $sess, $sess_acc_act_row, $sess_acc_filter;
     parent::init();
     if (!$sess->is_registered('sess_acc_act_row')) {
         $sess->register('sess_acc_act_row');
     }
     if (!$sess->is_registered('sess_acc_filter')) {
         $sess->register('sess_acc_filter');
     }
     if (!isset($sess_acc_act_row)) {
         $sess_acc_act_row = 0;
     }
     if (!isset($sess_acc_filter)) {
         $sess_acc_filter = 'all';
     }
     if (isset($_GET['act_row'])) {
         $sess_acc_act_row = $_GET['act_row'];
     }
     $this->acc_res = array();
     $this->reg = new Creg();
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     global $sess;
     parent::init();
     $session_name = !is_null($this->opt['sess_seed']) ? $this->opt['sess_seed'] : $this->opt['instance_id'];
     if (!isset($_SESSION['apu_subscribers'][$session_name])) {
         $_SESSION['apu_subscribers'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_subscribers'][$session_name];
     if (is_a($this->sorter, "apu_base_class")) {
         /* register callback called on sorter change */
         $this->sorter->set_opt('on_change_callback', array(&$this, 'sorter_changed'));
         $this->sorter->set_base_apu($this);
     }
     if (is_a($this->filter, "apu_base_class")) {
         $this->filter->set_base_apu($this);
     }
 }
 /**
  *  this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     if (!isset($_SESSION['apu_uri_user'][$this->opt['instance_id']])) {
         $_SESSION['apu_uri_user'][$this->opt['instance_id']] = array();
     }
     $this->session =& $_SESSION['apu_uri_user'][$this->opt['instance_id']];
     if (!isset($this->session['smarty_action'])) {
         $this->session['smarty_action'] = 'default';
     }
     if (is_a($this->sorter, "apu_base_class")) {
         /* register callback called on sorter change */
         $this->sorter->set_opt('on_change_callback', array(&$this, 'sorter_changed'));
         $this->sorter->set_base_apu($this);
     }
     if (is_a($this->filter, "apu_base_class")) {
         $this->filter->set_base_apu($this);
     } else {
         if (!isset($this->session['act_row'])) {
             $this->session['act_row'] = 0;
         }
         if (isset($_GET['act_row'])) {
             $this->session['act_row'] = $_GET['act_row'];
         }
     }
 }
 function init()
 {
     parent::init();
     if (!is_null($this->opt['register_in_domain']) and !is_null($this->opt['create_new_domain'])) {
         die("Both options 'register_in_domain' and 'create_new_domain' of apu_registration can not be set");
     }
 }
 /**
  *  this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     $session_name = empty($this->opt['refresh_name']) ? $this->opt['instance_id'] : $this->opt['refresh_name'];
     if (!isset($_SESSION['apu_refresh'][$session_name])) {
         $_SESSION['apu_refresh'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_refresh'][$session_name];
     $clean_refresh = $this->opt['reset_to_default'];
     if (isset($_GET['refresh_updated'])) {
         $clean_refresh = false;
     }
     if (isset($_POST['refresh_updated'])) {
         $clean_refresh = false;
     }
     if (isset($_GET['filter_updated'])) {
         $clean_refresh = false;
     }
     if (isset($_POST['filter_updated'])) {
         $clean_refresh = false;
     }
     if (isset($_GET['sorter_updated'])) {
         $clean_refresh = false;
     }
     if (isset($_GET['act_row'])) {
         $clean_refresh = false;
     }
     foreach ($_GET as $k => $v) {
         if (substr($k, 0, 7) == "u_sort_") {
             $clean_refresh = false;
             break;
         }
     }
     if ($clean_refresh) {
         $this->session = array();
     }
     if (!isset($this->session['timeout'])) {
         $this->session['timeout'] = $this->opt['default_timeout'];
     }
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     /* set form name if it is not set */
     if (!$this->opt['form_name']) {
         $this->opt['form_name'] = "form_" . $this->opt['instance_id'];
     }
     $session_name = empty($this->opt['filter_name']) ? $this->opt['instance_id'] : $this->opt['filter_name'];
     if (!isset($_SESSION['apu_filter'][$session_name])) {
         $_SESSION['apu_filter'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_filter'][$session_name];
     if (!isset($this->session['f_values'])) {
         $this->session['f_values'] = array();
     }
     if (!isset($this->session['act_row'])) {
         $this->session['act_row'] = 0;
     }
     if (isset($_GET['act_row'])) {
         $this->session['act_row'] = $_GET['act_row'];
     }
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     global $sess_cu_act_row, $sess;
     parent::init();
     if (!$sess->is_registered('sess_cu_act_row')) {
         $sess->register('sess_cu_act_row');
     }
     if (!isset($sess_cu_act_row)) {
         $sess_cu_act_row = 0;
     }
     if (isset($_GET['act_row'])) {
         $sess_cu_act_row = $_GET['act_row'];
     }
     if (is_a($this->sorter, "apu_base_class")) {
         /* register callback called on sorter change */
         $this->sorter->set_opt('on_change_callback', array(&$this, 'sorter_changed'));
         $this->sorter->set_base_apu($this);
     }
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     global $sess;
     parent::init();
     if (is_a($this->filter, "apu_base_class")) {
         $this->filter->set_base_apu($this);
     }
 }
 /**
  *	this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     if (!isset($_SESSION['apu_attr_types'][$this->opt['instance_id']])) {
         $_SESSION['apu_attr_types'][$this->opt['instance_id']] = array();
     }
     $this->session =& $_SESSION['apu_attr_types'][$this->opt['instance_id']];
     if (is_a($this->sorter, "apu_base_class")) {
         /* register callback called on sorter change */
         $this->sorter->set_opt('on_change_callback', array(&$this, 'sorter_changed'));
         $this->sorter->set_base_apu($this);
     }
     if (is_a($this->filter, "apu_base_class")) {
         $this->filter->set_base_apu($this);
     }
 }
 function init()
 {
     parent::init();
     if ($this->opt['show_wait_win']) {
         $this->js_closing_win = 'im_close_window();';
     }
 }
 /**
  *  this metod is called always at begining - initialize variables
  */
 function init()
 {
     parent::init();
     $session_name = empty($this->opt['filter_name']) ? $this->opt['instance_id'] : $this->opt['filter_name'];
     if (!isset($_SESSION['apu_filter_dropdown'][$session_name])) {
         $_SESSION['apu_filter_dropdown'][$session_name] = array();
     }
     $this->session =& $_SESSION['apu_filter_dropdown'][$session_name];
     $clean_filter = true;
     if (isset($_GET['refresh_updated'])) {
         $clean_filter = false;
     }
     if (isset($_POST['refresh_updated'])) {
         $clean_filter = false;
     }
     if (isset($_GET['filter_updated'])) {
         $clean_filter = false;
     }
     if (isset($_POST['filter_updated'])) {
         $clean_filter = false;
     }
     if (isset($_GET['sorter_updated'])) {
         $clean_filter = false;
     }
     if (isset($_GET['act_row'])) {
         $clean_filter = false;
     }
     foreach ($_GET as $k => $v) {
         if (substr($k, 0, 7) == "u_sort_") {
             $clean_filter = false;
             break;
         }
     }
     if ($clean_filter) {
         $this->session = array();
     }
     if (!isset($this->session['f_field'])) {
         $this->session['f_field'] = null;
     }
     if (!isset($this->session['f_val'])) {
         $this->session['f_val'] = null;
     }
     if (!isset($this->session['f_op'])) {
         $this->session['f_op'] = "=";
     }
     if (!isset($this->session['act_row'])) {
         $this->session['act_row'] = 0;
     }
     if (isset($_GET['act_row'])) {
         $this->session['act_row'] = $_GET['act_row'];
     }
 }