GetDb(); $usertagops = $gCms->GetUserTagOperations(); include('header.php'); if( !isset($_REQUEST['userplugin_id']) ) { echo $themeObject->ShowErrors(lang('missingparams')); } $udt_id = (int)$_REQUEST['userplugin_id']; $udt_name = ''; $usertag = UserTagOperations::get_instance()->GetUserTag($udt_id); if( !$usertag ) { // todo, change me. echo $themeObject->ShowErrors(lang('missingparams')); } if (isset($_POST["cancel"])) { redirect("listusertags.php".$urlext); return; } if (FALSE == empty($_GET['message'])) { echo $themeObject->ShowMessage(lang($_GET['message'])); } $output = ''; if( isset($_POST['submit']) ) { @ob_start(); $params = array(); $res = $usertagops->CallUserTag($usertag['userplugin_name'],$params); $tmp = @ob_get_contents(); @ob_end_clean(); if( $tmp ) $output = $tmp; else $output = $res; } $hidden = ''; $hidden .= ''; $smarty->assign('hidden',$hidden); if( $output ) { $smarty->assign('output',$output); } $smarty->assign('udt_name',$usertag['userplugin_name']); $usertagops = $gCms->GetUserTagOperations(); $smarty->assign('code',create_textarea(false,$usertag['code'],'code','pagebigtextarea','code','','','80','15','','php','readonly="readonly"')); echo $smarty->fetch('runuserplugin.tpl'); echo '

« '.lang('back').'

'."\n"; include_once("footer.php"); # vim:ts=4 sw=4 noet ?>