コード例 #1
0
            if ($dResult[0] == "") {
                $mysql = "insert into {$feedback_table} set rater_id='{$user_id}',rated_id='{$rated_id}',\n\t\t\t\t\t\t\tskill_id='{$skill_id}',value='{$value}',feedback_text='{$text}',status='{$status}',rated_date=now()";
            } else {
                $fid = $dResult['f_id'];
                $mysql = "update  {$feedback_table} set rater_id='{$user_id}',rated_id='{$rated_id}',\n\t\t\t\t\t\t\tskill_id='{$skill_id}',value='{$value}',feedback_text='{$text}',status='{$status}',\n\t\t\t\t\t\t\trated_date=now() where f_id='{$fid}'";
            }
            $db_object->insert($mysql);
        }
        if ($status == '1') {
            echo $error_msg['cFeedbackSubmitted'];
        }
        if ($status == '0') {
            echo $error_msg['cFeedbackSaved'];
        }
        include "footer.php";
        exit;
    }
}
$obj = new Requests();
$save = $post_var['save'];
$submit = $post_var['submit'];
if ($save) {
    $status = "0";
    $obj->update($db_object, $common, $post_var, $user_id, $error_msg, $status);
}
if ($submit) {
    $status = "1";
    $obj->update($db_object, $common, $post_var, $user_id, $error_msg, $status);
}
$obj->feedback_request($db_object, $common, $user_id, $default, $ratedid, $error_msg, $learning, $mode);
include "footer.php";