芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr/modules/TruetypeText/action.copystyle.php
CheckPermission( 'Use TruetypeText' ) ) exit; if (isset($params['cancel']) || !isset($params['styleid'])) $this->Redirect($id, 'defaultadmin', $returnid); include_once cms_join_path(dirname(__FILE__),'class.style.php'); $styleid = (isset($params['styleid']) ? $params['styleid'] : ''); $stylename = (isset($params['stylename']) ? $params['stylename'] : ''); if (isset($params['submit'])) { $TTTsl = new TTTstylelist(); if ($stylename == '') echo $this->showerrors($this->lang('error_emptyname')); elseif (is_numeric($stylename)) echo $this->showerrors($this->lang('error_nameisnumeric')); elseif ($TTTsl->getstyle($stylename) !== false) echo $this->showerrors($this->lang('error_namealreadyexists')); else { $TTTstyle = $TTTsl->getstyle($styleid); $TTTstyle->name = $stylename; if ($TTTstyle->savedbnew()) $this->Redirect($id, 'defaultadmin', $returnid); else echo $this->showerrors($this->lang('error_unabletosavestyle')); } } $this->smarty->assign('nametext', $this->Lang('name')); $this->smarty->assign('nameinput', $this->CreateInputText($id, 'stylename', $stylename, 30, 255)); $this->smarty->assign('submit', $this->CreateInputSubmit($id, 'submit', lang('submit'))); $this->smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancel', lang('cancel'))); echo $this->CreateFormStart($id, 'addstyle', $returnid); echo $this->ProcessTemplate('name.tpl'); echo $this->CreateInputHidden($id, 'styleid', $styleid); echo $this->CreateFormEnd(); ?>