本文整理匯總了PHP中IPSText::makeSlashesSafe方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSText::makeSlashesSafe方法的具體用法?PHP IPSText::makeSlashesSafe怎麽用?PHP IPSText::makeSlashesSafe使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSText
的用法示例。
在下文中一共展示了IPSText::makeSlashesSafe方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doRules
/**
* Save the forum rules
*
* @access public
* @return void Outputs to screen
**/
public function doRules()
{
/* INI */
$this->request['f'] = intval($this->request['f']);
if ($this->request['f'] == "") {
$this->registry->output->showError($this->lang->words['for_noid'], 1136);
}
//-----------------------------------------
// Load editor/bbcode
//-----------------------------------------
$_POST['body'] = IPSText::getTextClass('editor')->processRawPost('body');
IPSText::getTextClass('bbcode')->bypass_badwords = 1;
IPSText::getTextClass('bbcode')->parse_smilies = 0;
IPSText::getTextClass('bbcode')->parse_html = 1;
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'rules';
$_POST['body'] = IPSText::getTextClass('bbcode')->preDbParse($_POST['body']);
$rules = array('rules_title' => IPSText::makeSlashesSafe(IPSText::stripslashes($_POST['title'])), 'rules_text' => IPSText::makeSlashesSafe($_POST['body']), 'show_rules' => $this->request['show_rules']);
$this->DB->update('forums', $rules, 'id=' . $this->request['f']);
$this->recacheForums();
$this->registry->output->global_message = $this->lang->words['for_rulesup'];
//-----------------------------------------
// Bounce back to parent...
//-----------------------------------------
$this->request['f'] = $this->forum_functions->forum_by_id[$this->request['f']]['parent_id'];
$this->showForums();
}
示例2: multiModerationSaveForm
/**
* Saves the add/edit multi moderation form
*
* @access public
* @param string $type Either 'new' or 'edit'
* @return void
**/
public function multiModerationSaveForm($type = 'new')
{
/* INI */
$forums = array();
/* Make sure we have a title */
if (!$this->request['mm_title']) {
$this->registry->output->showError($this->lang->words['mm_valtitle'], 11333);
}
/* Check for forums */
$forums = $this->_getSelectedForums();
/* Check forums */
if (!$forums) {
$this->registry->output->showError($this->lang->words['mm_forums'], 11334);
}
/* Check move location */
if ($this->request['topic_move'] == 'n') {
$this->registry->output->showError($this->lang->words['mm_wrong'], 11335);
}
/* Build the insert array */
$save = array('mm_title' => $this->request['mm_title'], 'mm_enabled' => 1, 'topic_state' => $this->request['topic_state'], 'topic_pin' => $this->request['topic_pin'], 'topic_move' => intval($this->request['topic_move']), 'topic_move_link' => intval($this->request['topic_move_link']), 'topic_title_st' => IPSText::makeSlashesSafe($_POST['topic_title_st']), 'topic_title_end' => IPSText::makeSlashesSafe($_POST['topic_title_end']), 'topic_reply' => intval($this->request['topic_reply']), 'topic_reply_content' => IPSText::makeSlashesSafe($_POST['topic_reply_content']), 'topic_reply_postcount' => intval($this->request['topic_reply_postcount']), 'mm_forums' => $forums, 'topic_approve' => intval($this->request['topic_approve']));
/* Edit */
if ($type == 'edit') {
/* ID */
$id = intval($this->request['id']);
if (!$id) {
$this->registry->output->showError($this->lang->words['mm_valid']);
}
/* Update the multi mod */
$this->DB->update('topic_mmod', $save, 'mm_id=' . $id);
} else {
/* Insert the new multi mod */
$this->DB->insert('topic_mmod', $save);
}
/* Log, Cache, and Bounce */
$this->registry->adminFunctions->saveAdminLog(sprintf($this->lang->words['mm_update'], $type));
$this->multiModerationRebuildCache();
$this->registry->output->silentRedirect($this->settings['base_url'] . $this->html->form_code);
}