Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: package.php
<? switch ($fs) { case '1': $heading = $this->lang->line('BE_PCK_25'); break; case '3': $heading = $this->lang->line('BE_LBL_1025'); break; default: $heading = $this->lang->line('BE_PCK_HD'); break; } ?> <style type="text/css"> .fieldOtherNameContainer { position: relative; } .fieldOtherNameContainer a { position: absolute; top: 0px; right: 0px; color: red; z-index: 9; width: 18px; height: 18px; text-align: center; line-height: 18px; background: #ddd; } .alertStyle { padding: 20px; background-color: #f44336; color: white; opacity: 0; transition: opacity 0.6s; margin-bottom: 15px; text-align: left; font-size: 14px; } .alertStyle.warning {background-color: #ff9800;} .closebtn { margin-left: 15px; color: white; font-weight: bold; float: right; font-size: 22px; line-height: 20px; cursor: pointer; transition: 0.3s; } .closebtn:hover { color: black; } </style> <div class="page-header border-bottom-0 mt-4 ml-2 usersSection"> <div class="form-group row"> <div class="col-lg-12"> <?php include APPPATH . 'scripts/services_header.php'; ?> </div> </div> </div> <!-- Page header --> <div class="page-header border-bottom-0"> <div class="page-header-content header-elements-md-inline"> <div class="page-title d-flex"> <h4> <a href="javascript:void(0)" class="BackButton-Link" onclick="goBack()"><i class="icon-arrow-left52 mr-2"></i></a> <?php echo $heading;?> <?php if ($updatedAt != '') { ?> <?php echo "(" . $this->lang->line('BE_GNRL_5') . ": $updatedAt)"; ?> <?php } ?> </h4> </div> </div> </div> <!-- /page header --> <div class="content pt-0"> <div class="card"> <div class="row"> <div class="col-12 col-sm-12 col-lg-12 col-lg-12 col-xl-12"> <div class="card-body"> <?php if (isset($message) && $message != '') { ?> <div class="form-group row"> <div class="col-lg-12"> <div class="alert alert-success"><?php echo $message; ?></div> </div> </div> <?php } ?> <div class="form-group row"> <div class="col-lg-12"> <?php echo form_open_multipart(base_url($this->config->item('apanel_name').'/services/package') . get_query_string(), 'id="frm"'); ?> <input type="hidden" name="submitUrl" value="<?php echo base_url($this->config->item('apanel_name').'/services/package') . get_query_string(); ?>"> <input type="hidden" id="id" name="id" value="<?php echo($id); ?>"> <input type="hidden" id="hdAPIIdForBrand" name="hdAPIIdForBrand" value="<?php echo($apiIdForBrand); ?>"> <input type="hidden" id="existingImage" name="existingImage" value="<?php echo $existingImage; ?>"> <input type="hidden" name="exAPIId" id="exAPIId" value="<?php echo $onlyAPIId; ?>"> <input type="hidden" id="exAPIServiceId" name="exAPIServiceId" value="<?php echo $extNetworkId; ?>"> <input type="hidden" id="fs" name="fs" value="<?php echo($fs); ?>"/> <ul id="tabsControls" class="nav nav-tabs nav-tabs-solid rounded"> <li class="nav-item"> <a href="#tab_0" data-toggle="tab" class="nav-link <?php if($activeTab == 0) echo "active"; ?>"> <?php echo $this->lang->line('BE_LBL_380'); ?> </a> </li> <?php if ($count > 0 && $id > 0) { ?> <li class="nav-item"> <a href="#tab_1" data-toggle="tab" class="nav-link <?php if($activeTab == 1) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_528'); ?></a> </li> <?php } ?> <?php if ($id > 0) { ?> <li class="nav-item"> <a href="#tab_2" data-toggle="tab" class="nav-link <?php if($activeTab == 2) echo "active"; ?>"><?php echo $this->lang->line('BE_PCK_15'); ?></a> </li> <li class="nav-item"> <a href="#tab_3" data-toggle="tab" class="nav-link <?php if($activeTab == 3) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_377'); ?></a> </li> <li class="nav-item"> <a href="#tab_5" data-toggle="tab" class="nav-link <?php if($activeTab == 5) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_529'); ?></a> </li> <li class="nav-item"> <a href="#tab_7" data-toggle="tab" class="nav-link <?php if($activeTab == 7) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_653'); ?></a> </li class="nav-item"> <li> <a href="#tab_8" data-toggle="tab" class="nav-link <?php if($activeTab == 8) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_689'); ?></a> </li class="nav-item"> <li> <a href="#tab_9" data-toggle="tab" class="nav-link <?php if($activeTab == 9) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_694'); ?></a> </li> <li class="nav-item"> <a href="#tab_10" id="tbDiscClients" data-toggle="tab" class="nav-link <?php if($activeTab == 10) echo "active"; ?>"><?php echo $this->lang->line('BE_LBL_721'); ?></a> </li> <li class="nav-item"> <a href="#tab_11" id="tbDiscClients" data-toggle="tab" class="nav-link <?php if($activeTab == 11) echo "active"; ?>"><?php echo "Stock Manage"; ?></a> </li> <?php } ?> </ul> <div class="tab-content"> <div class="tab-pane <?php if($activeTab == 0) echo "active"; ?>" id="tab_0"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_MR_26'); ?> :*</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Service" maxlength="255" name="txtTitle" id="txtTitle" value="<?php echo($packageTitle); ?>"/> </div> </div> <?php if ($id == 0) { ?> <div class="form-group row"> <?php $packages_data = fetch_packages($fs); ?> <label class="col-lg-3 text-right control-label">Duplicate:</label> <div class="col-lg-5"> <select name="dupSrvcId" id="dupSrvcId" class="form-control select2me"> <option value="0">Select a Service</option> <?php FillCombo(0, $packages_data); ?> </select> </div> </div> <?php } ?> <div id="dvGeneral"> <div class="form-group row"> <?php $package_category = fetch_package_category($fs); ?> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_PCK_13'); ?> :*</label> <div class="col-lg-5"> <select name="categoryId" id="categoryId" class="form-control select2me" data-placeholder="<?php echo $this->lang->line('BE_LBL_255'); ?>"> <option value="0"><?php echo $this->lang->line('BE_LBL_255'); ?></option> <?php FillCombo($categoryId, $package_category); ?> </select> </div> </div> <?php if($id == 0) { ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_296'); ?>:*</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Price" name="txtPrice" onblur="calculatePrices();" id="txtPrice" maxlength="10" value="<?php echo($price); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_651'); ?>:</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Cost Price" name="txtCostPrice" id="txtCostPrice" maxlength="10" value="<?php echo roundMe($costPrice); ?>"/> </div> </div> <?php } ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_344'); ?>:</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Supplier" maxlength="100" name="txtSupplier" value="<?php echo($supplier); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_PCK_10'); ?> :</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Delivery Time" name="txtTimeTaken" id="txtTimeTaken" maxlength="100" value="<?php echo($timeTaken); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_839'); ?> :</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter <?php echo $this->lang->line('BE_LBL_839'); ?>" name="txtRedirection" maxlength="100" value="<?php echo($redirect); ?>"/> <span class="form-text text-muted"> Sample URL: http://www.example.com/<br/> Client will be sent to this URL on choosing this service. </span> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">Notification Emails:</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Emails separated by Commas" name="txtEmails" maxlength="100" value="<?php echo($emailIDs); ?>"/> <span class="form-text text-muted"> Email Addresses here to send New order emails for<br/>this service. </span> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">IMEI Restriction Series:</label> <div class="col-lg-5"> <?php $series_data = fetch_imei_restricted_series(); ?> <select name="seriesId" class="form-control select2me"> <option value="0">Choose a Series</option> <?php FillCombo($seriesId, $series_data); ?> </select> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_PCK_21'); ?> :</label> <div class="col-lg-7 radio-list"> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="radio" class="form-check-input" name="rdServiceType" id="rdServiceType0" value="0" checked/><?php echo $this->lang->line('BE_LBL_832'); ?> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="radio" class="form-check-input" name="rdServiceType" id="rdServiceType1" value="1" <?php if ($srvType == '1') echo 'checked'; ?> /><?php echo $this->lang->line('BE_LBL_833'); ?> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="radio" class="form-check-input" name="rdServiceType" id="rdServiceType2" value="2" <?php if ($srvType == '2') echo 'checked'; ?> />Process Manually </label> </div> </div> </div> <div class="form-group row" <?php if ($srvType != '0') echo 'style="display:none;"'; ?> id="dvDelayTm"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_835'); ?> :</label> <div class="col-lg-3"> <input type="text" class="form-control" placeholder="Enter <?php echo $this->lang->line('BE_LBL_835'); ?>" name="txtResDelayTm" id="txtResDelayTm" maxlength="4" value="<?php echo($responseDelayTm); ?>"/> </div> <span class="form-text text-muted"> In minutes </span> </div> <div class="form-group row"> <label for="txtImage" class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_PCK_3'); ?> :</label> <div class="col-lg-4"> <input type="file" id="txtImage" name="txtImage"> <p class="form-text text-muted"> .jpg, .gif, .png </p> </div> </div> <?php if ($existingImage != '') { ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_609'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" name="chkDelImg" id="chkDelImg" class="toggle"/><span><label for="chkDelImg"></label></span> </div> </div> </div> <?php } ?> <div class="form-group row"> <label class="control-label text-right col-lg-3"><?php echo $this->lang->line('BE_LBL_105'); ?> :</label> <div class="col-lg-9"> <textarea class="ckeditor form-control" name="txtMustRead" rows="6"><?php echo $mustRead; ?></textarea> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">Terms & Condtions:</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="chkTOC" id="chkTOC" <?php echo $toc == 1 ? 'checked' : ''; ?> class="toggle"/><span><label for="chkTOC"></label></span> </div> </div> </div> <?php if ($id > 0) { ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_389'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="chkResetDiscounts" id="chkResetDiscounts" class="toggle"/><span><label for="chkResetDiscounts"></label></span> </div> </div> </div> <?php } ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_630'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" name="cancelOrders" id="cancelOrders" <?php echo $cancelOrders == 1 ? 'checked' : ''; ?> class="toggle"/><span><label for="cancelOrders"></label></span> </div> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_736'); ?> :</label> <?php if(!empty($cancelTimeUnit)) { list($cancelTimeUnit, $cancelMins) = explode('|', $cancelTimeUnit); } ?> <div class="col-lg-2"> <select name="cancelTimeUnit" class="form-control"> <option value="m" <?php echo $cancelTimeUnit == 'm' ? 'selected=""' : ''; ?>>Minutes</option> <option value="h" <?php echo $cancelTimeUnit == 'h' ? 'selected=""' : ''; ?>>Hours</option> <option value="d" <?php echo $cancelTimeUnit == 'd' ? 'selected=""' : ''; ?>>Days</option> </select> </div> <div class="col-lg-2"> <input type="text" class="form-control" name="txtCancelTime" maxlength="6" id="txtCancelTime" value="<?php echo($cancelMins); ?>"/> </div> <span class="form-text text-muted"> <?php echo $this->lang->line('BE_LBL_1013'); ?> </span> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_675'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="verifyOrders" id="verifyOrders" <?php echo $verifyOrders == 1 ? 'checked' : ''; ?> class="toggle"/><span><label for="verifyOrders"></label></span> </div> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_737'); ?> :</label> <?php if(!empty($verifyTimeUnit)) { list($verifyTimeUnit, $verifyMins) = explode('|', $verifyTimeUnit); } ?> <div class="col-lg-2"> <select name="verifyTimeUnit" class="form-control"> <option value="m" <?php echo $verifyTimeUnit == 'm' ? 'selected=""' : ''; ?>>Minutes</option> <option value="h" <?php echo $verifyTimeUnit == 'h' ? 'selected=""' : ''; ?>>Hours</option> <option value="d" <?php echo $verifyTimeUnit == 'd' ? 'selected=""' : ''; ?>>Days</option> </select> </div> <div class="col-lg-2"> <input type="text" class="form-control" name="txtVerifyTime" maxlength="6" id="txtVerifyTime" value="<?php echo($verifyMins); ?>"/> </div> <span class="form-text text-muted"> <?php echo $this->lang->line('BE_LBL_1014'); ?> </span> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_180'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="dupIMEI" id="dupIMEI" <?php echo $dupIMEI == 1 ? 'checked' : ''; ?> class="toggle"/><span><label for="dupIMEI"></label></span> </div> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_GNRL_1'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="chkDisablePackage" id="chkDisablePackage" <?php echo $disablePackage == 1 ? 'checked' : ''; ?> class="toggle"/><span><label for="chkDisablePackage"></label></span> </div> </div> </div> <div class="form-group row mb-3"> <label class="col-lg-3 text-right control-label">Features:</label> <div class="col-lg-9"> <?php foreach ($rsFtrs as $rwF) { $chckd = ''; if ($rwF->Checked == '1') $chckd = 'checked'; ?> <div class="form-check form-check-inline mt-0 col-12"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="packFeatures[]" value="<?php echo $rwF->FeatureId; ?>" <?php echo $chckd; ?> /><?php echo $rwF->Feature; ?> </label> </div> <?php } ?> </div> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div><div class="col-lg-9"> <button name="activeTab" value="0" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> <div align="center"> </div> </div> </div> </div> </div> <?php if ($id > 0) { ?> <div class="tab-pane <?php if($activeTab == 1) echo "active"; ?>" id="tab_1"> <?php if ($count > 0) { ?> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-body custom_packages"> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_651'); ?>:</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter Cost Price" name="txtCostPrice" id="txtCostPrice" maxlength="10" value="<?php echo roundMe($costPrice); ?>"/> </div> </div> <div class="form-group row "> <?php $margins = array(); $PLANS = array(); if ($onlyAPIId > 0 && $extNetworkId > 0) { $allowCP = false; if ($fs == '0'){ $allowCP = true; } else if ($fs == '1' && ($apiType == '4' || $apiType == '6')) { $allowCP = true; } if ($allowCP) { ?> <label style="margin-bottom:0;" class="col-lg-3 text-right control-label ">Get Cost Price From API <img style="display:none;" id="imgCPLdr" src="<?php echo base_url(); ?>assets/images/loading.gif" border="0" alt="Please wait..."/> </label> <div class="col-lg-5 align-items-center d-flex"> <input data-id="<?php echo $id; ?>" type="checkbox" class="chkSelect" name="chkFetchCPr" id="chkFetchCPr" <?php if ($costPrFrmAPI == 1) echo 'checked'; ?> /> <?php $rw = fetch_currency_data(); $DEFAULT_CURRENCY = $rw->CurrencyAbb; $PRICES = array(); $rsPrices = fetch_service_api_pricing($fs, $id, $onlyAPIId); foreach ($rsPrices as $row) { $PRICES[$row->ServiceId][$row->GroupId] = $row->PriceMargin . '|' . $row->MarginType; } $rsGroups = fetch_price_plans(); foreach ($rsGroups as $row) { $PLANS[$row->PricePlanId] = stripslashes($row->PricePlan); } $defaultPrice = '0'; $defaultMarginType = ''; if (isset($PRICES[$id][0]) && $PRICES[$id][0] != '') { $val = $PRICES[$id][0]; $arr = explode('|', $val); if (isset($arr[0]) && is_numeric($arr[0])) $defaultPrice = roundMe($arr[0]); if (isset($arr[1]) && is_numeric($arr[1])) { $defaultMarginType = $arr[1] == '0' ? '' : '%'; } } $strPriceMargins = ''; $icon = 'upload'; if (sizeof($PLANS) > 0) { foreach ($PLANS as $key => $value) { $priceVal = '0'; $marginTypeVal = ''; if (isset($PRICES[$id][$key]) && $PRICES[$id][$key] != '') { $val = $PRICES[$id][$key]; $arr = explode('|', $val); if (isset($arr[0]) && is_numeric($arr[0])) $priceVal = roundMe($arr[0]); if (isset($arr[1]) && is_numeric($arr[1])) $marginTypeVal = ($arr[1] == '0' ? '' : '%'); } $symbol = $priceVal >= 0 ? "+" : "-"; $strPriceMargins .= '<div><strong>' . $value . '</strong> ' . $symbol . ' ' . $priceVal . $marginTypeVal . ' ' . $DEFAULT_CURRENCY . '</div>'; if ($priceVal > 0 || $defaultPrice > 0) $icon = 'chevron-down'; } } ?> </div> <div class="alertStyle warning" style="display:none;"> <span class="closebtn">×</span> Please note that you have 'Get Cost Price From API' option clicked, so this 'Save' button will not work. Please use 'Update' button above or uncheck 'Get Cost Price From API' option and then use 'Save' button. </div> <div class="col-lg-12"> <div class="collapse <?php if ($costPrFrmAPI == '1') echo 'show'; ?>" id="collapseList_<?php echo $id; ?>"> <div class="form-group row align-items-center"> <div class="col-lg-3"></div> <div class="col-lg-5"> <div class="table-responsive"> <br /> <table class="table table-striped table-bordered table-advance table-hover" id="tblDisc"> <tbody> <tr> <td><strong>Default</strong></td> <td><input class="form-control" placeholder="Price Margin" maxlength="10" value="<? echo $defaultPrice;?>" type="text" id="txtPrice0" name="txtPrice0" /></td> <td> <select id="marginType0" name="marginType0" class="form-control "><!-- select2me --> <option value="0" <? if($defaultMarginType == '' || $defaultMarginType == '0') echo 'selected';?> >Flat</option> <option value="1" <? if($defaultMarginType == '%' || $defaultMarginType == '1') echo 'selected';?> >Percentage</option> </select> </td> <?php if($costPrFrmAPI) { if($defaultMarginType == '' || $defaultMarginType == '0') { $margins[0] = ((float) onlyFloatVal($costPrice) + (float) onlyFloatVal($defaultPrice)); }else{ $margins[0] = ((float) onlyFloatVal($costPrice) + (((float) onlyFloatVal($costPrice) / 100) * (float) onlyFloatVal($defaultPrice))); } } ?> </tr> <?php $z = 1; foreach($rsGroups as $row) { $val = ''; $priceVal = ''; $marginTypeVal = ''; if(isset($PRICES[$id][$row->PricePlanId]) && $PRICES[$id][$row->PricePlanId] != '') { $val = $PRICES[$id][$row->PricePlanId]; $arr = explode('|', $val); if(isset($arr[0]) && is_numeric($arr[0])) $priceVal = roundMe($arr[0]); if(isset($arr[1]) && is_numeric($arr[1])) $marginTypeVal = $arr[1]; } ?> <tr> <td><strong><?php echo stripslashes($row->PricePlan);?></strong></td> <td> <input class="form-control" placeholder="Price Margin" maxlength="10" value="<? echo $priceVal;?>" type="text" name="txtPrice<? echo $z;?>" id="txtPrice<? echo $z;?>" /> <input type="hidden" name="groupId<? echo $z;?>" id="groupId<? echo $z;?>" value="<? echo $row->PricePlanId; ?>" /> </td> <td> <select id="marginType<? echo $z;?>" name="marginType<? echo $z;?>" class="form-control "><!-- select2me --> <option value="0" <? if($marginTypeVal == '0') echo 'selected';?> >Flat</option> <option value="1" <? if($marginTypeVal == '1') echo 'selected';?> >Percentage</option> </select> </td> <?php if($costPrFrmAPI) { if($marginTypeVal == '' || $marginTypeVal == '0') { $margins[$row->PricePlanId] = ((float) onlyFloatVal($costPrice) + (float) onlyFloatVal($priceVal)); }else{ $margins[$row->PricePlanId] = ((float) onlyFloatVal($costPrice) + (((float) onlyFloatVal($costPrice) / 100) * (float) onlyFloatVal($priceVal))); } } ?> </tr> <?php $z++; } ?> </tbody> </table> </div> </div> <div class="col-lg-12"></div> <div class="col-lg-3"></div> <div class="col-lg-5 text-center"> <input type="hidden" id="serviceId" name="serviceId" value="<? echo $id; ?>" /> <input type="hidden" id="srvcAPIId" name="srvcAPIId" value="<? echo $onlyAPIId; ?>" /> <input type="hidden" id="sType" name="sType" value="<? echo $fs; ?>" /> <input type="hidden" id="ttlGroups" name="ttlGroups" value="<? echo count($rsGroups); ?>" /> <button type="button" <?php if($IS_DEMO) echo 'disabled="disabled"';?> class="btn ThemeGreenBtn mt-2" id="btnSavePrice" name="btnSavePrice"><?php echo $this->lang->line('BE_LBL_1012'); ?></button> </div> </div> </div> </div> <?php } } ?> </div> <!---------------> <?php if ($id > 0) { ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_925'); ?></label> </div> <?php } $index = 0; $strCurrHdrs = ''; $PACK_PRICES_OTHER = array(); $CURR_CONV_RATES = array(); foreach ($rsCurrencies as $row) { $strCurrHdrs .= "<th>" . $row->CurrencyAbb . "</th>"; if ($row->DefaultCurrency != '1') { $currencyPrice = ''; if ($id > 0) { # commented by hassan: default price issue // if ($row->Price == '')// set as per conversion rate // { $currencyPrice = roundMe($price * $row->ConversionRate, 2, '.', ''); // } else { // $currencyPrice = number_format($row->Price, 2, '.', ''); // } $PACK_PRICES_OTHER[$row->CurrencyId] = $currencyPrice; $CURR_CONV_RATES[$row->CurrencyId] = $row->ConversionRate; } ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $row->CurrencyAbb; ?> :</label> <div class="col-lg-5"> <input type="hidden" name="currencyId<?php echo $index; ?>" value="<?php echo $row->CurrencyId; ?>"/> <input readonly type="text" class="form-control" id="txtCurrPrice<?php echo $index; ?>" value="<?php echo $currencyPrice; ?>"/> <input type="hidden" class="form-control" placeholder="Enter Price" maxlength="10" name="txtCurrPrice<?php echo $index; ?>" id="txtCurrPrice<?php echo $index; ?>" value="<?php echo $currencyPrice; ?>"/> <input type="hidden" name="converstionRate<?php echo $index; ?>" id="converstionRate<?php echo $index; ?>" value="<?php echo $row->ConversionRate; ?>"/> </div> </div> <?php $index++; } else { $DEFAULT_CURRENCY_ID = $row->CurrencyId; } } if($chkCnvrtPrice==1){ $chkCnvrtPrice_checked = 'checked'; }else{ $chkCnvrtPrice_checked = ''; } ?> <input type="hidden" id="totalCurrencies" name="totalCurrencies" value="<?php echo $index; ?>"/> <?php if ($strCurrHdrs != '') { ?> <div class="form-group row"> <div class="col-lg-12"> <div class="table-responsive"> <table cellspacing="1" cellpadding="1" width="100%" border="0"> <tr class="bg-primary"> <td width="2%"> <input <?php echo $chkCnvrtPrice_checked; ?> type="checkbox" value="1" class="chkSelect" name="chkCnvrtPrice" id="chkCnvrtPrice"/><span><label for="chkCnvrtPrice"></label></span> </td> <td width="98%" style="font-size:20px;"> <b><?php echo $this->lang->line('BE_LBL_406'); ?></b> </td> </tr> </table> </div> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover"> <thead> <tr> <th><?php echo $this->lang->line('BE_LBL_228'); ?></th> <?php echo $strCurrHdrs; ?> </tr> </thead> <tbody> <?php $rsGroups = fetch_price_plans(); $totalGroups = count($rsGroups); $PLAN_PRICES_PER_PACK = getPlansPricesForService($id, $fs); $CURRENCY_RATES = array(); $rsCurrRates = fetch_currency_by_id(); foreach ($rsCurrRates as $rw) { $CURRENCY_RATES[$rw->CurrencyId] = $rw->ConversionRate; } ?> <tr> <td>Default</td> <td> <?php $marginDefaultPrice = (float) onlyFloatVal((isset($margins[0]) ? $margins[0] : $price)); ?> <input type="text" onblur="savePrices();" name="txtPrice" value="<?php echo roundMe($marginDefaultPrice, 2, '.', ''); ?>" class="form-control rateCal" id="txtPrice"> </td> <?php $k = 0; foreach($PACK_PRICES_OTHER as $key => $value) { ?> <td> <input type="text" onblur="savePrices();" name="csCurrPrice<?php echo $k; ?>" value="<?php echo roundMe($marginDefaultPrice * $CURRENCY_RATES[$key], 2, '.', ''); ?>" class="form-control rateCalEle" id="csCurrPrice<?php echo $k; ?>"> </td> <?php $k++;} ?> </tr> <?php $i = 0; foreach ($rsGroups as $row) { if (isset($PLAN_PRICES_PER_PACK[$row->PricePlanId][$DEFAULT_CURRENCY_ID])) { $packPrice = $PLAN_PRICES_PER_PACK[$row->PricePlanId][$DEFAULT_CURRENCY_ID]; } else { $packPrice = roundMe($price); } ?> <tr> <td><?php echo stripslashes($row->PricePlan); ?></td> <td> <?php $marginDefaultPrice = (float) onlyFloatVal((isset($margins[$row->PricePlanId]) ? $margins[$row->PricePlanId] : onlyFloatVal($packPrice))); ?> <input type="hidden" name="planId<?php echo $i; ?>" value="<?php echo $row->PricePlanId; ?>"/> <input type="text" onblur="savePrices();" id="txtPrice<?php echo $i; ?>_0" name="txtPrice<?php echo $i; ?>_0" value="<?php echo roundMe($marginDefaultPrice, 2, '.', ''); ?>" class="form-control rateCal"> </td> <? $z = 0; foreach ($PACK_PRICES_OTHER as $key => $value) { ?> <td> <input type="hidden" name="otherCurrencyId<?php echo $i; ?>_<?php echo $z + 1; ?>" value="<?php echo $key; ?>"/> <input type="hidden" id="cRt<?php echo $i; ?>_<?php echo $z + 1; ?>" name="cRt<?php echo $i; ?>_<?php echo $z + 1; ?>" value="<?php echo $CURR_CONV_RATES[$key]; ?>"/> <input type="text" onblur="savePrices();" name="txtOtherPrice<?php echo $i; ?>_<?php echo $z + 1; ?>" id="txtOtherPrice<?php echo $i; ?>_<?php echo $z + 1; ?>" value="<?php echo roundMe($marginDefaultPrice * $CURRENCY_RATES[$key], 2, '.', ''); ?>" class="form-control rateCalEle"> </td> <? $z++; } ?> </tr> <?php $i++; } ?> </tbody> </table> </div> </div> </div> <input type="hidden" value="<?php echo $totalGroups; ?>" name="totalGroups" id="totalGroups"/> <input type="hidden" value="<?php echo count($PACK_PRICES_OTHER); ?>" name="currencyCount" id="currencyCount"/> <input type="hidden" value="<?php echo $DEFAULT_CURRENCY_ID; ?>" name="defaultCurrId"/> <input type="hidden" value="0" name="hdSavePrices" id="hdSavePrices"/> <?php } ?> <div class="form-group row text-right"> <div class="col-lg-12"> <button name="activeTab" value="1" onclick="return costFromApi()" id="btnPrices" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> <br/><br/> <?php if ($id > 0) { ?> <div class="form-group row"> <label class="control-label text-right col-lg-3">User Notes:</label> <div class="col-lg-5"> <textarea class="form-control" id="txtUserNotes" name="txtUserNotes" rows="6"></textarea> </div> </div> <div class="form-group row"> <?php $price_plan_data = fetch_price_plan_data(); ?> <label class="control-label text-right col-lg-3"><?php echo $this->lang->line('BE_LBL_18') ?> :</label> <div class="col-lg-5"> <select name="uNplanId" id="uNplanId" class="form-control select2me" data-placeholder="Select..."> <option value="0"><?php echo $this->lang->line('BE_LBL_407'); ?></option> <?php FillCombo(0, $price_plan_data); ?> </select> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div> <div class="col-lg-9"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton" id="btnPriceEml"><i class="fa fa-envelope"> </i> Send Service Credit Information To Users </button> <img style="display:none;" id="imgEmlLdr" src="<?php echo base_url(); ?>assets/images/loading.gif" border="0" alt="Please wait..."/> </div> </div> <?php } ?> </div> </div> </div> </div> <?php } ?> </div> <div class="tab-pane <?php if($activeTab == 2) echo "active"; ?>" id="tab_2"> <div class="row"> <div class="col-lg-12"> <!--<div class="card"> <div class="card-header header-elements-inline"> <h5 class="card-title"> <?php echo $this->lang->line('BE_PCK_15'); ?></h5> </div> </div>--> <div class="card-body"> <?php $api_data = fetch_api_data_by_concat(); ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_PCK_6'); ?> :</label> <div class="col-lg-5"> <select name="apiId" id="apiId" class="form-control select2me" data-placeholder="<?php echo $this->lang->line('BE_LBL_278'); ?>"> <option value="-1~0~0"><?php echo $this->lang->line('BE_LBL_278'); ?></option> <?php FillCombo($apiId, $api_data); ?> </select> <img style="display:none;" id="imgSrvcLoader" src="<?php echo base_url(); ?>/assets/images/loading.gif" border="0" alt="Please wait..."/> </div> </div> <div class="form-group row" id="dvExtNetworkId"> <?php $services_data = fetch_supplier_services_by_concat($onlyAPIId, $fs); ?> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_293'); ?> :</label> <div class="col-lg-5"> <select name="supplierPackId" id="supplierPackId" class="form-control select2me" data-placeholder="<?php echo $this->lang->line('BE_LBL_274'); ?>"> <option value="0"><?php echo $this->lang->line('BE_LBL_274'); ?></option> <?php FillCombo($extNetworkId, $services_data); ?> </select> <img style="display:none;" id="imgSrvcToolLoader" src="<?php echo base_url(); ?>/assets/images/loading.gif" border="0" alt="Please wait..."/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">Service Type At API:</label> <div class="col-lg-5 radio-list"> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"><input type="radio" class="form-check-input" name="rdSrvcAPIType" value="1" checked/>Instant</label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"><input type="radio" class="form-check-input" name="rdSrvcAPIType" value="2" <?php if ($cronDelayTm != '1') echo 'checked'; ?>/>Non Instant</label> </div> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div> <div class="col-lg-5"> <button name="activeTab" value="2" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> <br/> <?php if ($onlyAPIId && $fs == 0) { ?> <!--<div class="card"> <div class="card-header header-elements-inline"> <h2 class="card-title"> Alternate API</h2> </div> </div>--> <div class="form-group row"> <div class="col-lg-12"> <h5>Alternate API</h5> <span class="form-text text-muted"> If main API does not return result, provide here the list of APIs to be connected to in the order. Darg and drop to change the order of connections. </span> </div> </div> <div class="form-group row text-right"> <div class="col-lg-12"> <a href="<?php echo base_url($this->config->item('apanel_name').'/services/alternateapi?id=' . $id . '&sc=' . $fs . '&pn=' . str_replace(' ', 'S_P_', $packageTitle)); ?>" class="btn GreenThemeButton" title="Apply an alternate API, if main API rejects an order then system will automatically apply alternate API with an order."><i class="fa fa-plus"></i> Add </a> </div> </div> <?php if ($this->input->post_get('jd') && $this->input->post_get('jd') == '1') { ?> <div class="form-group row"> <div class="col-lg-12"> <div class="alert alert-success"><?php echo $this->lang->line('BE_GNRL_11'); ?></div> </div> </div> <?php } ?> <div id="dvMsg" style="display:none;" class="alert alert-success"> </div> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover"> <thead> <tr class="bg-primary"> <th nowrap="nowrap" width="4%">Sr. #</th> <th><?php echo $this->lang->line('BE_MR_19'); ?></th> <th nowrap="nowrap"><?php echo $this->lang->line('BE_PCK_HD_4'); ?></th> <th><?php echo $this->lang->line('BE_PCK_14'); ?></th> <th></th> <th></th> </tr> </thead> <tbody id="sortableLst"> <?php if ($rsAltAPIH) { $u = 0; foreach ($rsAltAPIH as $row) { ?> <tr id="listItem_<?php echo $row->AltAPISrvcId; ?>"> <td nowrap="nowrap"><i class="fa fa-sort"></i> <?php echo $u + 1; ?>. </td> <td><?php echo stripslashes($row->APITitle); ?></td> <td><?php echo stripslashes($row->ServiceName); ?></td> <td><?php echo roundMe($row->ServicePrice); ?></td> <td style="text-align:center" valign="middle"> <a href="<?php echo base_url($this->config->item('apanel_name').'/services/alternateapi?id=' . $id . '&sc=' . $fs . '&pn=' . str_replace(' ', 'S_P_', $packageTitle) . '&altId=' . $row->AltAPISrvcId); ?>" ><i class="fa icon-pencil" data-toggle="tooltip" data-placement="top" title="Edit"></i></a></td> <td style="text-align:center" valign="middle"> <a href="<?php echo base_url($this->config->item('apanel_name').'/services/package?id=' . $id . '&fs=' . $fs . '&altId=' . $row->AltAPISrvcId . '&del=1&activeTab=2'); ?>" onclick="return confirm('<?php echo $this->lang->line('BE_LBL_32'); ?>')"> <i class="fa icon-trash" data-toggle="tooltip" data-placement="top" title="Delete"></i> </a> </td> </tr> <?php $u++; } } else echo "<tr> <td colspan='7'>" . $this->lang->line('BE_GNRL_9') . "</td> </tr>"; ?> </tbody> </table> </div> <?php } ?> <div class="form-group row"> </div> <?php if ($id > 0) { ?> <!--<div class="card"> <div class="card-header header-elements-inline"> <h5 class="card-title">API History</h5> </div> </div> --> <div class="row"> <div class="col-lg-12"> <h5>API History</h5> </div> </div> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover"> <thead> <tr class="bg-primary"> <th><?php echo $this->lang->line('BE_MR_19'); ?></th> <th nowrap="nowrap"><?php echo $this->lang->line('BE_PCK_HD_4'); ?></th> <th><?php echo $this->lang->line('BE_PCK_14'); ?></th> <th></th> </tr> </thead> <tbody> <?php if ($rsAPIHistory) { foreach ($rsAPIHistory as $row) { ?> <tr> <td><?php echo stripslashes($row->APITitle); ?></td> <td><?php echo stripslashes($row->ServiceName); ?></td> <td><?php echo roundMe($row->ServicePrice); ?></td> <td> <a href="<?php echo base_url($this->config->item('apanel_name').'/services/package?fs=' . $fs . '&id=' . $id . '&crAPIId=' . $row->APIId . '&crAPISrvId=' . $row->APIServiceId . '&applyAPI=1&activeTab=2'); ?>" onclick="return confirm('Are you sure to apply this API?')" class="btn btn-default btn-xs"> <i class="fa fa-cog"></i> Apply API </a> </td> </tr> <?php } ?> <?php } else { ?> <tr> <td colspan="5"> <strong><?php echo $this->lang->line('BE_GNRL_9'); ?></strong> </td> </tr> <?php } ?> </tbody> </table> </div> <?php } ?> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 3) echo "active"; ?>" id="tab_3"> <div class="row"> <div class="col-lg-12"> <?php $isBulk = $useAsIMEI = $IsCustomIMEI = $AllowDigits = $AllowSmallAlphabets = $AllowCapitalAlphabets = 0; $IMEIFieldId = ''; $customFieldsObject = new stdClass; $customFieldsObject->FieldLabel = ''; $customFieldsObject->MinLen = ''; $customFieldsObject->MaxLen = ''; $customFieldsObject->Description = ''; foreach($userApiFields as $userApiField) { if($userApiField->Bulk) { $isBulk = 1; } if($userApiField->UseAsIMEI) { $IMEIFieldId = $userApiField->Id; $useAsIMEI = 1; } if($userApiField->AllowDigits) { $AllowDigits = 1; } if($userApiField->AllowSmallAlphabets) { $AllowSmallAlphabets = 1; } if($userApiField->AllowCapitalAlphabets) { $AllowCapitalAlphabets = 1; } if($userApiField->IsCustomIMEI) { $IsCustomIMEI = 1; $customFieldsObject = $userApiField; } } ?> <?php if ($fs == '0' || $fs == '3') { ?> <div class="form-group row"> <label class="col-lg-3 text-right control-label"> <?php echo $this->lang->line('BE_LBL_136'); ?>: </label> <div class="col-lg-7 radio-list"> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="fieldIMEI" onclick="$('[name=fieldIMEICustom]').prop('checked', false); $('#dvCustFld').hide();" value="1" <?php echo $useAsIMEI && !($IsCustomIMEI) ? 'checked' : ''; ?> /><?php echo $this->lang->line('BE_LBL_138b'); ?> <input type="hidden" name="IMEIFieldId" value="<?= $IMEIFieldId; ?>"> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="fieldBulk" value="1" <?php echo $isBulk ? 'checked' : '';?> /><?php echo $this->lang->line('BE_LBL_139b'); ?> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="fieldIMEICustom" onclick="$('[name=fieldIMEI]').prop('checked', false); $('#dvCustFld').show();" value="1" <?php echo $IsCustomIMEI ? 'checked' : ''; ?> /><?php echo $this->lang->line('BE_LBL_378'); ?> </label> </div> </div> </div> <?php } ?> <div class="container" id="dvCustFld" style=" display: <?php echo $IsCustomIMEI ? 'block' : 'none'; ?>"> <div class="form-group row"> <label class="col-lg-3 text-right control-label">Custom IMEI Name</label> <div class="col-lg-4"> <input type="text" name="IMEIFieldName" class="form-control" value="<?php echo $customFieldsObject->FieldLabel; ?>"> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">IMEI Minimum Length</label> <div class="col-lg-4"> <input type="number" value="<?php echo $customFieldsObject->MinLen ?: ''; ?>" name="IMEIFieldMinLen" class="form-control"> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">IMEI Maximum Length</label> <div class="col-lg-4"> <input type="number" value="<?php echo $customFieldsObject->MaxLen ?: ''; ?>" name="IMEIFieldMaxLen" class="form-control"> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label">Custom IMEI Information</label> <div class="col-lg-4"> <input type="text" value="<?php echo $customFieldsObject->Description; ?>" name="IMEIFieldDescription" class="form-control"> <br> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="IMEIAllowDigits" value="1" <?php if ($AllowDigits) echo 'checked'; ?> /><?php echo $this->lang->line('BE_LBL_871b'); ?> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="IMEIAllowSmallAlphabets" value="1" <?php if ($AllowSmallAlphabets) echo 'checked'; ?> /><?php echo $this->lang->line('BE_LBL_871c'); ?> </label> </div> <div class="form-check form-check-inline mt-0"> <label class="form-check-label"> <input type="checkbox" class="form-check-input" name="IMEIAllowCapitalAlphabets" value="1" <?php if ($AllowCapitalAlphabets) echo 'checked'; ?> /><?php echo $this->lang->line('BE_LBL_871d'); ?> </label> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="col-lg-12 text-right"> <button type="button" <?php if($IS_DEMO) echo 'disabled="disabled"';?> id="addrow" name="btnSave" class="btn GreenThemeButton">+ <?php echo $this->lang->line('CUST_CH_123'); ?></button> </div> <div class="col-lg-12 form-group"> <div class="table-responsive"> <table id="dynamic_field" class="MinWidthTd"> <tr> <td>Field Type</td> <td>Field Label</td> <td>Description</td> <td>Field Options</td> <td>Required</td> <td>Action</td> </tr> <?php $customFieldFound = false; $index = 0; ?> <?php foreach($userApiFields as $apiField) { ?> <?php if($apiField->UseAsIMEI) continue; ?> <tr style="vertical-align: top;"> <td class="myselect"> <select name="fieldType[]" class="form-control" data-placeholder="Select..."> <option value="0" selected><?php echo $this->lang->line('BE_LBL_623'); ?></option> <option value="text" <?php if($apiField->FieldType == 'text') echo 'selected'; ?>>Text Box</option> <option value="textarea" <?php if($apiField->FieldType == 'textarea') echo 'selected'; ?>>Text Area</option> <option value="dropdown" <?php if($apiField->FieldType == 'dropdown') echo 'selected'; ?>>Drop Down</option> <option value="radio" <?php if($apiField->FieldType == 'radio') echo 'selected'; ?>>Radio Button</option> <option value="hidden" <?php if($apiField->FieldType == 'hidden') echo 'selected'; ?>>Hidden Field</option> </select> </td> <td> <input type="text" class="form-control" placeholder="Enter Field Label" maxlength="100" name="txtFieldName[]" value="<?php echo($apiField->FieldLabel);?>" > <?php if(trim($apiField->FieldName)) { ?> <?php foreach(array_map('trim', explode('|', $apiField->FieldName)) as $ApiFieldName) { ?> <div class="removeInClone fieldOtherNameContainer"> <input type="text" class="form-control" placeholder="Enter Field Label" value="<?= $ApiFieldName; ?>" maxlength="100" name="txtFieldOtherName[<?= $index; ?>][]" /> <a href="javascript:;" onclick="$(this).closest('div').remove();"> <i class="fa fa-times"></i> </a> </div> <?php } ?> <?php } ?> <button type="button" class="btn removeInClone ThemeColorButton" onclick="$(this).before('<input type=\'text\' class=\'removeInClone form-control\' placeholder=\'Enter Field Label\' maxlength=\'100\' name=\'txtFieldOtherName[<?= $index; ?>][]\' />');">More Fields Name</button> <input type="hidden" name="FieldId[]" value="<?php echo $apiField->Id; ?>" /> </td> <td> <textarea class="form-control" rows="2" name="txtDescription[]"><?php echo replaceBRTag($apiField->Description); ?></textarea> </td> <td> <textarea class="form-control" rows="2" name="txtFieldOptions[]"><?php echo replaceBRTag($apiField->FieldOptions); ?></textarea> </td> <td> <select name="chkMandatory[]" class="form-control" data-placeholder="Select..."> <option value="0" selected><?php echo $this->lang->line('BE_LBL_623'); ?></option> <option value="1" <?php if($apiField->Required == 1) echo 'selected'; ?>>Yes</option> <option value="0" <?php if($apiField->Required == 0) echo 'selected'; ?>>No</option> </select> </td> <td> <button type="button" class="btn btn-delete btn_remove"><i class="fa icon-trash"></i></button> </td> </tr> <?php $customFieldFound = true; $index++; } ?> <?php if(!$customFieldFound) { ?> <tr style="vertical-align: top;"> <td class="myselect"> <select name="fieldType[]" class="form-control" data-placeholder="Select..."> <option value="0" selected><?php echo $this->lang->line('BE_LBL_623'); ?></option> <option value="text">Text Box</option> <option value="textarea">Text Area</option> <option value="dropdown">Drop Down</option> <option value="radio">Radio Button</option> <option value="hidden">Hidden Field</option> </select> </td> <td> <input type="text" class="form-control" placeholder="Enter Field Label" maxlength="100" name="txtFieldName[]" > <input type="hidden" name="FieldId[]" /> </td> <td> <textarea class="form-control" rows="2" name="txtDescription[]"></textarea> </td> <td> <textarea class="form-control" rows="2" name="txtFieldOptions[]"></textarea> </td> <td> <select name="chkMandatory[]" class="form-control" data-placeholder="Select..."> <option value="0" selected><?php echo $this->lang->line('BE_LBL_623'); ?></option> <option value="1">Yes</option> <option value="0">No</option> </select> </td> <td> </td> </tr> <?php } ?> </table> </div> </div> <div class="col-lg-12 form-group"> <div class="row"> <div class="col-lg-9"> <p>+More Fields Name: Different names known in other fusion or other scripts e.g. SERIAL_NUMBER, SRNO, Serial No etc</p> <?php if($apiType == 6) { ?> <p style="color: red;">If you have connected with GSM TOOL Version 1, please use these fields in `More Fields Name`. Like for `Username` use `username_K4I8` in `More Fields Name` field. For more fields please <a href="#" data-toggle="modal" class="ThemeColorButton btn-sm" data-target="#moreFieldsModal">Click Here</a></p> <?php } ?> </div> <div class="col-lg-3 text-right"> <button name="activeTab" onclick="return validate_imei_check();" value="3" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn btn-primary ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> </div> <?php if(!empty($apiFields)) { ?> <?php $apiFieldsTypes = [ 'text' => 'Text Box', 'textarea' => 'Text Area', 'dropdown' => 'Drop Down', 'radio' => 'Radio Button', ]; ?> <div class="col-lg-12"> <h3>API Custom Fields</h3> <div class="table-responsive"> <table class="table"> <thead> <tr> <th class="text-left">API Field Type</th> <th class="text-left">API Field Name</th> <th class="text-left">API Field Min Len</th> <th class="text-left">API Field Max Len</th> <th class="text-left">API Field Description</th> <th class="text-left">API Field Options</th> <th class="text-left">API Field Required</th> </tr> </thead> <tbody> <?php foreach($apiFields as $apiField) { ?> <tr> <td><?= $apiFieldsTypes[$apiField->FieldType]; ?></td> <td><?= $apiField->FieldLabel; ?></td> <td><?= $apiField->MinLen ?: '-'; ?></td> <td><?= $apiField->MaxLen ?: '-'; ?></td> <td><?= $apiField->Description ?: '-'; ?></td> <td><?= $apiField->FieldOptions ?: '-'; ?></td> <td><?= $apiField->Required ? 'Yes' : 'No'; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> <?php } ?> </div> </div> <div class="tab-pane <?php if($activeTab == 5) echo "active"; ?>" id="tab_5"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_104'); ?> :</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter File Name" maxlength="100" name="txtFileName" id="txtFileName" value="<?php echo($fName); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_212'); ?> :</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter HTML Title" maxlength="100" name="txtHTMLTitle" id="txtHTMLTitle" value="<?php echo($htmlTitle); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_213'); ?> :</label> <div class="col-lg-5"> <input type="text" class="form-control" placeholder="Enter SEO Name" maxlength="100" name="txtSEOName" id="txtSEOName" value="<?php echo($seoName); ?>"/> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_MR_38'); ?> :</label> <div class="col-lg-5"> <textarea class="form-control" rows="3" id="txtMetaTags" name="txtMetaTags"><?php echo $metaTags; ?></textarea> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_214'); ?> :</label> <div class="col-lg-5"> <textarea class="form-control" rows="3" id="txtMetaKW" name="txtMetaKW"><?php echo $metaKW; ?></textarea> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div> <div class="col-lg-5"> <button name="activeTab" value="5" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 7) echo "active"; ?>" id="tab_7"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_653'); ?>:</label> <div class="col-lg-5"> <textarea class="form-control" rows="16" id="txtPreCodes" name="txtPreCodes"><?php echo $preCodes; ?></textarea> </div> </div> <div class="form-group row"> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_654'); ?> :</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" class="chkSelect" name="chkPreCodes" id="chkPreCodes" class="toggle" <?php if ($calPreCodes == '1') echo 'checked'; ?> /> <span><label for="chkPreCodes"></label></span> </div> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div><div class="col-lg-4"> <button name="activeTab" value="7" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 8) echo "active"; ?>" id="tab_8"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> <?php $api_data = get_api_data(); if($apiIdForBrand==-1){ $selected_class = 'selected'; }else{ $selected_class = ''; } ?> <label class="col-lg-3 text-right control-label"><?php echo $this->lang->line('BE_LBL_691'); ?> :</label> <div class="col-lg-9"> <select name="apiIdForBrand" id="apiIdForBrand" class="form-control select2me" data-placeholder="<?php echo $this->lang->line('BE_LBL_278'); ?>"> <option value="0">Choose</option> <option <?php echo $selected_class; ?> value="-1">Our Brands</option> <?php FillCombo($apiIdForBrand, $api_data); ?> </select><img style="display:none;" id="imgBrndLoader" src="<?php echo base_url('assets/images/loading.gif'); ?>" border="0" alt="Please wait..."/> </div> </div> <div class="form-group row"> <label class="col-lg-3 control-label"> </label> <div class="col-lg-6"> <div class="table-responsive"> <table cellpadding="1" cellspacing="1" width="100%"> <tr> <td width="50%" valign="top"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton" id="btnModels" <?php if ($apiIdForBrand == 0) echo 'style="display:none"'; ?>> Get Models </button> <img style="display:none;" id="imgMdlsLoader" src="<?php echo base_url('assets/images/loading.gif'); ?>" border="0" alt="Please wait..."/> <div class="col-lg-9" id="dvBrands" <?php if ($apiIdForBrand == 0) echo 'style="display:none"'; ?>> <?php echo $brandsData; ?> </div> <input type="hidden" id="totalBrands" name="totalBrands" value="<?php echo $totalBrandsData;?>"/> </td> <td width="50%" valign="top"> <div class="col-lg-9" id="dvModels" <?php if ($apiIdForBrand == 0) echo 'style="display:none"'; ?>> <?php echo $brandsModelData; ?> </div> </td> </tr> </table> </div> </div> </div> <div class="form-group row" id="dvBrandsMain"> </div> <div class="form-group row" id="dvModelsMain" <?php if ($apiIdForBrand == 0) echo 'style="display:none"'; ?>> </div> <div class="form-group row"> <div class="col-lg-3"></div><div class="col-lg-4"> <button name="activeTab" value="8" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 9) echo "active"; ?>" id="tab_9"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> <label class="col-lg-3 control-label"><?php echo $this->lang->line('BE_LBL_695'); ?>:</label> <div class="col-lg-4"> <div class="switch-button switch-button-lg" data-on-label="YES" data-off-label="NO"> <input type="checkbox" name="chkSMS" id="chkSMS" <?php echo $sendSMS == 1 ? 'checked' : ''; ?> class="toggle"/> <span> <label for="chkSMS"></label> </span> </div> </div> </div> </div> <div class="form-group row"> <div class="col-lg-3"></div><div class="col-lg-4"> <button name="activeTab" value="9" type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton"><?php echo $this->lang->line('BE_LBL_72'); ?></button> </div> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 10) echo "active"; ?>" id="tab_10"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <div class="form-group row"> </div> <div class="table-responsive" id="dvDiscClientsData"></div> </div> </div> </div> </div> <div class="tab-pane <?php if($activeTab == 11) echo "active"; ?>" id="tab_11"> <div class="row"> <div class="col-lg-12"> <div class="card-body"> <?php echo $srvrsrvcs_precodes; ?> </div> </div> </div> </div> <?php } ?> </div> <?php echo form_close(); ?> </div> </div> </div> </div> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="moreFieldsModal" tabindex="-1" role="dialog" aria-labelledby="moreFieldsModal" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="moreFieldsModal">Add Following Fields In `More Fields Name`</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <table class="table"> <tr> <td>Serial No</td> <td>`serialno_U4L6` and `serialno_Z2O5`</td> </tr> <tr> <td> Email </td> <td>email_B5D9</td> </tr> <tr> <td> Quantity</td> <td>quantity_G7V7</td> </tr> <tr> <td>Username</td> <td>username_K4I8</td> </tr> <tr> <td> Serial No</td> <td>serialno_Z2O5</td> </tr> <tr> <td>ProductId Code</td> <td>productidcode_E0U2</td> </tr> <tr> <td>Phone No</td> <td>phoneno_C2Q9</td> </tr> <tr> <td>MEID</td> <td>meid_Z5H1</td> </tr> <tr> <td>Country</td> <td>country_V6A3</td> </tr> <tr> <td>Network</td> <td>network_S4A4</td> </tr> <tr> <td> Provider Id</td> <td>providerid_H1Y9</td> </tr> <tr> <td>Mep Code</td> <td>mepcode_J8G4</td> </tr> <tr> <td>PRD Number</td> <td>prdnumber_Q3V3</td> </tr> <tr> <td>CheckMend Report</td> <td>checkmendreport_V7B8</td> </tr> <tr> <td>Model No</td> <td>modelno_T3R8</td> </tr> <tr> <td>iCloud Email ID</td> <td>icloudemailid_G0D4</td> </tr> <tr> <td>UDID</td> <td>udid_I1A9</td> </tr> <tr> <td>KBH KRH</td> <td>kbhkrh_B7K3</td> </tr> <tr> <td>Image URL</td> <td>imageurl_F8O2</td> </tr> <tr> <td>Sent Pictures</td> <td>sentpictures_L1T0</td> </tr> <tr> <td>MEP CODES</td> <td>mepcodes_P7Y0</td> </tr> <tr> <td>PRD CODES</td> <td>prdcodes_D3O0</td> </tr> <tr> <td>Dongle ID</td> <td>dongleid_D7V1</td> </tr> <tr> <td>Active Code</td> <td>activecode_Q7B2</td> </tr> <tr> <td>Password</td> <td>pasward_V6I0</td> </tr> <tr> <td>Type Screen Hint</td> <td>U4G4T7U9K8R6F3L1J9</td> </tr> <tr> <td>MSLsn</td> <td>N2B4R0Y7T4W5D0I4K3</td> </tr> <tr> <td>SWID</td> <td>K9Y2N8V1A4X1C4Y7Y8</td> </tr> <tr> <td>Service Terms</td> <td>E4C6G0W5U1K0X4K7P5</td> </tr> <tr> <td>FingerPrint</td> <td>Q6H1H9H4I2H2I4Y2K6</td> </tr> <tr> <td>USERNAME/SN</td> <td>O7V8E3J2J4X6X1V6V2</td> </tr> <tr> <td>Z3X Credit Counts</td> <td>R5C9X7Y9C2J3K9J9P0</td> </tr> <tr> <td>GC Pro Credit</td> <td>P8V9H2R1G5H6E6X7K5</td> </tr> <tr> <td>HWID</td> <td>S7G1J5G0T9G8K5V8N5</td> </tr> <tr> <td>Type</td> <td>R9Z6A8F8J6F3G8Y2J2</td> </tr> <tr> <td>E-Mail:</td> <td>Q4X7N6P2D5U4Q4U4G7</td> </tr> <tr> <td>Types</td> <td>A5C9F8O2Y0W8Q9M7C7</td> </tr> <tr> <td>SamKey TMO</td> <td>I9E8C7S2D7I3R0T7Z1</td> </tr> <tr> <td>Sold By info</td> <td>S9Z5X9R6B4M8C9J5L5</td> </tr> <tr> <td>Pasward</td> <td>Y1S9G8O0G7U3L5O0J9</td> </tr> <tr> <td>User Type</td> <td>W6A2C3K7V9A4Z1D1R2</td> </tr> <tr> <td>Part Number</td> <td>O9N7W0F1N0E8L2V0U9</td> </tr> <tr> <td>NTool Credit</td> <td>S1Y0W7L6M6N7Q6U8F3</td> </tr> <tr> <td>EFT Serial</td> <td>L5J5U2U0M0W7C3A6B3</td> </tr> <tr> <td>CPU</td> <td>F0O6I9O9F2P8F4H5M6</td> </tr> <tr> <td>Lost/Clean Report </td> <td>Q2Y9P4W8E2I4A9I0Q5</td> </tr> <tr> <td>HWID:</td> <td>A7X7P9A0A3H6A9P2X8</td> </tr> <tr> <td> GSX Info</td> <td>L0Z0Z9F8X3H5A3G3W9</td> </tr> <tr> <td> Infinity Box Serial </td> <td>U3F7X2Z1M4A1W3C6Y8</td> </tr> <tr> <td>Best Dongle Serial</td> <td>X9Z7Z7H1I6K8A7D7X1</td> </tr> <tr> <td>infinity CDMA Tool Serial</td> <td>J5O5R3C3Q7Z9S3L7V8</td> </tr> <tr> <td> Whatsapp No</td> <td>S5G3Q8P6Q0Q8C4A6U9</td> </tr> <tr> <td>User Types</td> <td>C1B4H7B2O4A8H3K1U8</td> </tr> <tr> <td>KeyLock</td> <td>A7G1Q6U1M3W9V1W4L1</td> </tr> <tr> <td>UMT Serial</td> <td>K1Y3K9E2C6A7L9Q7D1</td> </tr> <tr> <td>Account ID</td> <td>T4Y3T4S9U5F2O4W5R3</td> </tr> <tr> <td>USER_CARD_ID</td> <td>K2S3Q9F1N3H7D9B2L3</td> </tr> <tr> <td> DT Smart PRO Finger ID</td> <td>O6T7E4L5K4N0R3J6Z1</td> </tr> <tr> <td>DT Manager PRO Finger ID</td> <td>E4F8O8H5S1E9R5H9T8</td> </tr> <tr> <td> Player ID </td> <td>X2Z8Q6F8V5M8V0K9I5</td> </tr> <tr> <td>Nick Name</td> <td>N2E9M8K9T7X7Z5R6O5</td> </tr> <tr> <td>Nick Name</td> <td>D1I3V3B9Z1L7S7K2O8</td> </tr> <tr> <td>Player ID</td> <td>X5D6T0A2D3N9J6P9H6</td> </tr> <tr> <td>Player_id</td> <td>E4J2K7C2T2R8Q8G8B9</td> </tr> <tr> <td>Player_Id</td> <td>V0Z1D2V0L8C1O8Z5X8</td> </tr> <tr> <td>Pubg id</td> <td>Y6T0L3Q0T6L8R1Y7I1</td> </tr> <tr> <td>Username/HWID</td> <td>V1Y3F8Z1E6Q1E9X2M6</td> </tr> <tr> <td>Hardware ID</td> <td>E3T4M1Z1R5G4Z9W8C0</td> </tr> <tr> <td>User ID</td> <td>USER_ID</td> </tr> <tr> <td>Zone ID</td> <td>ZONE_ID</td> </tr> <tr> <td>Garena or Facebook </td> <td>GARENA_OR_FACEBOOK</td> </tr> <tr> <td>IMEI 2</td> <td>IMEI_2</td> </tr> <tr> <td>Token</td> <td>TOKEN</td> </tr> <tr> <td>ID info</td> <td>ID_INFO</td> </tr> <tr> <td>IMEI or Serial</td> <td>IMEI_OR_SERIAL</td> </tr> <tr> <td> MI ID</td> <td>MI_ID</td> </tr> <tr> <td> FSN OR IMEI</td> <td>FSN_OR_IMEI</td> </tr> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary ThemeColorButton" data-dismiss="modal">Close</button> </div> </div> </div> </div> <script type="text/javascript"> function costFromApi() { if($('[name="chkFetchCPr"]').is(':checked')) { var close = document.getElementsByClassName("closebtn"); for (i = 0; i < close.length; i++) { var div = close[i].parentElement; div.style.opacity = "1"; div.style.display = "block"; $("#chkFetchCPr").effect("pulsate", { times:14 }, 10000); setTimeout(function(){ div.style.opacity = "0"; div.style.display = "none"; $('html, body').animate({ scrollTop: $("#chkCnvrtPrice").offset().top }, 2000); }, 10000); $('html, body').animate({ scrollTop: $("#txtCostPrice").offset().top }, 500); } return false; } return true; } function validate_imei_check() { <?php if($this->input->get('fs') != 1) { ?> if($('[name="fieldIMEI"]').is(':checked')) { return true; }else if($('[name="fieldIMEICustom"]').is(':checked')) { return true; } alert('Please check at least 1 IMEI Field Type.'); return false; <?php } ?> } $(function(){ $('#tabsControls [data-toggle="tab"]').on('show.bs.tab', function(e){ var tabNum = parseInt($(this).attr('href').match(/\d+$/)); var url = '<?php echo base_url($this->config->item('apanel_name').'/services/package') . get_query_string(); ?>'; url = url.replace(/.activeTab=\d+/g, ''); var joiner = url.indexOf('?') > -1 ? '&' : '?'; url = url + joiner+'activeTab='+tabNum; $('#frm').attr('action', url); $('[name="submitUrl"]').val(url); }); }); </script> <script type="text/javascript" src="<?php echo base_url('assets/plugins/ckeditor/ckeditor.js'); ?>"></script> <script language="javascript" src="<?php echo base_url('assets/js/package.js'); ?>?v=<?php echo $this->config->item('assets_version'); ?>"></script> <script language="javascript" src="<?php echo base_url('assets/js/setpriceswithapi.js'); ?>?v=<?php echo $this->config->item('assets_version'); ?>"></script>