<div class="row">
	<div class="col-md-12">
		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title"><?= !empty(lang('package_pricing'))?lang('package_pricing'):"packages";?> <a href="<?= base_url('admin/dashboard/add_package') ;?>" class="btn btn-info btn-flat"><i class="fa fa-plus"></i> &nbsp;<?= !empty(lang('add_new'))?lang('add_new'):"Add New";?> </a></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<div class="box-body">
				<div class="row">
					<?php $filter = ['social-site','about','services','resume','review','skills','portfolio','blog','appointment','contacts','teams','facts'] ?>
					<?php foreach ($packages as $key => $row): ?>
					<div class="col-md-3 col-sm-4 col-lg-3">
						<div class="package_type_area admin_package">
							<div class="package_type_header">
								<div class="package_header_count">
									<span><?= $this->admin_m->count_total_user_by_package_id($row['id']);?> <i class="ion ion-ios-people"></i></span>

									
									<a href="javascript:;" title="Click here to change status" data-toggle="tooltip" data-placement="top"  class=" status_text  <?= $row['status']==1?'bg_green':'bg_red'?> change_status" data-id="<?= html_escape($row['id']);?>" data-status="<?= html_escape($row['status']);?>" data-table="features_type"> <i class="fa <?= $row['status']==1?'fa-check':'fa-close'?>"></i>&nbsp; <?= $row['status']==1? (!empty(lang('live'))?lang('live'):"Live"): (!empty(lang('hide'))?lang('hide'):"Hide");?></a> &nbsp; &nbsp;

									<a href="<?= base_url('admin/dashboard/item_delete/'.html_escape($row['id']).'/features_type'); ?>" data-msg="<?= !empty(lang('want_to_delete'))?lang('want_to_delete'):'Want to delete?' ;?>" class=" status_text  label-danger action_btn"><i class="fa fa-trash"></i>&nbsp; <?=  !empty(lang('delete'))?lang('delete'):"Delete";?></a>

								</div>
								<h4><?= html_escape($row['type_name']) ;?></h4>
								<?php if($row['type']=='free'): ?>
									<p><?= !empty(lang('free'))?lang('free'):"Free" ;?></p>
								<?php elseif($row['type']=='trial'): ?>
									<p><?= !empty(lang('trial_month'))?lang('trial_month'):"Trial for 1 Month" ;?></p>
								<?php else: ?>
									<p><?= get_currency('icon');?> <?= html_escape($row['price']); ?> / <?= html_escape(!empty(lang($row['type']))?lang($row['type']):$row['type']);?></p>
								<?php endif;?>
								<p class="fz-18"> <?= !empty(lang('feature_limit'))?lang('feature_limit'):'Feature Limit' ;?> : <b><?= $row['type_limit']==0?$limit = (!empty(lang('unlimited'))?lang('unlimited'):'unlimited'):$limit =$row['type_limit']; ;?></b> </p>

								<p class="fz-18"> <?= !empty(lang('vcard_information_limit'))?lang('vcard_information_limit'):'vCard Information Limit' ;?> : <b><?= $row['vcard_limit']!=0?$row['vcard_limit']:lang('unlimited') ;?></b> </p>
							</div>
							<div class="package_type_body">
								
								<ul class="plan-features">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='home'): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="plan-features profileFreatures">
										<?php foreach ($features as $key => $feature): ?>
											<?php if(in_array($feature['slug'],$filter)): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="plan-features">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='qr_code' || $feature['slug']=='vcard' || $feature['slug']=='pwa'): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?> <?= $feature['slug']=='vcard'?"(".type_limit($row['card_limit']).")":"" ;?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>
							</div>
							<div class="package_type_footer">
								<a href="<?= base_url('admin/dashboard/edit_features_type/'.html_escape($row['id'])); ?>" class="btn btn-info"><i class="fa fa-edit"></i> &nbsp;<?= !empty(lang('add_change_feature'))?lang('add_change_feature'):"Change/add Features";?></a> 

								
							</div>
						</div>
					</div>
					<?php endforeach ?>
				</div>
			</div><!-- /.box-body -->
			<div class="box-footer">
				
			</div>
		</div>
	</div>
</div>

<?php if(is_allow()==0): ?>
	<div class="row">
		<div class="col-md-6">
			<div class="callout callout-default">
				<h4 class="mb-3"><i class="icon fa fa-question-circle"></i> Info!</h4>

				<p>Payment Method is available only in the <b>Extended license</b>.</p>
				<p>Please read  about the envato license rules&nbsp; <u><a href="https://codecanyon.net/licenses/standard" class="c_black" target="blank">Click Here</a></u></p>

				<p class="font-italic">*[ Upgrade your item in the extended license ]</p>
			</div>
		</div>
	</div>
	<?php endif; ?>