Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: users.php
<!-- Page header --> <div class="page-header border-bottom-0 usersSection"> <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 $this->lang->line('BE_LBL_922'); ?></h4> </div> </div> </div> <div class="form-group row"> <div class="col-lg-12"> <?php $USER_ID_BTNS = $userId; if ($USER_ID_BTNS > 0) include APPPATH . 'scripts/userbtns.php'; ?> </div> </div> <!-- /page header --> <!-- Content area --> <div class="content pt-0"> <?php echo form_open(base_url($this->config->item('apanel_name').'/clients/users?frmId=26&fTypeId=5'), 'class="horizontal-form" id="frm" name="frm"'); ?> <?php if (isset($message) && $message != '') { ?> <div class="card-body"> <!-- Our Working Area Start --> <div class="form-group row"> <div class="col-lg-12"> <div class="alert alert-success"><?php echo $message; ?></div> </div> </div> </div> <?php } ?> <div class="card"> <div class="card-header header-elements-inline services_search"> <h5 class="card-title cardCollapse"><?php echo $this->lang->line('CUST_CH_BTN'); ?></h5> <div class="header-elements"> <div class="list-icons"> <a class="list-icons-item rotate-180" data-action="collapse"></a> </div> </div> </div> <div class="card-body CollapsedCardBody" style="display: block;"> <div class="row"> <div class="col-xl-12"> <div class="form-group row"> <div class="col-lg-6"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('BE_USR_4'); ?></label> <input type="text" placeholder="Enter First Name" name="txtFName" value="<?php echo($fName); ?>" class="form-control"> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('BE_USR_5'); ?></label> <input type="text" name="txtLName" placeholder="Enter Last Name" value="<?php echo($lName); ?>" class="form-control"> </div> </div> </div> <div class="form-group row"> <div class="col-lg-6"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('BE_USR_1'); ?></label> <input type="text" name="txtUName" placeholder="Enter Username" value="<?php echo($uName); ?>" class="form-control"> </div> </div> <div class="col-lg-6"> <div class="form-group"> <label class="control-label"><?php echo $this->lang->line('BE_LBL_345'); ?></label> <input type="text" name="txtEmail" placeholder="Enter User Email" value="<?php echo($email); ?>" class="form-control"> </div> </div> </div> <div class="form-group row"> <div class="col-lg-6"> <div class="form-group"> <?php $price_plans = fetch_price_plans_2(); ?> <label class="control-label"><?php echo $this->lang->line('BE_LBL_18'); ?></label> <select name="planId" id="planId" class="form-control select2me" data-placeholder="<?php echo $this->lang->line('BE_LBL_272'); ?>"> <option value="0"><?php echo $this->lang->line('BE_LBL_272'); ?></option> <?php FillCombo($planId, $price_plans); ?> </select> </div> </div> <div class="col-lg-6"></div> </div> <div class="form-group row"> <div class="col-lg-12 text-right"> <div> <button type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn ThemeColorButton" onclick="setValue('0');"><?php echo $this->lang->line('BE_GNRL_BTN_1'); ?></button> </div> </div> </div> </div> </div> </div> </div> <div class="card"> <div class="row"> <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> <div class="card-body"> <div class="row"> <div class="col-md-12 text-right"> <?php if ($count != 0) { $row = $users_row; $totalRows = $row->TotalRecs; if ($totalRows > $limit) doPages_DropDown($page_name, $back, $start, $txtlqry, $totalRows, $limit, $eu, $pLast, $thisp, $next, 'frm'); } ?> </div> </div> <div class="form-group row"> <div class="col-lg-12"> <div align="right"> <a <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> href="<?= base_url($this->config->item('apanel_name').'/clients/allow_payment_methods').get_query_string() ?>" class="btn btn-warning ThemeColorButton">Allow Payment Methods</a> <div class="btn-group"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn btn-primary dropdown-toggle clrRed" data-toggle="dropdown"data-hover="dropdown" data-delay="1000" data-close-others="true">Reset Prices / Passwords / Pins</button> <ul class="dropdown-menu" role="menu" style="text-align:left;"> <li class="dropdown-item"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> name="btnRSetPr1" id="btnRSetPr1" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> ><?php echo $this->lang->line('BE_LBL_408'); ?></button> </li> <li class="dropdown-item"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> name="btnRSetPr2" id="btnRSetPr2" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> ><?php echo $this->lang->line('BE_LBL_409'); ?></button> </li> <li class="dropdown-item"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> name="btnRSetPr3" id="btnRSetPr3" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> ><?php echo $this->lang->line('BE_LBL_410'); ?></button> </li> <li class="dropdown-item"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> name="btnRSetPins" id="btnRSetPins" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> ><?php echo $this->lang->line('BE_LBL_649'); ?></button> </li> <li class="dropdown-item"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> name="btnRSetPwd" id="btnRSetPwd" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> data-id='0' >Reset password and notify clients</button> </li> </ul> </div> <!-- <input type="hidden" value="<?php /*echo $i; */?>" name="i" id="i"/> for supplier--> <!--<button type="button" <?php /*if ($IS_DEMO) echo 'disabled="disabled"'; */?> name="btnRSetPwd" id="btnRSetPwd" <?php /*if ($IS_DEMO) echo 'disabled="disabled"'; */?> class="btn btn-warning data-id='1' clrRed">Reset password and notify Suppliers</button>--> <div class="btn-group"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn btn-primary ThemeColorButton dropdown-toggle" data-toggle="dropdown"data-hover="dropdown" data-delay="1000" data-close-others="true"> <?php echo $this->lang->line('BE_LBL_664'); ?></button> <ul class="dropdown-menu" role="menu" style="text-align:left;"> <?php if ($count > 0) { foreach ($rsGroups as $row) { echo '<li class="dropdown-item"><a href="' . base_url() . $this->config->item('apanel_name') . '/clients/downloadcustomers?gId=' . $row->PricePlanId . '">' . stripslashes($row->PricePlan) . '</a></li>'; } } ?> <li class="dropdown-item"><a href="JavaScript:void(0);" onClick="downloadUsers();">Selected Clients</a></li> <li class="dropdown-item"><a href="<?php echo base_url($this->config->item('apanel_name').'/clients/downloadcustomers'); ?>">All Clients</a></li> </ul> </div> <div class="btn-group"> <button type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> class="btn btn-primary ThemeColorButton dropdown-toggle" data-toggle="dropdown"data-hover="dropdown" data-delay="1000" data-close-others="true"> <?php echo $this->lang->line('BE_LBL_309'); ?></button> <ul class="dropdown-menu" role="menu" style="text-align:left;"> <li class="dropdown-item"><a href="JavaScript:void(0);" onClick="enableUsers();"><?php echo $this->lang->line('BE_LBL_744'); ?></a></li> <li class="dropdown-item"><a href="javascript:void(0);" onclick="disableUsers();"><?php echo $this->lang->line('CUST_CH_119'); ?></a></li> </ul> </div> <!-- <input type="submit" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> value="<?php echo $this->lang->line('BE_LBL_309'); ?>" onClick="setValue('1');" class="btn btn-primary" name="btnSubmit"/> --> <?php if (array_key_exists('326', $ARR_ADMIN_FORMS)) { ?> <input type="button" <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> value="Archive Client(s)" class="btn btn-warning ThemeColorButton" onClick="deleteUsers();"/> <?php } ?> <a <?php if ($IS_DEMO) echo 'disabled="disabled"'; ?> href="<?= base_url($this->config->item('apanel_name').'/clients/users_verification').get_query_string() ?>" class="btn btn-warning ThemeColorButton">Unverified Client(s)</a> </div> </div> </div> <div class="form-group row"> <div class="col-lg-12"> <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_USR_1'); ?></th> <th><?php echo $this->lang->line('BE_LBL_345'); ?></th> <th><?php echo $this->lang->line('BE_USR_9'); ?></th> <th><?php echo $this->lang->line('BE_USR_10'); ?></th> <th><?php echo $this->lang->line('BE_LBL_18'); ?></th> <th style="text-align:center"><?php echo $this->lang->line('CUST_LBL_301'); ?></th> <th style="text-align:center"><input type="checkbox" class="chkSelect" id="chkSelect" name="chkSelect" onClick="selectAllChxBxs('chkSelect', 'chkUsers', <?php echo $count; ?>);"> </th> </tr> </thead> <tbody> <?php $strUserIds = '0'; if ($count != 0) { $i = 0; foreach ($rsCats as $row) { $strUserIds .= ',' . $row->UserId; $keys = crypt_key($row->UserId); $fontColor = ''; $myCredits = decrypt($row->Credits, $keys); if ($myCredits == '') $myCredits = '-'; else $myCredits = $row->CurrencyAbb . ' ' . roundMe($myCredits); if ($row->DisableUser == '1') $fontColor = ' style="color:grey;"'; ?> <tr> <td><strong><?php echo stripslashes($row->UserName); ?></strong></td> <td><?php echo($row->UserEmail); ?></td> <td><?php echo stripslashes($row->Name); ?></td> <td><?php echo $myCredits; ?></td> <td><?php echo $row->PricePlan == '' ? '-' : stripslashes($row->PricePlan); ?></td> <td style="text-align:center" valign="middle" nowrap="nowrap"> <?php if (array_key_exists('328', $ARR_ADMIN_FORMS)) { ?> <a title="Login to customer account" href="<?php echo base_url($this->config->item('apanel_name').'/reconcile/'); ?>lgn_a_s_clint_rand?uId=<?php echo($row->UserId); ?>" target="_blank" class="btn btn-xs UsersActionButtons" style="background-color:#f3565d; color:#FFFFFF"><i class="fa fa-user" aria-hidden="true"></i></a> <?php } ?> <a title="<?php echo $row->DisableUser == 1 ? 'Enable' : 'Disable'; ?> User" href="javascript:;" class="btn btn-xs UsersActionButtons enableDisableUser" data-id="<?php echo $row->UserId; ?>" data-comments="<?php echo htmlspecialchars(nl2br($row->Comments)); ?>" data-username="<?php echo $row->UserName; ?>" data-is-disabled="<?php echo $row->DisableUser; ?>" style="background-color:#<?php echo $row->DisableUser == 1 ? 'F8CB00' : '428bca'; ?>; color:#FFFFFF"><i class="fa fa-lock" aria-hidden="true"></i></a> <?php if (array_key_exists('327', $ARR_ADMIN_FORMS)) { ?> <a title="Overview" href="<?php echo base_url($this->config->item('apanel_name').'/services/'); ?>overview?id=<?php echo($row->UserId); ?>" style="background-color:#AAA8A9; color:#FFFFFF" class="btn btn-xs UsersActionButtons"><i class="fa icon-eye"></i></a> <?php } ?> <?php if (array_key_exists('346', $ARR_ADMIN_FORMS)) { ?> <a title="Edit Customer Details" href="<?php echo base_url($this->config->item('apanel_name').'/clients/'); ?>user?id=<?php echo($row->UserId); ?>" class="btn btn-xs UsersActionButtons" style="background-color:#89c4f4; color:#FFFFFF"><i class="fa fa-pencil" data-toggle="tooltip" data-placement="top" title="Edit"></i></a> <?php } ?> <?php if (array_key_exists('329', $ARR_ADMIN_FORMS)) { ?> <a title="Credit History" href="<?php echo base_url($this->config->item('apanel_name').'/clients/'); ?>credithistory?userId=<?php echo($row->UserId); ?>" style="background: #26a69a9e" class="btn btn-xs UsersActionButtons"><i class="fa fa-usd"></i></a> <?php } ?> <?php if (array_key_exists('330', $ARR_ADMIN_FORMS)) { ?> <a title="Add/Rebate Credits" href="<?php echo base_url($this->config->item('apanel_name').'/clients/'); ?>addcredits?userId=<?php echo($row->UserId); ?>" class="btn btn-xs UsersActionButtons bg-info"><i class="fa fa-money"></i></a> <?php } ?> <?php if (array_key_exists('331', $ARR_ADMIN_FORMS)) { ?> <a title="Customer API" href="<?php echo base_url($this->config->item('apanel_name').'/clients/'); ?>userapi?userId=<?php echo($row->UserId); ?>" class="btn btn-xs UsersActionButtons" style="background-color:#8775a7; color:#FFFFFF"><i class="fa fa-cog"></i></a> <?php } ?> </td> <td align="center"> <input type="checkbox" class="chkSelect" id="chkUsers<?php echo $i; ?>" name="chkUsers[]" value="<?php echo $row->UserId; ?>" /> </td> </tr> <?php $i++; } } else echo "<tr><td colspan='8'>" . $this->lang->line('BE_GNRL_9') . "</td></tr>"; if ($this->input->post_get('du') && $this->input->post_get('du') == '1') echo '<input type="hidden" name="du" value="1" />'; ?> <input type="hidden" value="0" name="cldFrm" id="cldFrm"/> <input type="hidden" value="<?php echo $strUserIds; ?>" name="strUserIds"/> <input type="hidden" id="records" name="records" value="<?php echo $limit; ?>"/> <input type="hidden" name="start" id="start" value="<?php echo $start; ?>"/> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php echo form_close(); ?> </div> <!-- Modal --> <div class="modal fade" id="enableDisableUserModal" tabindex="-1" role="dialog" aria-labelledby="enableDisableUserModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <form method="post" action="<?php echo base_url($this->config->item('apanel_name').'/clients/users').get_query_string(); ?>"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="enableDisableUserModalLabel"></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <p></p> <div class="row"> <div class="col-12"> <label><?php echo $this->lang->line('CUST_LBL_299'); ?></label> </div> <div class="col-12"> <textarea class="form-control" name="comments"></textarea> </div> </div> </div> <div class="modal-footer"> <input type="hidden" name="UserId"> <input type="hidden" name="action" value="enableDisableUser"> <input type="hidden" name="DisableUser"> <button type="submit" class="btn"></button> <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $this->lang->line('BE_LBL_931'); ?></button> </div> </div> </form> </div> </div> <script language="javascript" src="<?php echo base_url('assets/js/resetpwds.js'); ?>?v=<?php echo $this->config->item('assets_version'); ?>"></script> <script language="javascript" src="<?php echo base_url('assets/js/languages/english.js'); ?>"></script> <script> function setValue(i) { document.getElementById('cldFrm').value = i; } function deleteUsers() { var strIds = validate(); if (strIds != false) { if (confirm('Are you sure you want to archive the selected client(s)?')) window.location.href = '<?php echo base_url($this->config->item('apanel_name').'/clients/');?>users?id=' + strIds + '&del=1&start=<?php echo $start . $txtlqry; ?>'; } } function enableUsers() { var strIds = validate(); if (strIds != false) window.location.href = '<?php echo base_url($this->config->item('apanel_name').'/clients/');?>enable_disable?status=1&ids=' + strIds; } function disableUsers() { var strIds = validate(); if (strIds != false) window.location.href = '<?php echo base_url($this->config->item('apanel_name').'/clients/');?>enable_disable?status=0&ids=' + strIds; } function downloadUsers() { var strIds = validate(); if (strIds != false) window.location.href = '<?php echo base_url($this->config->item('apanel_name').'/clients/');?>downloadcustomers?ids=' + strIds; } function validate(cldFrm) { var totalUsers = <? echo $count; ?>; var strIds = '0'; for (var i = 0; i < totalUsers; i++) { if (document.getElementById('chkUsers' + i).checked) { strIds += ',' + document.getElementById('chkUsers' + i).value; } } if (strIds == '0') { alert('<? echo $this->lang->line('BE_LBL_53'); ?>'); return false; } else return strIds; } $(document).ready(function(){ $(".cardCollapse").click(function(){ if($(this).parents('.card').hasClass('card-collapsed')){ $(this).parents('.card').removeClass('card-collapsed'); $('.CollapsedCardBody').show(); }else{ $(this).parents('.card').addClass('card-collapsed'); $('.CollapsedCardBody').hide(); } }); $('.enableDisableUser').click(function(e){ e.preventDefault(); var id = $(this).data('id'); var username = $(this).data('username'); var comments = $(this).data('comments'); var is_disabled = $(this).data('is-disabled'); var state = is_disabled == 1 ? 'Enable' : 'Disable'; var bgcolor = is_disabled == 1 ? '#26a69a' : '#F3565D'; var $modal = $('#enableDisableUserModal'); $modal.find('.modal-title').text(username); $modal.find('.modal-footer [type="submit"]').text(state).css({ 'background-color': bgcolor, 'color': '#fff', }); $modal.find('.modal-footer [name="UserId"]').val(id); $modal.find('.modal-footer [name="DisableUser"]').val((is_disabled == 1 ? 0 : 1)); $modal.find('.modal-body > p').text('Are you sure you want to '+state.toLowerCase()+' this member?'); $modal.find('.modal-body [name="comments"]').val(comments); if(is_disabled == 1) { $modal.find('.modal-body [name="comments"]').closest('.row').hide(); }else{ $modal.find('.modal-body [name="comments"]').closest('.row').show(); } $modal.modal('show'); }); }); </script>