当前位置: 首页>>代码示例>>PHP>>正文


PHP save_error_data函数代码示例

本文整理汇总了PHP中save_error_data函数的典型用法代码示例。如果您正苦于以下问题:PHP save_error_data函数的具体用法?PHP save_error_data怎么用?PHP save_error_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了save_error_data函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

     $error = array();
     if (strxlen($_POST['question']) > $config['maxtitlelength']) {
         $error[] = $lang->phrase('question_too_long');
     }
     if (strxlen($_POST['question']) < $config['mintitlelength']) {
         $error[] = $lang->phrase('question_too_short');
     }
     if (count_filled($_POST['notice']) < 2) {
         $error[] = $lang->phrase('min_replies_vote');
     }
     if (count_filled($_POST['notice']) > 50) {
         $error[] = $lang->phrase('max_replies_vote');
     }
     if (count($error) > 0) {
         $data = array('question' => $_POST['question'], 'answer' => $_POST['notice']);
         $fid = save_error_data($data);
         error($error, 'managetopic.php?action=vote_edit&amp;id=' . $_GET['id'] . "&amp;fid=" . $fid . SID2URL_x);
     } else {
         $db->query("UPDATE {$db->pre}topics SET vquestion = '{$_POST['question']}' WHERE id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__);
         $result = $db->query("SELECT id, answer FROM {$db->pre}vote WHERE tid = '{$info['id']}' ORDER BY id", __LINE__, __FILE__);
         while ($row = $db->fetch_assoc($result)) {
             if (strlen($_POST['notice'][$row['id']]) > 0 && strlen($_POST['notice'][$row['id']]) < 255) {
                 $db->query("UPDATE {$db->pre}vote SET answer = '{$_POST['notice'][$row['id']]}' WHERE id = '{$row['id']}'", __LINE__, __FILE__);
             }
         }
         if (strlen($_POST['notice'][0]) > 0 && strlen($_POST['notice'][0]) < 255) {
             $db->query("INSERT INTO {$db->pre}vote (tid, answer) VALUES ('{$_GET['id']}','{$_POST['notice'][0]}')", __LINE__, __FILE__);
         }
         ok($lang->phrase('data_success'), "showtopic.php?id={$_GET['id']}");
     }
 } elseif ($action == "vote_delete") {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:managetopic.php

示例2: eval

        }
        ($code = $plugins->load('editprofile_signature_start')) ? eval($code) : null;
        echo $tpl->parse("editprofile/signature");
        ($code = $plugins->load('editprofile_signature_end')) ? eval($code) : null;
    }
} elseif ($_GET['action'] == "about2") {
    if ($my->p['useabout'] == 0) {
        errorLogin($lang->phrase('not_allowed'), "editprofile.php");
    }
    $error = array();
    if (strxlen($_POST['about']) > $config['maxaboutlength']) {
        $error[] = $lang->phrase('about_too_long');
    }
    ($code = $plugins->load('editprofile_about2_start')) ? eval($code) : null;
    if (count($error) > 0 || !empty($_POST['Preview'])) {
        $fid = save_error_data($_POST['about']);
        if (!empty($_POST['Preview'])) {
            $slog->updatelogged();
            $db->close();
            viscacha_header("Location: editprofile.php?action=about&job=preview&fid=" . $fid . SID2URL_JS_x);
            exit;
        } else {
            error($error, "editprofile.php?action=about&amp;fid=" . $fid . SID2URL_x);
        }
    } else {
        ($code = $plugins->load('editprofile_about2_query')) ? eval($code) : null;
        $db->query("UPDATE {$db->pre}user SET about = '{$_POST['about']}' WHERE id = '{$my->id}'");
        ok($lang->phrase('data_success'), "editprofile.php?action=about" . SID2URL_x);
    }
} elseif ($_GET['action'] == "about") {
    if ($my->p['useabout'] == 0) {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:editprofile.php

示例3: foreach

        }
    }
    foreach ($notices as $key => $note) {
        $notices[$key] = array('length' => numbers(strxlen($note)), 'text' => $note, 'rows' => count_nl($note, 15) + 1);
    }
    $notes = count($notices);
    $used_chars = numbers(strxlen(str_replace('[VSEP]', '', $my->notice)));
    $chars = numbers($config['maxnoticelength']);
    $mymodules->load('editprofile_notice_top');
    echo $tpl->parse("editprofile/notice");
} elseif ($_GET['action'] == "about2") {
    if ($my->p['useabout'] == 0) {
        errorLogin($lang->phrase('not_allowed'), "editprofile.php");
    }
    if (strxlen($_POST['comment']) > $config['maxaboutlength']) {
        $fid = save_error_data($_POST['comment']);
        error($lang->phrase('about_too_long'), "editprofile.php?action=about&amp;fid=" . $fid . SID2URL_x);
    } else {
        $db->query("UPDATE {$db->pre}user SET about = '" . $_POST['comment'] . "' WHERE id = '" . $my->id . "'");
        ok($lang->phrase('data_success'), "editprofile.php?action=about" . SID2URL_x);
    }
} elseif ($_GET['action'] == "about") {
    if ($my->p['useabout'] == 0) {
        errorLogin($lang->phrase('not_allowed'), "editprofile.php");
    }
    $breadcrumb->Add($lang->phrase('editprofile_about'));
    echo $tpl->parse("header");
    echo $tpl->parse("menu");
    if (strlen($_GET['fid']) == 32) {
        $data = $gpc->prepare(import_error_data($_GET['fid']));
    } else {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:editprofile.php

示例4: addprofile_customprepare

		$error[] = $lang->phrase('pw_comparison_failed');
	}
	// Custom profile fields
	$custom = addprofile_customprepare();
	$error = array_merge($error, $custom['error']);

	($code = $plugins->load('register_save_errorhandling')) ? eval($code) : null;

	if (count($error) > 0) {
		$data = $custom['data'];
		$data['name'] = $_POST['name'];
		$data['email'] = $_POST['email'];
		$data['temp'] = $_POST['temp'];
		$data['human'] = $human;
		($code = $plugins->load('register_save_errordata')) ? eval($code) : null;
		$fid = save_error_data($data, $fid);
		error($error, 'register.php?fid='.$fid.SID2URL_x);
	}
	else {
		set_flood();
	    $reg = time();
	    $confirmcode = md5($config['cryptkey'].$reg);
	    $pw_md5 = md5($_POST['pwx']);

	    ($code = $plugins->load('register_save_queries')) ? eval($code) : null;
		$db->query("INSERT INTO {$db->pre}user (name, pw, mail, regdate, confirm, groups, signature, about) VALUES ('{$_POST['name']}', '{$pw_md5}', '{$_POST['email']}', '{$reg}', '{$config['confirm_registration']}', '".GROUP_MEMBER."', '', '')");
        $redirect = $db->insert_id();

		// Custom profile fields
		addprofile_customsave($custom['data'], $redirect);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:30,代码来源:register.php


注:本文中的save_error_data函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。