Пример #1
0
      <?php 
module_form::prevent_exit(array('valid_exits' => array('.submit_button')));
if ($template) {
    // is there a company template?
    if (class_exists('module_company', false) && defined('COMPANY_UNIQUE_CONFIG') && COMPANY_UNIQUE_CONFIG) {
        if (module_company::get_current_logged_in_company_id()) {
            // we restrict this template editing to only this template.
            $company_id = module_company::get_current_logged_in_company_id();
        } else {
            $company_id = isset($_REQUEST['company_id']) ? (int) $_REQUEST['company_id'] : module_company::get_current_logged_in_company_id();
        }
        $new_template = module_company::template_get_company($template['template_id'], $template, $company_id);
        if ($new_template) {
            $template = $new_template;
        }
        module_company::template_edit_form($template_id, $company_id);
    }
}
?>


    
	<input type="hidden" name="_process" value="save_template" />
	<input type="hidden" name="template_id" value="<?php 
echo $template_id;
?>
" />
	<input type="hidden" name="return" value="<?php 
echo isset($_REQUEST['return']) ? htmlspecialchars(urldecode($_REQUEST['return'])) : '';
?>
" /> <!-- for popup editing -->