<?php
/**
 * @extension       Marlev Template
 * @author          Lev Milicenco<support@marlev.it>
 * @link            http://www.marlev.it
 * @copyright       Copyright 2017 marlev.it All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
require_once 'tmarlev_version.php';
$getlang = JFactory::getLanguage();
?>


<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12 paddingleft0 paddingright0">        
    <div class="img_home" style="text-align: center;">
        <img align="center" src="<?php echo $getlink . "/admin/img/template.png" ?>" />
    </div>


</div>

<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12 paddingleft0 paddingright0">



    <div class="load" >
        <div class="m-update">
            <div class="tm-scontent">
                <h2 align="center" style="color:#7CB107;"> <?php echo JText::_('COM_TMARLEV_UPDATE') . " Template" ?></h2>
                <p align="center" style="font-size:15px;"><?php echo JText::_('COM_TMARLEV_UPDATE_DESC'); ?></p>
                <div class="clearfix"></div>

            </div>

            <?php
            if (@$xml = simplexml_load_file('https://marlev.it/vcheck/extensions_version.xml')):
                $extension_name = $this->load->template;
                $newrelease = (string) $xml->$extension_name;

                if (version_compare($newrelease, $version) == 1) :
                    ?>
                    <div class="checkversion">
                        <span style="color:red;"><?php echo "<strong>" . JText::_("COM_TMARLEV_AGGIORNAMENTO_DISPONIBILE") . " " . ucfirst($this->load->template) . " Template - " . $newrelease . "</strong>"; ?>
                            &nbsp;<a class="btn yrprice-checknow" href="<?php echo $this->links->download ?>" target="_blank"><i class="icon-share"></i> <?php echo JText::_('COM_TMARLEV_VAI_SUL_SITO') ?></a>
                        </span><br/>

                    </div>
                <?php else :
                    ?>
                    <div class="checkversion">
                        <strong><span style="color:green;"><?php echo JText::_("COM_TMARLEV_HAI_ULTIMA_VERSIONE") . " " . ucfirst($this->load->template) . " Template - " . $version; ?></span></strong><br/>

                    </div>
                    <div class="upgrade-notice small"><?php echo JText::_("COM_TMARLEV_UPDATE_NOTICE_ADVISE") ?></div>
                <?php
                endif;

            else:
                ?>
                <div style="float:right;">
                    <strong><?php echo JText::_("COM_TMARLEV_VERSION") . " " . ucfirst($this->load->template) . ' ' . JText::_("COM_EGRAVE") . ' ' . $version; ?></strong></div>

            <?php endif;
            ?> <br/>
            <div class="insert-keysnotice small"><?php echo JText::_("COM_TMARLEV_INSERT_UPDATE_KEYS") ?></div>




            <div class="clearfix"></div>
            <div class="update_keys">
                <div class="control-group">
                    <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
                        <?php echo $this->form->getLabel('product_key'); ?>
                    </div>
                      <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
               <?php echo $this->form->getInput('product_key'); ?>
                                </div>
                      <div class="clearfix"></div>
                       <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
                        <?php echo $this->form->getLabel('private_key'); ?>
                    </div>
                      <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
               <?php echo $this->form->getInput('private_key'); ?>
                                </div>
                      <div class="clearfix"></div>
                </div>
               

            </div>
            <div class="clearfix"></div>
        </div>





    </div>


    <div class="clearfix"></div>
    <div class="m-template">
        <div class="tm-scontent">
            <h2 align="center" style="color:#7CB107;"> <?php echo JText::_('COM_TMARLEV_TEMPLATE') ?></h2>
            <p align="center" style="font-size:15px;">
                <span class="icon-arrow-right"></span><?php echo JText::_('COM_TMARLEV_TEMPLATE_NAME') . " <strong>" . ucfirst($this->load->template); ?> <?php echo ($this->type !== false) ? $this->type : ""; ?></strong><br/>
                <span class="icon-arrow-right"></span><?php echo JText::_('COM_TMARLEV_VERSION_DET') . " <strong>" . $version; ?></strong><br/>
                <span class="icon-arrow-right"></span><?php echo JText::_('COM_TMARLEV_COMPATIBILITA') ?>&nbsp;<img align="center" src="<?php echo $getlink . "/admin/img/compat_30.png" ?>" /><br/>
                <span class="icon-arrow-right"></span><?php echo JText::_('COM_TMARLEV_MPOSTIONS') . " <strong>" . JText::_('TPL_MARLEV_UNLIMITED_POSITION'); ?></strong>&nbsp;[<a class="small" href="http://<?php echo $this->load->template; ?>.marlev.net/module-positions" target="_blank"><?php echo JText::_('COM_TMARLEV_CLICK_TO_VIEW'); ?></a>]<br/>
               <?php if($getlang->getTag() == "it-IT"){
                   $demolink = 'https://marlev.it/it/template-joomla/'.$this->load->template;
               }
               else{
                   $demolink = 'https://marlev.it/en/templates-joomla/'.$this->load->template;
               }
               ?>
                
                <span class="icon-arrow-right"></span><?php echo JText::_('COM_SITE_DEMO'); ?> <strong><a style="font-size:13px;" href="<?php echo $demolink; ?>" target="_blank"><?php echo ucfirst($this->load->template); ?> Demo</a></strong>



            </p>

            <div class="clearfix"></div></div>

    </div>
</div>




