1<?php 2 3require_once(dirname(__FILE__)."/../pfccommand.class.php"); 4 5class pfcCommand_error extends pfcCommand 6{ 7 function run(&$xml_reponse, $p) 8 { 9 $c =& pfcGlobalConfig::Instance(); 10 $errors = $p["param"]; 11 if (is_array($errors)) 12 { 13 $error_ids = ""; $error_str = ""; 14 foreach ($errors as $k => $e) { $error_ids .= ",'".$k."'"; $error_str.= $e." "; } 15 $error_ids = substr($error_ids,1); 16 $xml_reponse->script("pfc.setError('".addslashes(stripslashes($error_str))."', Array(".$error_ids."));"); 17 } 18 else 19 $xml_reponse->script("pfc.setError('".addslashes(stripslashes($errors))."', Array());"); 20 } 21} 22 23?>