本文整理汇总了PHP中F_stripslashes_formfields函数的典型用法代码示例。如果您正苦于以下问题:PHP F_stripslashes_formfields函数的具体用法?PHP F_stripslashes_formfields怎么用?PHP F_stripslashes_formfields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了F_stripslashes_formfields函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: F_print_error
case 'add':
// Add
if ($formstatus = F_check_form_fields()) {
// check submitted form fields
// check for loop connection
if ($cab_a_obj_id == $cab_b_obj_id) {
F_print_error('WARNING', $l['m_connection_loop']);
$formstatus = false;
F_stripslashes_formfields();
break;
}
// check if the connection is unique
if (!F_check_unique(K_TABLE_CABLES, 'cab_a_obj_id=' . $cab_a_obj_id . ' AND cab_b_obj_id=' . $cab_b_obj_id . ' AND cab_cbt_id=' . $cab_cbt_id)) {
F_print_error('WARNING', $l['m_duplicate_connection']);
$formstatus = false;
F_stripslashes_formfields();
break;
}
$sql = 'INSERT INTO ' . K_TABLE_CABLES . ' (
cab_a_obj_id,
cab_b_obj_id,
cab_cbt_id,
cab_color
) VALUES (
' . $cab_a_obj_id . ',
' . $cab_b_obj_id . ',
' . $cab_cbt_id . ',
\'' . F_escape_sql($cab_color) . '\'
)';
if (!($r = F_db_query($sql, $db))) {
F_display_db_error(false);
示例2: F_check_form_fields
/**
* Check Form Fields.
* see: F_check_required_fields, F_check_fields_format
* @return false in case of error, true otherwise
*/
function F_check_form_fields()
{
require_once '../config/tce_config.php';
global $l;
$formfields = F_decode_form_fields();
//decode form fields
//check missing fields
if ($missing_fields = F_check_required_fields($formfields)) {
F_print_error('WARNING', $l['m_form_missing_fields'] . ': ' . $missing_fields);
F_stripslashes_formfields();
return FALSE;
}
//check fields format
if ($wrong_fields = F_check_fields_format($formfields)) {
F_print_error('WARNING', $l['m_form_wrong_fields'] . ': ' . $wrong_fields);
F_stripslashes_formfields();
return FALSE;
}
return TRUE;
}