本文整理匯總了PHP中WCF::verifyTopicId方法的典型用法代碼示例。如果您正苦於以下問題:PHP WCF::verifyTopicId方法的具體用法?PHP WCF::verifyTopicId怎麽用?PHP WCF::verifyTopicId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WCF
的用法示例。
在下文中一共展示了WCF::verifyTopicId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$CORE->load_CoreModule('forums.base');
$CORE->loggedInOrReturn();
//setup new instance of multiple errors
$ERRORS->NewInstance('post_reply');
//Define the variables
$topicId = isset($_POST['topic']) ? (int) $_POST['topic'] : false;
$title = isset($_POST['title']) ? $_POST['title'] : false;
$text = isset($_POST['text']) ? $_POST['text'] : false;
$staffPost = isset($_POST['staff_post']) ? true : false;
######################################
############### CHECKS ###############
if (!$topicId) {
//We have no forum id
$ERRORS->Add('An unexpected error occurred, missing topic id.');
} else {
if (!WCF::verifyTopicId($topicId)) {
//Veirfy the forum
$ERRORS->Add('An unexpected error occurred, the selected topic is invalid.');
}
}
if ($title && strlen($title) > 150) {
$ERRORS->Add('The reply title is too long, maximum 150 characters.');
}
if (!$text) {
$ERRORS->Add('Please enter text for the reply.');
}
//Check for errors
$ERRORS->Check('/forums.php?page=post_reply');
##################################################
######## REGISTER SERVER ACCOUNT #################
//Resolve the forum name and id