コード例 #1
0
ファイル: Feedback.php プロジェクト: 4v4t4r/CTF-LCC
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($error) {
    $Tpl->SetBlockVar("Error", "");
    $Tpl->parse("Error", "");
}
$db = new clsDBNetConnect();
$query = "select sum(rating) from feedback where being_rated = '" . $_GET["user_id"] . "' and `counter` IS NULL";
$db->query($query);
if ($db->next_record()) {
    $rating = $db->f("sum(rating)");
} else {
    $rating = 0;
}
$query = "select count(rating) from feedback where being_rated = '" . $_GET["user_id"] . "' and `counter` IS NULL";
$db->query($query);
if ($db->next_record()) {
    $total = $db->f("count(rating)");
} else {
    $total = 0;