<?php
/* Smarty version 3.1.33, created on 2019-07-20 10:26:08
  from '/var/www/uvocorp/templates/dashboard/system/sites.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5d32d0204814a9_69179628',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '3218ac21e5ccb4588c23fde1d228f6587c554d7f' => 
    array (
      0 => '/var/www/uvocorp/templates/dashboard/system/sites.tpl',
      1 => 1563005785,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5d32d0204814a9_69179628 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_18695235515d32d0203dbc85_17628507', 'content_wrapper');
$_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_18695235515d32d0203dbc85_17628507 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_18695235515d32d0203dbc85_17628507',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<div class="panel panel-default">
    <div class="panel-heading with-icon">

        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "sites") {?>
            <div class="pull-right flip">
                <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/system/sites/add" class="btn btn-primary">
                    <i class="fa fa-plus"></i> Add New Site
                </a>
            </div>
        <?php }?>

        <i class="fa fa-globe pr5 panel-icon"></i>
        <strong>Sites</strong>
        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "edit") {?> &rsaquo; <strong><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['name'], ENT_QUOTES, 'UTF-8');?>
</strong><?php }?>
        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "add") {?> &rsaquo; <strong>Add New</strong><?php }?>
    </div>

    <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "sites") {?>
        <div class="panel-body">
            <?php if ($_smarty_tpl->tpl_vars['total_sites']->value) {?>
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover js_dataTable">
                        <thead>
                            <tr>
                                <td>Site ID</td>
                                <td>Site Name</td>
                                <td>URL</td>
                                <td>Orders</td>
                                <td>Customers</td>
                                <td>Payments</td>
                                <td>Actions</td>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['sites']->value, 'site');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['site']->value) {
?>
                                <tr>
                                    <td><a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/system/sites/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
">#<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
</a></td>
                                    <td><span class="order-subject"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['name'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                                    <td><span class="order-subject"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['domain'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                                    <td><span class="green_currency"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['orders'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                                    <td><span class="green_currency"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['customers'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                                    <td><span class="green_currency">$<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['payments'], ENT_QUOTES, 'UTF-8');?>
</span></td>
                                    <td>
                                        <button data-toggle="tooltip" data-placement="top" title="Delete" class="btn btn-xs btn-danger js_admin-deleter" data-handle="site" data-id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
">
                                            <i class="fa fa-trash-alt"></i>
                                        </button>
                                        <a data-toggle="tooltip" data-placement="top" title="Edit" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/system/sites/edit/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
" class="btn btn-xs btn-primary">
                                            <i class="fa fa-pencil-alt"></i>
                                        </a>
                                    </td>
                                </tr>
                            <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </tbody>
                    </table>

                    <?php echo $_smarty_tpl->tpl_vars['pager']->value;?>

                </div>
            <?php } else { ?>
                <div class="text-center x-muted"> <i class="fa fa-globe fa-4x"></i>
                    <p class="mb10"><strong>No sites to show</strong></p>
                </div>
            <?php }?>
        </div>

    <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "edit") {?>

        <div class="panel-body">

            <!-- tabs nav -->
            <ul class="nav nav-tabs admin mb20">
                <li class="active">
                    <a href="#general" data-toggle="tab">
                        <i class="fa fa-server fa-fw mr5"></i><strong class="pr5">General</strong>
                    </a>
                </li>
                <li>
                    <a href="#features" data-toggle="tab">
                        <i class="fa fa-microchip fa-fw mr5"></i><strong class="pr5">Features</strong>
                    </a>
                </li> 
                <li>
                    <a href="#email" data-toggle="tab">
                        <i class="fa fa-envelope fa-fw mr5"></i><strong class="pr5">Email</strong>
                    </a>
                </li> 
                <li>
                    <a href="#paypal" data-toggle="tab">
                        <i class="fab fa-paypal fa-fw mr5"></i><strong class="pr5">PayPal</strong>
                    </a>
                </li> 
                <li>
                    <a href="#stripe" data-toggle="tab">
                        <i class="fa fa-money-bill fa-fw mr5"></i><strong class="pr5">Stripe</strong>
                    </a>
                </li> 
                <li>
                    <a href="#currency" data-toggle="tab">
                        <i class="fa fa-dollar-sign fa-fw mr5"></i><strong class="pr5">Currency</strong>
                    </a>
                </li> 
            </ul>
            <!-- tabs nav -->

            <!-- tabs content -->
            <div class="tab-content">

                <!-- General -->
                <div class="tab-pane active" id="general">
                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=general_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
"/>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Site ID
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="site_id" id="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['id'], ENT_QUOTES, 'UTF-8');?>
" disabled="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Site name
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="site_name" id="site_name" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['name'], ENT_QUOTES, 'UTF-8');?>
" maxlength="255">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Site email
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="site_email" id="site_email" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['email'], ENT_QUOTES, 'UTF-8');?>
" maxlength="255">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Site URL
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="site_domain" id="site_domain" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['site']->value['domain'], ENT_QUOTES, 'UTF-8');?>
" maxlength="255">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Default Course Level
                            </label>
                            <div class="col-sm-9">
                                <select class="form-control" name="default_course_level">
                                    <option value="1" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DEFAULT_COURSELEVEL'] == 1) {?>selected=""<?php }?>>High school</option>
                                    <option value="2" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DEFAULT_COURSELEVEL'] == 2) {?>selected=""<?php }?>>Undergrad. (yrs 1-2)</option>
                                    <option value="3" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DEFAULT_COURSELEVEL'] == 3) {?>selected=""<?php }?>>Undergrad. (yrs 3-4)</option>
                                    <option value="4" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DEFAULT_COURSELEVEL'] == 4) {?>selected=""<?php }?>>Master's</option>
                                    <option value="5" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DEFAULT_COURSELEVEL'] == 5) {?>selected=""<?php }?>>PhD</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Urgent Max Pages
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control force-integer" type="text" name="urgent_deadline_max_pages" id="urgent_deadline_max_pages" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['URGENT_DEADLINE_MAX_PAGES'], ENT_QUOTES, 'UTF-8');?>
">
                                <span class="help-block">
                                    The maximum number of pages that can be ordered for an urgent deadline
                                </span>
                            </div>
                        </div>

                        <div class="divider"></div>
                        
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">Email Logo</label>
                            <div class="col-sm-9">
                                <?php if ($_smarty_tpl->tpl_vars['formValues']->value['SITE_EMAIL_LOGO'] == '') {?>
                                    <div class="x-image">
                                        <button type="button" class="close x-hidden js_x-image-remover" title='Remove'>
                                            <span>×</span>
                                        </button>
                                        <div class="loader loader_small x-hidden"></div>
                                        <i class="fa fa-camera fa-lg js_x-uploader" data-handle="x-image"></i>
                                        <input type="hidden" class="js_x-image-input" name="site_email_logo" value="">
                                    </div>
                                <?php } else { ?>
                                    <div class="x-image" style="background-image: url('<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['uploads_path']->value, ENT_QUOTES, 'UTF-8');?>
/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_EMAIL_LOGO'], ENT_QUOTES, 'UTF-8');?>
')">
                                        <button type="button" class="close js_x-image-remover" title='Remove'>
                                            <span>×</span>
                                        </button>
                                        <div class="loader loader_small x-hidden"></div>
                                        <i class="fa fa-camera fa-lg js_x-uploader" data-handle="x-image"></i>
                                        <input type="hidden" class="js_x-image-input" name="site_email_logo" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_EMAIL_LOGO'], ENT_QUOTES, 'UTF-8');?>
">
                                    </div>
                                <?php }?>
                                <span class="help-block">
                                    The perfect size for your logo should be (width: 130px & height: 50px)
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>

                    </form>
                </div>
                <!-- General -->

                <!-- Features -->
                <div class="tab-pane" id="features">
                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=features_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_ID'], ENT_QUOTES, 'UTF-8');?>
"/>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Free Inquiry
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="order_inquiry_enabled">
                                    <input type="checkbox" name="order_inquiry_enabled" id="order_inquiry_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['INQUIRY_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                Allow customers to make free inquiries
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Smart Paper
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="smart_paper_enabled">
                                    <input type="checkbox" name="smart_paper_enabled" id="smart_paper_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['SMART_PAPER_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Smart Paper (20%) - Get your paper with detailed comments on key writing aspects and prompts for your own writing.
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Expert Proofreading
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="expert_proofreading_enabled">
                                    <input type="checkbox" name="expert_proofreading_enabled" id="expert_proofreading_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['EXPERT_PROOFREADING_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Expert Proofreading (25%) - Get your paper checked by an expert proofreader: no grammatical and spelling mistakes, a perfect match with your requirements, and correspondence with the chosen academic level.
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Writer Samples
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="writer_samples_enabled">
                                    <input type="checkbox" name="writer_samples_enabled" id="writer_samples_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['WRITER_SAMPLES_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Writer Samples ($5) - Review 3 samples of work previously completed by the writer assigned to your order.
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Progressive Delivery
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="p_delivery_enabled">
                                    <input type="checkbox" name="p_delivery_enabled" id="p_delivery_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PROGRESSIVE_DELIVERY_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Progressive Delivery (10%) - Get your paper delivered step by step. For more information, please check our Progressive Delivery web page. Available for orders with a deadline of 5 days and longer, and with the value of $200 or more.
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Copy of Sources
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="copy_of_sources_enabled">
                                    <input type="checkbox" name="copy_of_sources_enabled" id="copy_of_sources_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['COPY_OF_SOURCES_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Copy Of Sources (10%) - Get excerpts of the articles and e-books or the links to these excerpts cited in the paper.
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Discounts
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="discounts_enabled">
                                    <input type="checkbox" name="discounts_enabled" id="discounts_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['DISCOUNTS_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>

                    </form>
                </div>
                <!-- Features -->

                <!-- Email -->
                <div class="tab-pane" id="email">
                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=email_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_ID'], ENT_QUOTES, 'UTF-8');?>
"/>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Mail Method
                            </label>
                            <div class="col-sm-9">
                                <div class="radio radio-primary"> 
                                    <input type="radio" name="mail_method" value="1" id="mail_method_1" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_METHOD'] == '1') {?>checked="checked"<?php }?>> 
                                    <label for="mail_method_1">Use PHP's mail() (recommended)</label> 
                                </div>
                                <div class="radio radio-primary"> 
                                    <input type="radio" name="mail_method" value="2" id="mail_method_2" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_METHOD'] == '2') {?>checked="checked"<?php }?>> 
                                    <label for="mail_method_2">Set my own SMTP parameters</label> 
                                </div>
                                <div class="radio radio-primary"> 
                                    <input type="radio" name="mail_method" value="3" id="mail_method_3" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_METHOD'] == '3') {?>checked="checked"<?php }?>> 
                                    <label for="mail_method_3">Never send emails</label> 
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                SMTP server
                            </label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="smtp_server" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['MAIL_SERVER'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                SMTP username
                            </label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="smtp_username" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['MAIL_USER'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                SMTP password
                            </label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="smtp_password" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['MAIL_PASSWD'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                Port
                            </label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" name="smtp_port" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['MAIL_SMTP_PORT'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                Encryption
                            </label>
                            <div class="col-sm-9">
                                <select class="form-control" name="smtp_encryption">
                                    <option value="off" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_SMTP_ENCRYPTION'] == 'off') {?>selected="selected"<?php }?>>None</option>
                                    <option value="ssl" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_SMTP_ENCRYPTION'] == 'ssl') {?>selected="selected"<?php }?>>SSL</option>
                                    <option value="tls" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['MAIL_SMTP_ENCRYPTION'] == 'tls') {?>selected="selected"<?php }?>>TLS</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- Email -->

                <!-- PayPal -->
                <div class="tab-pane" id="paypal">
                    <div class="alert alert-info">
                        <div class="icon">
                            <i class="fa fa-info-circle fa-2x"></i>
                        </div>
                        <div class="text">
                            To start using Paypal, you'll need to create an account at <a target="_blank" href="https://developer.paypal.com/">Paypal</a><br>
                            Check the documentation for more help
                        </div>
                    </div>

                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=paypal_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_ID'], ENT_QUOTES, 'UTF-8');?>
"/>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                PayPal Enabled
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="paypal_enabled">
                                    <input type="checkbox" name="paypal_enabled" id="paypal_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PAYPAL_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Enable payments via Paypal
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Default
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="default_method_stripe">
                                    <input type="checkbox" name="default_method_enabled" id="default_method_stripe" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PAYMENT_METHOD_DEFAULT'] == 'paypal') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Make it the default payment method of the site
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                PayPal Mode
                            </label>
                            <div class="col-sm-9">
                                <div class="radio radio-primary radio-inline">
                                    <input type="radio" name="paypal_mode" id="paypal_live" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PAYPAL_MODE'] == 'live') {?>checked<?php }?> value="live">
                                    <label for="paypal_live">Live</label>
                                </div>
                                <div class="radio radio-primary radio-inline">
                                    <input type="radio" name="paypal_mode" id="paypal_sandbox" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PAYPAL_MODE'] == 'sandbox') {?>checked<?php }?> value="sandbox">
                                    <label for="paypal_sandbox">Sandbox</label>
                                 </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                PayPal Client ID
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="paypal_client_id" id="paypal_client_id" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['PAYPAL_CLIENT_ID'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                PayPal Secret Key
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="paypal_secret_key" id="paypal_secret_key" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['PAYPAL_SECRET_KEY'], ENT_QUOTES, 'UTF-8');?>
">
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- PayPal -->

                <!-- Stripe -->
                <div class="tab-pane" id="stripe">
                    <div class="alert alert-info">
                        <div class="icon">
                            <i class="fa fa-info-circle fa-2x"></i>
                        </div>
                        <div class="text">
                            To start using Stripe, you'll need to create an account at <a target="_blank" href="https://dashboard.stripe.com/">Stripe</a><br>
                            Check the documentation for more help
                        </div>
                    </div>

                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=stripe_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_ID'], ENT_QUOTES, 'UTF-8');?>
"/>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Stripe Enabled
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="stripe_enabled">
                                    <input type="checkbox" name="stripe_enabled" id="stripe_enabled" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_ENABLED'] == '1') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Enable payments via Credit Card
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Default
                            </label>
                            <div class="col-sm-9">
                                <label class="switch" for="default_method_paypal">
                                    <input type="checkbox" name="default_method_enabled" id="default_method_paypal" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['PAYMENT_METHOD_DEFAULT'] == 'stripe') {?>checked="checked"<?php }?>>
                                    <span class="slider round"></span>
                                </label>
                                <span class="help-block">
                                    Make it the default payment method of the site
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Stripe Mode
                            </label>
                            <div class="col-sm-9">
                                <div class="radio radio-primary radio-inline">
                                    <input type="radio" name="stripe_mode" id="stripe_live" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_MODE'] == 'live') {?>checked<?php }?> value="live">
                                    <label for="stripe_live">Live</label>
                                </div>
                                <div class="radio radio-primary radio-inline">
                                    <input type="radio" name="stripe_mode" id="stripe_test" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_MODE'] == 'test') {?>checked<?php }?> value="test">
                                    <label for="stripe_test">Test</label>
                                 </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Live Publishable Key
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="stripe_live_key" id="stripe_live_key" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_LIVE_KEY'], ENT_QUOTES, 'UTF-8');?>
">
                                <span class="help-block">
                                    Stripe secret key that starts with pk_
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Test Publishable Key
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="stripe_test_key" id="stripe_test_key" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_TEST_KEY'], ENT_QUOTES, 'UTF-8');?>
">
                                <span class="help-block">
                                    Stripe secret key that starts with pk_
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Live Secret Key
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="stripe_live_secret" id="stripe_live_secret" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_LIVE_SECRET'], ENT_QUOTES, 'UTF-8');?>
">
                                <span class="help-block">
                                    Stripe secret key that starts with sk_
                                </span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Test Secret Key
                            </label>
                            <div class="col-sm-9">
                                <input class="form-control" type="text" name="stripe_test_secret" id="stripe_test_secret" maxlength="255" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['STRIPE_TEST_SECRET'], ENT_QUOTES, 'UTF-8');?>
">
                                <span class="help-block">
                                    Stripe secret key that starts with sk_
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- Stripe -->

                <!-- Currency -->
                <div class="tab-pane" id="currency">
                    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=currency_settings">
                        <input type="hidden" name="site_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['formValues']->value['SITE_ID'], ENT_QUOTES, 'UTF-8');?>
"/>
                        <?php if (count($_smarty_tpl->tpl_vars['currencies']->value)) {?>
                        <div class="form-group">
                            <label class="col-sm-3 control-label text-left">
                                Default Currency
                            </label>
                            <div class="col-sm-9">
                                <select class="form-control" name="default_currency">
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['currencies']->value, 'currency');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['currency']->value) {
?>
                                        <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['currency_id'], ENT_QUOTES, 'UTF-8');?>
" <?php if ($_smarty_tpl->tpl_vars['formValues']->value['CURRENCY_DEFAULT'] == $_smarty_tpl->tpl_vars['currency']->value['currency_id']) {?>selected=""<?php }?>><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['currency']->value['title'], ENT_QUOTES, 'UTF-8');?>
</option>
                                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                </select>
                            </div>
                        </div>
                        <?php }?>

                        <div class="form-group">
                            <div class="col-sm-9 col-sm-offset-3">
                                <!-- success -->
                                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                                <!-- success -->

                                <!-- error -->
                                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                                <!-- error -->

                                <button type="submit" class="btn btn-primary">Save Changes</button>
                            </div>
                        </div>

                    </form>
                </div>
                <!-- Currency -->

            </div>

        </div>

    <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "add") {?>
        <div class="panel-body">
            <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/admin/sites?do=add">
                <div class="form-group">
                    <label class="col-sm-3 control-label text-left">
                        Site name
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="site_name" id="site_name" maxlength="255">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label text-left">
                        Site email
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="site_email" id="site_email" maxlength="255">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label text-left">
                        Site URL
                    </label>
                    <div class="col-sm-9">
                        <input class="form-control" type="text" name="site_domain" id="site_domain" maxlength="255">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-9 col-sm-offset-3">
                        <!-- success -->
                        <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                        <!-- success -->

                        <!-- error -->
                        <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                        <!-- error -->

                        <button type="submit" class="btn btn-primary">Save Changes</button>
                    </div>
                </div>

            </form>
        </div>
    <?php }?>
</div>
<?php
}
}
/* {/block 'content_wrapper'} */
}
