本文整理汇总了PHP中Feedback::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::insert方法的具体用法?PHP Feedback::insert怎么用?PHP Feedback::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::insert方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: changeImage
<?php
require_once "administrator/process/class/class.Feedback.php";
require_once "administrator/includes/injection.php";
require_once "deny/connector.php";
$title = sqlInjection($_POST['title']);
$name = sqlInjection($_POST['fullname']);
$email = sqlInjection($_POST['email']);
$content = sqlInjection($_POST['content']);
$error = "";
$_SESSION['FBERROR'] = "";
if (isset($_POST['submit'])) {
if ($_POST['captcha'] == $_SESSION['CODE']) {
$fb = new Feedback();
$fb->insert($title, $name, $email, $content);
$_SESSION['FBERROR'] = 'Bạn đã gửi thành công.';
} else {
$_SESSION['FBERROR'] = '- Sai mã xác nhận !';
}
}
?>
<script language="javascript">
var error="";
function changeImage(){
document.getElementById('imgcaptcha').src="captcha/captcha.php";
}
function checkEmpty(elementId,errorMessage)
{
x1 = document.getElementById(elementId);
示例2: Feedback
<?php
include 'feedback.php';
$feedback = new Feedback();
$feedback['name'] = $_POST['name'];
$feedback['email'] = $_POST['email'];
$feedback['subject'] = $_POST['subject'];
$feedback['msg'] = $_POST['msg'];
$res = $feedback->insert();
echo "{$res}";
示例3: Feedback
<?php
require_once '/../modal/core/setup.php';
if (Input::exist() && $user->isLoggedIn()) {
$feedback = new Feedback();
try {
$feedback->insert($user->data()->userID, Input::get('type'), Input::get('feedback'));
} catch (Exception $e) {
die($e->getMessage());
}
//force refresh
header('Location: /TCS/feedback');
}
exit;
示例4: submitFeedback
public static function submitFeedback()
{
$captcha = Core::validate(self::getVar('captcha'));
$right_code = Session::getSessionVariable('security_code');
Session::unsetSessionVariable('security_code');
if ($captcha != $right_code) {
Core::printErrorJson('Incorrect captcha');
exit;
}
$usr = self::getCurrentUser(1);
if (!isset($usr)) {
header('Location: /');
exit;
}
$feedback = array();
$feedback['type'] = Core::validate(self::getVar('trouble-type'));
$feedback['message'] = Core::validate(self::getVar('trouble'));
$feedback['email'] = Core::validate(self::getVar('email'));
$fbModel = new Feedback();
$fbModel->setUID($usr->getId());
$fbModel->setType($feedback['type']);
$fbModel->setMessage($feedback['message']);
$fbModel->setEmail($feedback['email']);
$fbModel->insert();
Core::printSuccessJson('Your ticket is active now!');
}