uawdijnntqw1x1x1
IP : 216.73.216.136
Hostname : dhandapanilive
Kernel : Linux dhandapanilive 5.15.0-139-generic #149~20.04.1-Ubuntu SMP Wed Apr 16 08:29:56 UTC 2025 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
html
/
dhandapani
/
d6e06
/
..
/
dev
/
..
/
..
/
dhandapaniimports
/
receiptheader.php
/
/
<?php $tns2 = "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 111.92.43.75)(PORT = 1521)) (CONNECT_DATA = (SID = XE)))"; if ($conn = oci_connect("PDJ","PDJ", $tns2)) { echo "Connected to DataBase"; } else { echo ("could not connect to DataBase"); exit; } $localconn = new mysqli("localhost","root","Ktp@201*","dhandapani"); // Check connection if ($mysqli -> connect_errno) { echo "Failed to connect to MySQL: " . $mysqli->connect_error; exit(); } $s = oci_parse($conn, "SELECT * FROM CHITRECEIPTHEADER where TRUNC (CRHXDATE) = TRUNC (SYSDATE)"); oci_execute($s); echo "<pre>"; while ($row = oci_fetch_assoc($s)) { $rows[] = $row; $keys=array_keys($row); $values = array_values($row); $key_placeholders = implode(',',$keys); $values_placeholders = "'" . implode ( "', '", $values ) . "'"; $alreadyexist = "select * from chitreceipt_header_temp where CRHXID='".$row['CRHXID']."'"; $alreadyresult = mysqli_query($localconn,$alreadyexist); $alreadyexistrow = mysqli_fetch_row($alreadyresult); if(!empty($alreadyexistrow)){ $updaterow = ''; $i=0; end($row); $lastkey = key($row); foreach($row as $key=>$value){ $updaterow .= "'".$key."' = '".$value."'"; if($lastkey != $key){ $updaterow .= ","; } $i++; } $query = "UPDATE chitreceipt_header_temp SET $updaterow WHERE CRHXID = '".$row['CRHXID']."'"; }else{ $query = "INSERT INTO chitreceipt_header_temp (".$key_placeholders.") VALUES (".$values_placeholders.")"; } $result = mysqli_query($localconn,$query); $installmentsql = "select * from chitmember_installmentdetail where CMIDCMXXID='".$row['CRHXCMXXID']."' and CMIDCRHXID ='".$row['CRHXID']."'"; $installmentresult = mysqli_query($localconn,$installmentsql); $installmentrow = mysqli_fetch_assoc($installmentresult); if(empty($installmentrow)){ $ociinstallmentsql = "select * FROM CHITMEMBERINSTALLMENTDETAIL where CMIDCMXXID='".$row['CRHXCMXXID']."' and CMIDCRHXID ='".$row['CRHXID']."'"; $inslmentociresult = oci_parse($conn, $ociinstallmentsql); oci_execute($inslmentociresult); $installmentocirow = oci_fetch_assoc($inslmentociresult); $keys=array_keys($installmentocirow); $values = array_values($installmentocirow); $key_placeholders = implode(',',$keys); $values_placeholders = "'" . implode ( "', '", $values ) . "'"; $updaterow = ''; $i=0; end($installmentocirow); $lastkey = key($installmentocirow); foreach($installmentocirow as $key=>$value){ $updaterow .= "`".$key."` = '".$value."'"; if($lastkey != $key){ $updaterow .= ","; } $i++; } $installmentquery = "UPDATE chitmember_installmentdetail SET $updaterow WHERE CMIDID = '".$installmentocirow['CMIDID']."'"; $installmentresult = mysqli_query($localconn,$installmentquery); } } echo "Imported Successfully";exit();
/var/www/html/dhandapani/d6e06/../dev/../../dhandapaniimports/receiptheader.php