<commit_before>﻿@using WebMatrix.Data;
@{
    // Provider
    var p = LcData.UserInfo.GetRequestedUserRow();
    // Current position data record:
    var pos = PageData["position"];
    
    dynamic vCats = null, verifications = null, licenses = null;
    var vs = new List<object>();
    using (var db = Database.Open("sqlloco")) {
        vCats = db.Query(@"
            SELECT VerificationCategoryID
                  ,VerificationCategoryName
                  ,VerificationCategoryDescription
              FROM VerificationCategory
              WHERE LanguageID = @0 AND CountryID = @1 AND Active = 1
        ", LcData.GetCurrentLanguageID(), LcData.GetCurrentCountryID());
        verifications = db.Query(@"
            SELECT
                V.VerificationType
                ,V.VerificationDescription
                ,V.VerificationCategoryID
                ,UV.VerificationStatusID
                ,VS.VerificationStatusName
                ,UV.DateVerified As ExpirationDate
                ,UV.LastVerifiedDate
                ,UV.Comments
            FROM
                Verification As V
                 INNER JOIN
                UserVerification As UV
                  ON V.VerificationID = UV.VerificationID
                 INNER JOIN
                VerificationStatus As VS
                  ON VS.VerificationStatusID = UV.VerificationStatusID
            WHERE
                UV.UserID = @0
        ", p.UserID);
        licenses = db.Query(LcData.sqlGetVerifiedUserLicenses + " AND PositionID = @1", p.UserID, pos.PositionID);
    }
    foreach(var vc in vCats) {
        var vCat = new {
            CatID = vc.VerificationCategoryID
            ,CatName = vc.VerificationCategoryName
            ,CatDesc = vc.VerificationCategoryDescription
            ,Verifications = new List<dynamic>()
        };
        vs.Add(vCat);
        foreach (var v in verifications) {
            if (v.VerificationCategoryID == vc.VerificationCategoryID) {
                vCat.Verifications.Add(v);
            }
        }
    }
}
@helper printVerifications(int catId, List<dynamic> verifications){
    <ul class="attributes-list verifications-list">
        @if(catId != 4) {
            foreach(var v in verifications){
                <li>
                    <a href="#details" class="view-details-action">@v.VerificationType</a><commit_msg>Profile/#verifications: only must be publicly showed the 'confirmed' status [UserVerification]s. #52<commit_after>﻿@using WebMatrix.Data;
@{
    // Provider
    var p = LcData.UserInfo.GetRequestedUserRow();
    // Current position data record:
    var pos = PageData["position"];
    
    dynamic vCats = null, verifications = null, licenses = null;
    var vs = new List<object>();
    using (var db = Database.Open("sqlloco")) {
        vCats = db.Query(@"
            SELECT VerificationCategoryID
                  ,VerificationCategoryName
                  ,VerificationCategoryDescription
              FROM VerificationCategory
              WHERE LanguageID = @0 AND CountryID = @1 AND Active = 1
        ", LcData.GetCurrentLanguageID(), LcData.GetCurrentCountryID());
        verifications = db.Query(@"
            SELECT
                V.VerificationType
                ,V.VerificationDescription
                ,V.VerificationCategoryID
                ,UV.VerificationStatusID
                ,VS.VerificationStatusName
                ,UV.DateVerified As ExpirationDate
                ,UV.LastVerifiedDate
                ,UV.Comments
            FROM
                Verification As V
                 INNER JOIN
                UserVerification As UV
                  ON V.VerificationID = UV.VerificationID
                 INNER JOIN
                VerificationStatus As VS
                  ON VS.VerificationStatusID = UV.VerificationStatusID
            WHERE
                UV.UserID = @0
                 AND
                UV.VerificationStatusID = 1 -- Confirmed
        ", p.UserID);
        licenses = db.Query(LcData.sqlGetVerifiedUserLicenses + " AND PositionID = @1", p.UserID, pos.PositionID);
    }
    foreach(var vc in vCats) {
        var vCat = new {
            CatID = vc.VerificationCategoryID
            ,CatName = vc.VerificationCategoryName
            ,CatDesc = vc.VerificationCategoryDescription
            ,Verifications = new List<dynamic>()
        };
        vs.Add(vCat);
        foreach (var v in verifications) {
            if (v.VerificationCategoryID == vc.VerificationCategoryID) {
                vCat.Verifications.Add(v);
            }
        }
    }
}
@helper printVerifications(int catId, List<dynamic> verifications){
    <ul class="attributes-list verifications-list">
        @if(catId != 4) {
            foreach(var v in verifications){
                <li>
                    <a href="#details" class="view-details-action">@v.VerificationType</a>
{'fraction_non_alphanumeric': 0.086485381312615, 'fraction_numerical': 0.003066857493355142, 'mean_word_length': 1.7314349525404802, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7372881', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1246, 'n_words': 283}