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

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

$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);
$smarty->assign('name2', $name2);
if ($res->status != 0) $smarty->assign('errormsg', $res->message);

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

?>