This is in my sign.php
I don't get it..
--->>
include("header.php");
include("include/functions.php");
$xoopsOption['template_main'] = 'xtremguestbook_sign.html';
if($xoopsConfig['startpage'] == "xtremguestbook"){
$xoopsOption['show_rblock'] =1;
include(XOOPS_ROOT_PATH."/header.php");
make_cblock();
echo "
";
} else {
$xoopsOption['show_rblock'] =0;
include(XOOPS_ROOT_PATH."/header.php");
}
//include config file
include("cache/config.php");
$myts =& MyTextSanitizer::getInstance();
//assign variable of xoopsuser to form
if (isset($HTTP_POST_VARS["message"]))
$message = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS["message"]);
else
$message="";
if (isset($HTTP_POST_VARS["title"]))
$title_v = $myts->makeTareaData4PreviewInForm($HTTP_POST_VARS["title"]);
else
$title_v=" ";
if (isset($HTTP_POST_VARS["email"]))
$email_v=$myts->makeTareaData4Edit($HTTP_POST_VARS["email"]);
else
$email_v = !empty($xoopsUser) ? $xoopsUser->getVar("email", "E") : "";
if (isset($HTTP_POST_VARS["username"]))
$name_v=$myts->makeTareaData4Edit($HTTP_POST_VARS["username"]);
else
$name_v = !empty($xoopsUser) ? $xoopsUser->getVar("uname", "E") : "";
if (isset($HTTP_POST_VARS["url"]))
$url_v=$myts->makeTareaData4Edit($HTTP_POST_VARS["url"]);
else
$url_v = !empty($xoopsUser) ? $xoopsUser->getVar("url", "E") : "";
//show preview mode
if(isset($HTTP_GET_VARS["preview"]))
{
$xoopsTpl->assign('gb_show_preview', true);
//sanitize text before show
$a_msg = array();
if ($poster = get_user_data($xoopsUser))
{
$a_msg = &$poster;
$a_msg['is_user'] = true;
}
else
{
$a_msg = array();
$a_msg['is_user'] = false;
$a_msg['poster'] = $name_v;
if ($url_v)
$a_msg['url'] = "
";
if ($email_v)
$a_msg['email'] = "
";
}
$a_msg['i'] = 'x';
$a_msg['title'] = $myts->sanitizeForDisplay($title_v);
$a_msg['msg'] = $myts->sanitizeForDisplay($message, $allowhtml, $allowsmileys, $allowbbcode);
$a_msg['date'] = formatTimestamp(mktime(),"m");
$xoopsTpl->assign('post', $a_msg);
}
if($xoopsUser)
$disabled = "disabled='disabled'";
else
$disabled = '';
$xoopsTpl->assign('gb_sign', _XTG_SIGNGUESTBOOK);
$xoopsTpl->assign('gb_back', "
"._XTG_BACKGUESTBOOK."");
$xoopsTpl->assign('gb_desc', _XTG_DESC);
$xoopsTpl->assign('tbl_name', _XTG_NAME);
$xoopsTpl->assign('tbl_email', _XTG_EMAIL);
$xoopsTpl->assign('tbl_url', _XTG_URL);
$xoopsTpl->assign('tbl_title', _XTG_TITLE);
$xoopsTpl->assign('tbl_message', _XTG_MESSAGE);
$xoopsTpl->assign('frm_name', "
");
$xoopsTpl->assign('frm_email',"
");
$xoopsTpl->assign('frm_url', "
");
$xoopsTpl->assign('frm_title', "
");
$textarea = '';
include_once(XOOPS_ROOT_PATH."/include/xoopscodes.php");
if ($GLOBALS['allowbbcode']==1)
$textarea .= xoopsCodeTareaRet("message");
else
$textarea .= "
";
if ($GLOBALS['allowsmileys']==1)
$textarea .= xoopsSmiliesRet("message");
$xoopsTpl->assign('frm_message', $textarea);
$xoopsTpl->assign('frm_preview', "
");
$xoopsTpl->assign('frm_submit', "
");
$notfull = _XTG_NOTFULL;
$msg_toolong = _MESSAGETOOLONG;
$char_allowed = _ALLOWEDCHAR;
$char_current = _CURRCHAR;
$js = <<
function xoopsValidateXtrem(subjectId, textareaId, nameId, submitId) {
var maxchars = 65535;
var subjectDom = xoopsGetElementById(subjectId);
var textareaDom = xoopsGetElementById(textareaId);
var submitDom = xoopsGetElementById(submitId);
var nameDom = xoopsGetElementById(nameId);
if (textareaDom.value == "" || subjectDom.value == "" || nameDom.value == "") {
alert("$notfull");
return false;
}
if (maxchars != 0) {
if (textareaDom.value.length > maxchars) {
alert("$msg_toolong\\n\\n$char_allowed" + maxchars + "\\n$char_current" + textareaDom.value.length + "");
textareaDom.focus();
return false;
} else {
submitDom.disabled = true;
return true;
}
} else {
submitDom.disabled = true;
return true;
}
}
EOF;
$xoopsTpl->assign('xoops_js', $xoopsTpl->_tpl_vars['xoops_js'] . $js);
include(XOOPS_ROOT_PATH."/footer.php");
?>
Please help me,
thanks a lot!