<commit_before><?php

/**
 * RcmPeopleSlider content template
 *
 * Renders this plugins view
 *
 * PHP version 5.3
 *
 * LICENSE: No License yet
 *
 * @category  Reliv
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   GIT: <git_id>
 */
$this->headLink()->appendStylesheet(
    $this->basePath() . '/modules/rcm-people-slider/style.css'
);
$this->headScript()->appendFile(
    $this->basePath()
    . '/modules/rcm/vendor/aperture-slider/aperture-slider.js',
    'text/javascript'
);
$this->headScript()->appendFile(
    $this->basePath() . '/modules/rcm-people-slider/rcm-people-slider.js',
    'text/javascript'
);

//Figure out which person we are viewing. This non-js support is only for SEO.
$selectedPersonId = 0;
if (!empty($_GET['id'])
    && $_GET['id'] < count($this->instanceConfig['people'])
) {
    $selectedPersonId = $_GET['id'];
}

$selectedPerson = $this->instanceConfig['people'][$selectedPersonId];

$uriParts = explode('?', $_SERVER['REQUEST_URI']);
$currentUrl = '//' . $_SERVER['HTTP_HOST'] . $uriParts[0];
?>
<script type="text/javascript">
    $(function () {
        new RcmPeopleSlider(
            <?=  $this->instanceId?>,
            <?=  json_encode($this->instanceConfig)?>
        );
    });
</script>
<div>

    <div class="peopleDetails"
         data-selectedPersonId="<?= $selectedPersonId ?>">
        <?php //person output here for non-js support for SEO reasons only ?>
        <table class="personDetails">
            <tr>
                <td>
                    <div class="longDesc">
                        <?= $selectedPerson['longDesc'] ?>
                    </div>
                </td>
                <td>
                    <img class="largeImage"
                         src="<?= $selectedPerson['largeImage'] ?>">
                </td>
            </tr>
        </table>
    </div>

    <br>

    <div class="peopleBorder">

        <div class="left arrow">&nbsp;</div>

        <div class="peopleAperture">
            <div class="previews">
                <?php foreach (
                    $this->instanceConfig['people'] as $personId => &$person
                ): ?>
                    <?php
                    $classAppend = null;
                    if ($personId == $selectedPersonId) {
                        $classAppend = ' selected';
                    }
                    ?>
                    <a href="<?= "$currentUrl?id=$personId" //for SEO ?>"
                       class="person<?= $classAppend ?>"
                       data-personId="<?= $personId ?>">
                        <img class="smallImage"
                             src="<?= $person['smallImage'] ?>">

                        <div class="shortDesc"><?= $person['shortDesc'] ?></div>
                    </a>
                <?php endforeach ?>
            </div>
        </div>

        <div class="right arrow">&nbsp;</div><commit_msg>rebiuld admin instance config api<commit_after><?php

/**
 * RcmPeopleSlider content template
 *
 * Renders this plugins view
 *
 * PHP version 5.3
 *
 * LICENSE: No License yet
 *
 * @category  Reliv
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   GIT: <git_id>
 */
$this->headLink()->appendStylesheet(
    $this->basePath() . '/modules/rcm-people-slider/style.css'
);
$this->headScript()->appendFile(
    $this->basePath()
    . '/modules/rcm/vendor/aperture-slider/aperture-slider.js',
    'text/javascript'
);
$this->headScript()->appendFile(
    $this->basePath() . '/modules/rcm-people-slider/rcm-people-slider.js',
    'text/javascript'
);

//Figure out which person we are viewing. This non-js support is only for SEO.
$selectedPersonId = 0;
if (!empty($_GET['id'])
    && $_GET['id'] < count($this->instanceConfig['people'])
) {
    $selectedPersonId = $_GET['id'];
}

$selectedPerson = $this->instanceConfig['people'][$selectedPersonId];

$uriParts = explode('?', $_SERVER['REQUEST_URI']);
$currentUrl = '//' . $_SERVER['HTTP_HOST'] . $uriParts[0];
?>
<script type="text/javascript">
    $(function () {
        new RcmPeopleSlider(
            <?=  $this->instanceId?>,
            <?=  json_encode($this->instanceConfig)?>
        );
    });
</script>
<div>

    <div class="peopleDetails"
         data-selectedPersonId="<?= $selectedPersonId ?>">
        <?php //person output here for non-js support for SEO reasons only ?>
        <table class="personDetails">
            <tr>
                <td>
                    <div class="longDesc">
                        <?= $selectedPerson['longDesc'] ?>
                    </div>
                </td>
                <td>
                    <img class="largeImage"
                         src="<?= $selectedPerson['largeImage'] ?>">
                </td>
            </tr>
        </table>
    </div>

    <br>

    <div class="peopleBorder">

        <div class="left arrow">&nbsp;</div>

        <div class="peopleAperture">
            <div class="previews">
                <?php foreach (
                    $this->instanceConfig['people'] as $personId => $person
                ): ?>
                    <?php
                    $classAppend = null;
                    if ($personId == $selectedPersonId) {
                        $classAppend = ' selected';
                    }
                    ?>
                    <a href="<?= "$currentUrl?id=$personId" //for SEO ?>"
                       class="person<?= $classAppend ?>"
                       data-personId="<?= $personId ?>">
                        <img class="smallImage"
                             src="<?= $person['smallImage'] ?>">

                        <div class="shortDesc"><?= $person['shortDesc'] ?></div>
                    </a>
                <?php endforeach ?>
            </div>
        </div>

        <div class="right arrow">&nbsp;</div>
{'fraction_non_alphanumeric': 0.16865646544476207, 'fraction_numerical': 0.0026904321506642003, 'mean_word_length': 1.7677989762680317, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 133, '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': '3308621', 'n_tokens_mistral': 1707, 'n_tokens_neox': 1651, 'n_words': 331}