1<?php 2 3require_once(dirname(__FILE__)."/../pfccommand.class.php"); 4 5class pfcCommand_redirect extends pfcCommand 6{ 7 var $usage = "/redirect url"; 8 9 function run(&$xml_reponse, $p) 10 { 11 $clientid = $p["clientid"]; 12 $param = $p["param"]; 13 $sender = $p["sender"]; 14 $recipient = $p["recipient"]; 15 $recipientid = $p["recipientid"]; 16 17 $c =& pfcGlobalConfig::Instance(); 18 $u =& pfcUserConfig::Instance(); 19 if (trim($param) == '') 20 { 21 // error 22 $cmdp = $p; 23 $cmdp["param"] = _pfc("Missing parameter"); 24 $cmdp["param"] .= " (".$this->usage.")"; 25 $cmd =& pfcCommand::Factory("error"); 26 $cmd->run($xml_reponse, $cmdp); 27 return; 28 } 29 30 $xml_reponse->redirect($param); 31 } 32} 33 34?> 35