Файловый менеджер - Редактировать - /home/d46091/udyogaadhaar.net/editable/edit-form.php
Назад
<?php require("./config.php"); include_once("./editable/data-form.php"); if (isset($_GET['cid']) && $_GET['cid'] != '') { $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://crm11.techlounge.co.in/api/check-whatsapp-link-cid.php?cid='.$_GET['cid'].'', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); echo $response = curl_exec($curl); curl_close($curl); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://crm2.techlounge.co.in/api/check-whatsapp-link-cid.php?cid='.$_GET['cid'].'', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); echo $response = curl_exec($curl); curl_close($curl); if ($response == 'Link Expired') { ?> <script> document.addEventListener("DOMContentLoaded", function (e) { document.querySelector("body").innerHTML = 'Link Expired'; }); </script> <?php } $oid = 'false'; if (isset($_GET['oid']) && $_GET['oid'] == 'true') { $oid = 'true'; } $did = 'false'; if (isset($_GET['did']) && $_GET['did'] == 'true') { $did = 'true'; } ?> <script> document.addEventListener("DOMContentLoaded", function (e) { document.querySelector("#main-form").setAttribute("action", "./editable/edit-submit-form.php?oid=<?php echo $oid; ?>&did=<?php echo $did; ?>"); var files = document.querySelectorAll("input[type='file']"); for (var i = 0; i < files.length; i++) { files[i].removeAttribute("required"); files[i].parentNode.style.display = 'none'; files[0].parentNode.style.display = 'block'; files[1].parentNode.style.display = 'block'; } var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "cid"); input.setAttribute("value", "<?php echo $_GET['cid']; ?>"); document.querySelector("#main-form").appendChild(input); var input = document.createElement("input"); input.setAttribute("type", "hidden"); input.setAttribute("name", "auto_campaign_price"); input.setAttribute("value", "<?php if(isset($_GET['auto_campaign_price'])){echo $_GET['auto_campaign_price'];} ?>"); document.querySelector("#main-form").appendChild(input); document.getElementById('office-state').required = false; document.getElementById('office-district').required = false; }); </script> <?php $sql_select_cid = 'SELECT * FROM cid WHERE cid = "'.$_GET["cid"].'"'; $result_select_cid = $conn->query($sql_select_cid); if ($result_select_cid) { $row_select_cid = $result_select_cid->fetch_assoc(); $form_name = $row_select_cid['form_name']; $sql_select_form = 'SELECT * FROM '.$row_select_cid["table_name"].' WHERE id = "'.$row_select_cid['uid'].'"'; $result_select_form = $conn->query($sql_select_form); if ($result_select_form) { $row_select_form = $result_select_form->fetch_assoc(); $form_fields = array($form_data)[0][$form_name]['form_fields']; //echo $row_select_form['office_state']; //echo $row_select_form['office_district']; ?> <script> document.addEventListener("DOMContentLoaded", function (e) { var stateValue='<?php echo $row_select_form["office_state"];?>'; var districtValue='<?php echo $row_select_form["office_district"];?>'; $("select[name='office_state']").val(stateValue); var districtOptions = ""; for(districtId in districtByState[stateValue]) { districtOptions += "<option>"+districtByState[stateValue][districtId]+"</option>"; } officeDistrict.innerHTML = districtOptions; $("select[name='office_district']").val(districtValue); }); </script> <script>document.addEventListener("DOMContentLoaded", function (e) {<?php foreach ($form_fields as $form_field=>$form_field_value) { ?>document.querySelector("#main-form [name='<?php echo $form_field; ?>']").value = '<?php echo $row_select_form[$form_field_value] ?>';<?php } ?>});</script> <?php } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка