コード例 #1
0
<?php

/**
 *	Edit domain attributes
 * 
 *	@author     Karel Kozlik
 *	@version    $Id: domain_attributes.php,v 1.3 2007/02/14 16:36:39 kozlik Exp $
 *	@package    serweb
 *	@subpackage admin_pages
 */
$_data_layer_required_methods = array();
$_phplib_page_open = array("sess" => "phplib_Session", "auth" => "phplib_Auth", "perm" => "phplib_Perm");
$_required_modules = array('attributes');
$_required_apu = array('apu_attributes');
/** include all others necessary files */
require "prepend.php";
$perm->check("admin");
$page_attributes['selected_tab'] = "list_of_domains.php";
$dp = new apu_attributes();
$dp->set_opt('redirect_on_update', 'list_of_domains.php');
$dp->set_opt('attrs_kind', 'domain');
if ($perm->have_perm('hostmaster')) {
    $dp->set_opt('perm', 'hostmaster');
} else {
    $dp->set_opt('perm', 'admin');
}
$controler->add_apu($dp);
$controler->set_template_name('a_domain_attributes.tpl');
$controler->start();
コード例 #2
0
<?php

/**
 *	Edit user attributes
 * 
 *	@author     Karel Kozlik
 *	@version    $Id: user_preferences.php,v 1.8 2007/02/14 16:36:40 kozlik Exp $
 *	@package    serweb
 *	@subpackage user_pages
 */
$_data_layer_required_methods = array();
$_phplib_page_open = array("sess" => "phplib_Session", "auth" => "phplib_Auth");
$_required_modules = array('attributes');
$_required_apu = array('apu_attributes');
/** include all others necessary files */
require "prepend.php";
$usr_pref = new apu_attributes();
//$usr_pref->set_opt('attributes',array('aaa', 'aaaa'));
//description of attributes
$att_desc['fw_voicemail'] = $lang_str['ff_fwd_to_voicemail'];
$att_desc['sw_user_status_visible'] = $lang_str['ff_status_visibility'];
$att_desc['send_daily_missed_calls'] = $lang_str['ff_send_daily_missed_calls'];
$usr_pref->set_opt('att_description', $att_desc);
$an =& $config->attr_names;
$attrs_options = array($an['lang'] => array('save_to_session' => true, 'save_to_cookie' => true));
$usr_pref->set_opt('attrs_options', $attrs_options);
$usr_pref->set_opt('attrs_kind', 'user');
$page_attributes['user_name'] = get_user_real_name($_SESSION['auth']->get_logged_user());
$controler->add_apu($usr_pref);
$controler->set_template_name('u_user_preferences.tpl');
$controler->start();
コード例 #3
0
<?php

/**
 *	Edit global attributes
 * 
 *	@author     Karel Kozlik
 *	@version    $Id: global_attributes.php,v 1.3 2007/02/14 16:36:39 kozlik Exp $
 *	@package    serweb
 *	@subpackage admin_pages
 */
$_data_layer_required_methods = array();
$_phplib_page_open = array("sess" => "phplib_Session", "auth" => "phplib_Auth", "perm" => "phplib_Perm");
$_required_modules = array('attributes');
$_required_apu = array('apu_attributes');
/** include all others necessary files */
require "prepend.php";
$perm->check("admin,hostmaster");
$gp = new apu_attributes();
$gp->set_opt('attrs_kind', 'global');
if ($perm->have_perm('hostmaster')) {
    $gp->set_opt('perm', 'hostmaster');
} else {
    $gp->set_opt('perm', 'admin');
}
$controler->add_apu($gp);
$controler->set_template_name('a_global_attributes.tpl');
$controler->start();