<commit_before><?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
#use frontend\components\CommonHelper;
use yii\helpers\ArrayHelper;
use common\models\LoginForm;
use yii\captcha\Captcha;
use common\components\CommonHelper;
use common\components\MessageHelper;
use yii\helpers\Url;
use common\models\user;
$Id = 0;
$PROFILE_COMPLETENESS = 0;

if (!Yii::$app->user->isGuest) {
    $Id = Yii::$app->user->identity->id;
    $PROFILE_COMPLETENESS = $this->context->profileCompleteness($model->completed_step);
}

$HOME_URL = Yii::getAlias('@web')."/";
$HOME_URL_SITE = Yii::getAlias('@web')."/site/";
$UPLOAD_DIR = Yii::getAlias('@frontend') .'/web/uploads/';
$IMG_DIR = Yii::getAlias('@frontend') .'/web/';
?>
    <div class="main-section">
        <?= $this->render('/layouts/parts/_headerafterlogin'); ?>
        <link rel="stylesheet" type="text/css" href="<?= $HOME_URL ?>css/radical-progress.css"/>
        <main data-ng-app="myApp" data-ng-controller="dashboardController">
            <section>
                <div class="container">
                    <div class="row">
                        <div class="col-sm-4 col-md-3">
                            <div class="browse-photo">
                                <form action="" method="post" enctype="multipart/form-data"
                                      id="upload_form">
                                    <input name="__files[]" id="file_browse" type="file"
                                           multiple class="fileupload"/>
                                </form>
                            </div>
                            <div class="bg-white">
                                <div class="radical-progress-wrapper">
                                    <div class="panel-body">
                                        <div class="profile-header-container">
                                            <div class="profile-header-img">
                                                <?= Html::img(CommonHelper::getPhotos('USER', Yii::$app->user->identity->id, "200" . Yii::$app->user->identity->propic, 200, '', 'Yes'), ['width' => '200', 'height' => '200', 'alt' => 'Profile Photo', 'class' => 'img-circle mainpropic']); ?>
                                                <!-- badge -->
                                                <div class="rank-label-container img-circle">
                                                    <div class="dropdown">
                                                        <button class="btn dropdown-toggle" type="button"
                                                                id="dropdownMenu1" data-toggle="dropdown"
                                                                aria-haspopup="true" aria-expanded="true"><i
                                                                class="fa fa-pencil"></i></button>
                                                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                                            <li><a href="javascript:void(0)" data-toggle="modal"
                                                                   class="gallery-popup"
                                                                   data-target="#photo">Choose from My Photos</a></li>
                                                            <li><a href="javascript:void(0)"
                                                                   class="file_browse_wrapper">Upload Photo</a>
                                                            </li>
                                                            <li><a href="javascript:void(0)">Reposition</a></li>
                                                            <li><a href="javascript:void(0)"
                                                                   class="_profile-photo-remove">Delete Photo</a></li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="ad-title" style="margin-bottom:0">My Dashboard</div>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="heading-xs"> My Profile</h3>
                                    </div>
                                    <div class="panel-body">
                                        <ul class="reset mrg-lt-15 list-item">
                                            <li><a href="<?= $HOME_URL ?>user/my-profile" title="Edit Profile">Edit
                                                    Profile</a></li>
                                            <li><a href="<?= $HOME_URL ?>user/photos" title="Manage Photos">Manage
                                                    Photos</a></li>
                                            <li><a href="<?= $HOME_URL ?>user/my-profile?tab=EP"
                                                   title="Edit Preference"> Edit Preference</a>
                                            </li>
                                            <li><a href="javascript:void(0)" title="Privacy Options"
                                                   data-target="#privacyoption"
                                                   data-toggle="modal"> Privacy Options </a></li>
                                        </ul>
                                        <!-- <a href="javascript:void(0)"
                     class="pull-left profile_set"
                     data-id="<?= $V['iPhoto_ID'] ?>"
                     data-target="#photodelete" data-toggle="modal">
                    Profile pic
                  </a>-->
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border padd-hr-10 panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">Unblock Trust Badges
                                            <!--<img src="images/follower-member.png">-->
                                            <?= Html::img('@web/images/follower-member.png', ['width' => '', 'height' => '', 'alt' => '']); ?>
                                        </h3>
                                    </div>
                                    <div class="panel-body no-padd text-center">
                                        <div class="profile-edit">
                                            <ul class="list-inline minor-control">
                                                <?php
                                                $USER_FACEBOOK = \common\models\User::weightedCheck(11);
                                                $USER_PHONE = \common\models\User::weightedCheck(8);
                                                $USER_EMAIL = \common\models\User::weightedCheck(9);
                                                $USER_APPROVED = \common\models\User::weightedCheck(10);
                                                ?>

                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_FACEBOOK){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-facebook"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_PHONE){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-mobile"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_EMAIL){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-envelope-o"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_APPROVED){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-user"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                            </ul>

                                        </div>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">Messages</h3>
                                    </div>
                                    <div class="panel-body">
                                        <ul class="reset list-item">
                                            <li><a href="<?= CommonHelper::getMailBoxUrl() ?>"
                                                   title="Inbox">Inbox</a> <span
                                                    class="badge">10</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl(1.3) ?>" title="Accepted">Accepted
                                                    Interest</a> <span
                                                    class="badge">2</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl() ?>" title="Not Replied"> Not
                                                    Replied </a> <span
                                                    class="badge">1</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl(2) ?>" title="Sent"> Sent </a>
                                                <span class="badge">1</span></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <?php
                                if (count($PreferencesLocation) > 0 || count($PreferencesProfession) > 0 || count($PreferencesEducation) > 0 || count($PreferencesPersonal) > 0) {
                                ?>
                                <div class="panel no-border padd-hr-10 panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">My Preferences </h3>
                                    </div>
                                    <div class="refe-accord">
                                        <div class="panel-group" id="accordion" role="tablist"
                                             aria-multiselectable="true">
                                            <?php if (count($PreferencesLocation)) { ?>
                                                <div class="panel panel-default">
                                                    <div class="panel-heading" role="tab" id="headingOne">
                                                        <h4 class="panel-title">
                                                            <a role="button" data-toggle="collapse"
                                                               data-parent="#accordion" href="#collapseOnes"
                                                               aria-expanded="true" aria-controls="collapseOnes">
                                                                Location
                                                                <!--<span class="blue">(669)</span>-->
                                                                <span
                                                                    class="badge"><?= count($PreferencesLocation) ?></span>
                                                                <i class="fa indicator fa-angle-up"></i>
                                                            </a>
                                                        </h4>
                                                    </div><commit_msg>- My Preferences Section only whoe when any of Preferencess have values<commit_after><?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
#use frontend\components\CommonHelper;
use yii\helpers\ArrayHelper;
use common\models\LoginForm;
use yii\captcha\Captcha;
use common\components\CommonHelper;
use common\components\MessageHelper;
use yii\helpers\Url;
use common\models\user;
$Id = 0;
$PROFILE_COMPLETENESS = 0;

if (!Yii::$app->user->isGuest) {
    $Id = Yii::$app->user->identity->id;
    $PROFILE_COMPLETENESS = $this->context->profileCompleteness($model->completed_step);
}

$HOME_URL = Yii::getAlias('@web')."/";
$HOME_URL_SITE = Yii::getAlias('@web')."/site/";
$UPLOAD_DIR = Yii::getAlias('@frontend') .'/web/uploads/';
$IMG_DIR = Yii::getAlias('@frontend') .'/web/';
?>
    <div class="main-section">
        <?= $this->render('/layouts/parts/_headerafterlogin'); ?>
        <link rel="stylesheet" type="text/css" href="<?= $HOME_URL ?>css/radical-progress.css"/>
        <main data-ng-app="myApp" data-ng-controller="dashboardController">
            <section>
                <div class="container">
                    <div class="row">
                        <div class="col-sm-4 col-md-3">
                            <div class="browse-photo">
                                <form action="" method="post" enctype="multipart/form-data"
                                      id="upload_form">
                                    <input name="__files[]" id="file_browse" type="file"
                                           multiple class="fileupload"/>
                                </form>
                            </div>
                            <div class="bg-white">
                                <div class="radical-progress-wrapper">
                                    <div class="panel-body">
                                        <div class="profile-header-container">
                                            <div class="profile-header-img">
                                                <?= Html::img(CommonHelper::getPhotos('USER', Yii::$app->user->identity->id, "200" . Yii::$app->user->identity->propic, 200, '', 'Yes'), ['width' => '200', 'height' => '200', 'alt' => 'Profile Photo', 'class' => 'img-circle mainpropic']); ?>
                                                <!-- badge -->
                                                <div class="rank-label-container img-circle">
                                                    <div class="dropdown">
                                                        <button class="btn dropdown-toggle" type="button"
                                                                id="dropdownMenu1" data-toggle="dropdown"
                                                                aria-haspopup="true" aria-expanded="true"><i
                                                                class="fa fa-pencil"></i></button>
                                                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                                                            <li><a href="javascript:void(0)" data-toggle="modal"
                                                                   class="gallery-popup"
                                                                   data-target="#photo">Choose from My Photos</a></li>
                                                            <li><a href="javascript:void(0)"
                                                                   class="file_browse_wrapper">Upload Photo</a>
                                                            </li>
                                                            <li><a href="javascript:void(0)">Reposition</a></li>
                                                            <li><a href="javascript:void(0)"
                                                                   class="_profile-photo-remove">Delete Photo</a></li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="ad-title" style="margin-bottom:0">My Dashboard</div>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="heading-xs"> My Profile</h3>
                                    </div>
                                    <div class="panel-body">
                                        <ul class="reset mrg-lt-15 list-item">
                                            <li><a href="<?= $HOME_URL ?>user/my-profile" title="Edit Profile">Edit
                                                    Profile</a></li>
                                            <li><a href="<?= $HOME_URL ?>user/photos" title="Manage Photos">Manage
                                                    Photos</a></li>
                                            <li><a href="<?= $HOME_URL ?>user/my-profile?tab=EP"
                                                   title="Edit Preference"> Edit Preference</a>
                                            </li>
                                            <li><a href="javascript:void(0)" title="Privacy Options"
                                                   data-target="#privacyoption"
                                                   data-toggle="modal"> Privacy Options </a></li>
                                        </ul>
                                        <!-- <a href="javascript:void(0)"
                     class="pull-left profile_set"
                     data-id="<?= $V['iPhoto_ID'] ?>"
                     data-target="#photodelete" data-toggle="modal">
                    Profile pic
                  </a>-->
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border padd-hr-10 panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">Unblock Trust Badges
                                            <!--<img src="images/follower-member.png">-->
                                            <?= Html::img('@web/images/follower-member.png', ['width' => '', 'height' => '', 'alt' => '']); ?>
                                        </h3>
                                    </div>
                                    <div class="panel-body no-padd text-center">
                                        <div class="profile-edit">
                                            <ul class="list-inline minor-control">
                                                <?php
                                                $USER_FACEBOOK = \common\models\User::weightedCheck(11);
                                                $USER_PHONE = \common\models\User::weightedCheck(8);
                                                $USER_EMAIL = \common\models\User::weightedCheck(9);
                                                $USER_APPROVED = \common\models\User::weightedCheck(10);
                                                ?>

                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_FACEBOOK){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-facebook"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_PHONE){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-mobile"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_EMAIL){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-envelope-o"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                                <li><a href="javascript:void(0)"
                                                       <?php if ($USER_APPROVED){ ?>class="active"<?php } ?>><i
                                                            class="fa fa-user"></i> <span
                                                            class="badge"><i
                                                                class="fa fa-check"></i></span></a>
                                                </li>
                                            </ul>

                                        </div>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <div class="panel no-border panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">Messages</h3>
                                    </div>
                                    <div class="panel-body">
                                        <ul class="reset list-item">
                                            <li><a href="<?= CommonHelper::getMailBoxUrl() ?>"
                                                   title="Inbox">Inbox</a> <span
                                                    class="badge">10</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl(1.3) ?>" title="Accepted">Accepted
                                                    Interest</a> <span
                                                    class="badge">2</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl() ?>" title="Not Replied"> Not
                                                    Replied </a> <span
                                                    class="badge">1</span></li>
                                            <li><a href="<?= CommonHelper::getMailBoxUrl(2) ?>" title="Sent"> Sent </a>
                                                <span class="badge">1</span></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="divider no-mrg"></div>
                                <?php
                                if (count($PreferencesLocation) > 0 || count($PreferencesProfession) > 0 || count($PreferencesEducation) > 0 || count($PreferencesPersonal) > 0) {
                                ?>
                                <div class="panel no-border padd-hr-10 panel-default panel-friends">
                                    <div class="panel-heading">
                                        <h3 class="panel-title text-muted">My Preferences</h3>
                                    </div>
                                    <div class="refe-accord">
                                        <div class="panel-group" id="accordion" role="tablist"
                                             aria-multiselectable="true">
                                            <?php if (count($PreferencesLocation)) { ?>
                                                <div class="panel panel-default">
                                                    <div class="panel-heading" role="tab" id="headingOne">
                                                        <h4 class="panel-title">
                                                            <a role="button" data-toggle="collapse"
                                                               data-parent="#accordion" href="#collapseOnes"
                                                               aria-expanded="true" aria-controls="collapseOnes">
                                                                Location
                                                                <!--<span class="blue">(669)</span>-->
                                                                <span
                                                                    class="badge"><?= count($PreferencesLocation) ?></span>
                                                                <i class="fa indicator fa-angle-up"></i>
                                                            </a>
                                                        </h4>
                                                    </div>
{'fraction_non_alphanumeric': 0.11406496026950821, 'fraction_numerical': 0.004833571350104361, 'mean_word_length': 0.6878862793572311, 'pattern_counts': {'":': 0, '<': 445, '<?xml version=': 0, '>': 497, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 492, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1665605', 'n_tokens_mistral': 5022, 'n_tokens_neox': 4853, 'n_words': 889}