<?php
require_once('common.php');

$name = get_param('name');
$isSubmit = get_param('submit');
if ($isSubmit) {
$submiturl = REST_URL."?method=HelloWorld.helloWorld5";
$queries = array(
'name'=>$name);

$res = simplexml_load_file_with_get($submiturl, $queries);
if ($res->status == 0) {
header("Location: xxxx". "?".htmlspecialchars( SID ));
exit;
}
}


require_once('setup.php');
$smarty = new Smarty_Cgm();
$smarty->assign('name', $name);
if ($res->status != 0) $smarty->assign('errormsg', $res->message);

$smarty->display('XXXXX.tpl');

?>