Exemplo n.º 1
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * @link 		http://www.easyscp.net
 * @author 		EasySCP Team
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'admin/manage_reseller_users.tpl';
// static page messages
update_reseller_user();
gen_user_table($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Admin/Manage users/User assignment'), 'TR_USER_ASSIGNMENT' => tr('User assignment'), 'TR_RESELLER_USERS' => tr('Users'), 'TR_NUMBER' => tr('No.'), 'TR_MARK' => tr('Mark'), 'TR_USER_NAME' => tr('User name'), 'TR_FROM_RESELLER' => tr('From reseller'), 'TR_TO_RESELLER' => tr('To reseller'), 'TR_MOVE' => tr('Move')));
gen_admin_mainmenu($tpl, 'admin/main_menu_users_manage.tpl');
gen_admin_menu($tpl, 'admin/menu_users_manage.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
/**
 * @param EasySCP_TemplateEngine $tpl
 */
function gen_user_table($tpl)
{
                domain
            where
                domain_admin_id = ?
SQL_QUERY;
        $rs = exec_query($sql, $query, array($users_array[$i]));
        $domain_ip_id = $rs->fields['domain_ip_id'];
        $domain_name = $rs->fields['domain_name'];
        if (!preg_match("/{$domain_ip_id};/", $dest)) {
            $err = "<b>{$domain_name}</b>" . tr(' Has IP address that can not be managed from the destination reseller !<br>This user can not be moved!');
            return false;
        }
    }
    return true;
}
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_ADMIN_MANAGE_RESELLER_USERS_PAGE_TITLE' => tr('VHCS - Admin/Manage users/User assignment'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
gen_admin_menu($tpl);
update_reseller_user($sql);
gen_user_table($tpl, $sql);
$tpl->assign(array('TR_USER_ASSIGNMENT' => tr('User assignment'), 'TR_RESELLER_USERS' => tr('Users'), 'TR_NUMBER' => tr('No.'), 'TR_MARK' => tr('Mark'), 'TR_USER_NAME' => tr('User name'), 'TR_FROM_RESELLER' => tr('From reseller'), 'TR_TO_RESELLER' => tr('To reseller'), 'TR_MOVE' => tr('Move')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();