function getUnassignedPhoneNumbersEdit($currentNumber) { $free_numbers = getUnassignedPhoneNumbers(); $current_numbers = explode('#', $currentNumber); if (!empty($current_numbers)) { foreach ($current_numbers as $cn) { if (!in_array($cn, $free_numbers) && trim($currentNumber) != '') { array_push($free_numbers, $cn); } } } else { if (!in_array($currentNumber, $free_numbers) && trim($currentNumber) != '') { array_push($free_numbers, $currentNumber); } } return $free_numbers; }
print_success($msg); print_error($error); ?> <form role="form" class="addClassForm col-md-12" method="post" action="admin.php?act=addclient" enctype="multipart/form-data"> <div class="col-md-8 col-sm-12"> <div class="form-group"> <label class="">GSM Number: </label> <!--<input type="text" name="client_id" value="<?php echo $_POST['client_id']; ?> " class="form-control">--> <select name="client_id[]" class="form-control" multiple="multiple"> <?php $nos = getUnassignedPhoneNumbers(); foreach ($nos as $no) { $selected = $_POST['client_id'] == $no ? "selected" : ""; echo '<option value="' . $no . '" ' . $selected . '>' . $no . '</option>'; } ?> </select> </div> <div class="form-group"> <label>Google Analytics View ID: </label> <input type="text" name="ga_view_id" value="<?php echo $_POST['ga_view_id']; ?> " class="form-control"> </div> <div class="form-group">