Viewing file: ddacc_print.php (21.62 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Create Account</title>
<script> window.history.forward(1); document.attachEvent("onkeydown", my_onkeydown_handler); function my_onkeydown_handler() { switch (event.keyCode) { case 116 : // 'F5' event.returnValue = false; event.keyCode = 0; //window.status = "We have disabled F5"; break; } } document.onmousedown=disableclick; status="Right Click is not allowed"; function disableclick(e) { if(event.button==2) { alert(status); return false; } }
</script> <style type="text/css"> #form1 #print2 table tr td table tr td { font-weight: bold; } #form1 #print2 table tr td table tr td table tr td table tr td h2 { color: #F00; } </style> </head> <center> <body>
<?php $aaamount=$_POST[amount]; $upamount=$_POST[odamount]-$_POST[amount]; $result=0; $num= $upamount; $nwords = array( "", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eightteen", "nineteen", "twenty", 30 => "thirty", 40 => "fourty", 50 => "fifty", 60 => "sixty", 70 => "seventy", 80 => "eigthy", 90 => "ninety" );
function number_to_words ($x) { global $nwords; if(!is_numeric($x)) { $w = '#'; }else if(fmod($x, 1) != 0) { $w = '#'; }else{ if($x < 0) { $w = 'minus '; $x = -$x; }else{ $w = ''; } if($x < 21) { $w .= $nwords[$x]; }else if($x < 100) { $w .= $nwords[10 * floor($x/10)]; $r = fmod($x, 10); if($r > 0) { $w .= ' '. $nwords[$r]; } } else if($x < 1000) { $w .= $nwords[floor($x/100)] .' hundred'; $r = fmod($x, 100); if($r > 0) { $w .= ' '. number_to_words($r); } } else if($x < 1000000) { $w .= number_to_words(floor($x/1000)) .' thousand'; $r = fmod($x, 1000); if($r > 0) { $w .= ' '; if($r < 100) { $w .= ' '; } $w .= number_to_words($r); } } else { $w .= number_to_words(floor($x/1000000)) .' million'; $r = fmod($x, 1000000); if($r > 0) { $w .= ' '; if($r < 100) { $word .= ' '; } $w .= number_to_words($r); } } } return $w; }
// demonstration
$convertvalue= strtoupper(' '.number_to_words($aaamount).' ');
?> <?php
$host="localhost"; // Host name $username="anshdiam_user"; // Mysql username $password="rb!ans838"; // Mysql password $db_name="anshdiam_sarkmicr_data"; // Database name $tbl_name="new_acc"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");
// Retrieve data from database $sql="SELECT acc_no FROM $tbl_name order by ID"; $result=mysql_query($sql);
// Start looping rows in mysql database. while($rows=mysql_fetch_array($result)){
$accountnew= $rows['acc_no']; // close while loop } $str2 = substr($accountnew, 6); $str2= $str2+1;
$names =$_POST[cname]; $pos1 = substr($names,0, 1);
$villages =$_POST[village]; $pos2 = substr($villages,0, 1);
$posts =$_POST[post]; $pos3 = substr($posts ,0, 1);
$string=$pos1.$pos2.$pos3;
$gencode=sprintf($string.'0000'.$str2); $gencode=strtoupper($gencode);
mysql_close(); ?> <?php ?>" <table width="100%" border="0" bgcolor="#FFFFFF"> <tr> <td ><?php include('header.php'); ?></td> </tr> <tr> <td colspan="2"><table width="100%" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"><?php include('menubar.php'); ?></td> </tr> <tr> <td bgcolor="#6699CC">Welcome <?php echo $login_session; ?></td> <td bgcolor="#6699CC"><a href="logout.php">Logout</a></td> <td bgcolor="#6699CC"><?php echo "Today is " . date("d/m/y") . "<br>";?></td> </tr> </table></td> </tr> <tr> <td colspan="2" align="left">
<td> </td> </tr> <tr> <td colspan="2" align="left">
<script type="text/javascript">
function print1(strid) { if(confirm("Do you want to print?")) { var values = document.getElementById(strid); var printing = window.open('','','left=0,top=20,width=550,height=400,toolbar=0,scrollbars=0,sta?tus=0'); printing.document.write(values.innerHTML); printing.document.close(); printing.focus(); printing.print(); printing.close(); } } </script> <form id="form1" name="form1" method="post" action="">
<?php
$scheme=$_POST[select]; $amt=$_POST[amount]; $plantime=$_POST[plantime]; $ndate=$_POST[jdate];; $nmonth=$_POST[jmonth]; $ptime=$_POST[plantime]; $newyear=$_POST[jyear];
if($plantime>0) { if($plantime==12) { $pt='1'; } if($plantime==24) { $pt='2'; } if($plantime==36) { $pt='3'; } if($plantime==48) { $pt='4'; } if($plantime==60) { $pt='5'; } }
$regdate=$ndate.'/'.$nmonth.'/'.$newyear;
//check rd if($scheme=='RD') { { $ndate=$_POST[jdate]; $nmonth=$_POST[jmonth]; $nyear=$_POST[jyear];
if($scheme=='RD') { { if ($nmonth==12) { $nmonth=1; $nyear=$nyear+1; } else $nmonth=$nmonth+1; } $rdnextdate=$ndate.'/'.$nmonth.'/'.$nyear;
//Generate Maturity Date $newyear=$_POST[jyear]; $gnewyear=''; if($ptime==12) { $gnewyear=$newyear+1; } if($ptime==24) { $gnewyear=$newyear+2; } if($ptime==36) { $gnewyear=$newyear+3; } if($ptime==48) { $gnewyear=$newyear+4; } if($ptime==60) { $gnewyear=$newyear+5; } $rdmdate=$_POST[jdate].'/'. $_POST[jmonth].'/'. $gnewyear; } } //Generate RD Amount
$rate=1; if($plantime>0) { { if($plantime==12) { $rate=5; } else if($plantime==24) { $rate=10; } if($plantime==36) { $rate=15; } if($plantime==48) { $rate=22; } if($plantime==60) { $rate=30; } } $maturityamount=($amt*$plantime); $rdmaturityamount=(($rate*$maturityamount/100)+$maturityamount); }
}
//check FD if($scheme=='II') { { $ndate=$_POST[jdate];; $nmonth=$_POST[jmonth]; $ptime=$_POST[plantime]; $newyear=$_POST[jyear]; $gnewyear='';
if($ptime==12) { $gnewyear=$newyear+1; } if($ptime==24) { $gnewyear=$newyear+2; } if($ptime==36) { $gnewyear=$newyear+3; } if($ptime==48) { $gnewyear=$newyear+4; } if($ptime==60) { $gnewyear=$newyear+5; } $fddate=$_POST[jdate].'/'. $_POST[jmonth].'/'. $gnewyear; } //Generate MIS Amount $amt=$_POST[amount]; $plantime=$_POST[plantime]; $time=$plantime/3; $mamnt=(1+(3/100)); $fdmat=$amt; $fdmaturityamount=$amt*(pow($mamnt,$time)); $fdmaturityamount=intval($fdmaturityamount);
}
//check MIS if($scheme=='III') { { $ndate=$_POST[jdate];; $nmonth=$_POST[jmonth]; $ptime=$_POST[plantime]; $newyear=$_POST[jyear]; $gnewyear='';
if($ptime==12) { $gnewyear=$newyear+1; } if($ptime==24) { $gnewyear=$newyear+2; } if($ptime==36) { $gnewyear=$newyear+3; } if($ptime==48) { $gnewyear=$newyear+4; } if($ptime==60) { $gnewyear=$newyear+5; } $misdate=$_POST[jdate].'/'. $_POST[jmonth].'/'. $gnewyear; } //Generate MIS Amount $amt=$_POST[amount]; $plantime=$_POST[plantime]; $time=$plantime/3; $mismaturityamount=($amt*((1+(3/100))^$time)); }
$mainamount=$fdmaturityamount.$rdmaturityamount.$mismaturityamount; $premiumdate=$rdnextdate; $mdate=$rdmdate.$fddate.$misdate;
?>
<?php $con=mysqli_connect("localhost","anshdiam_user","rb!ans838","anshdiam_sarkmicr_data"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $target = "upload/"; $path = "upload/"; $valid_formats = array("jpg", "png", "gif", "bmp","jpeg"); if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST") { $name = $_FILES['upload']['name']; $size = $_FILES['upload']['size']; if(strlen($name)) { list($txt, $ext) = explode(".", $name); if(in_array($ext,$valid_formats)) { if($size<(1024*1024)) // Image size max 1 MB { $actual_image_name = time().$session_id.".".$ext; $tmp = $_FILES['upload']['tmp_name']; $target = $target.basename($_FILES['upload']['name']); $actual_image_name = $name; //This gets all the other information from the form
$pic=($_FILES['upload']['name']); }}}} $sql = "INSERT INTO dd (accountno,panno,email,qualification,nominee_name,agent_name,agent_code,cname,address,dob,jdate,jmonth,jyear,nominee_age,plantime,phone,occupation,passbookno,nomineerelation,loanamount,paymentmode,fname,receipt,eecode,applicationno,branchname,aadharno,main, processingamount,days,latefees,noofinstallment,photo,details) VALUES ('$_POST[accountno]','$_POST[panno]', '$_POST[email]', '$_POST[qualification]' , '$_POST[nominee_name]', '$_POST[agent_name]','$_POST[agent_code]', '$_POST[cname]', '$_POST[address]', ' $_POST[dob]', '$_POST[jdate]', '$_POST[jmonth]', '$_POST[jyear]', '$_POST[nominee_age]', '$_POST[plantime]', '$_POST[phone]', '$_POST[occupation]', '$_POST[passbookno]', '$_POST[nomineerelation]', '$_POST[loanamount]', '$_POST[paymentmode]','$_POST[fname]', '$_POST[receiptno]','$_POST[eecode]','$_POST[applicationno]','$_POST[branchname]','$_POST[aadharno]','MAIN','$_POST[premium]','$_POST[days]','$_POST[latefees]','$_POST[noofinstallment]','$pic','$_POST[particulars]')"; if(move_uploaded_file($_FILES['upload']['tmp_name'], $path.$actual_image_name)) ; { } if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); }
mysqli_close($con); ?>
<?php // sms $users=$user; $account=$_POST[accountno]; $depositamont=$_POST[loanamount]; $accountname=$_POST[cname]; $message="Welcome%20$accountname%20Your%20Account%20No-%20$account%20balance%20is%20$depositamont%20(ANSH%20DIAMOUND%20GROUP)"; $replacemessage = str_replace(' ', '%20', $message); $mobile= $_POST[phone]; $user = "ROSHANSOFTTECH"; $pass = "ROSHANSOFTTECH."; $mob =$mobile;
// Can come from a database $msg = $replacemessage; $url = "http://login.3way-solutions.com/vendorsms/pushsms.aspx?user=$user&password=$pass&msisdn=$mob&sid=SMSWAY&msg=$msg&fl=0&gwid=2";
$xml = file_get_contents($url);
$getUrl = "http://login.3way-solutions.com/vendorsms/pushsms.aspx?user=$user&password=$pass&msisdn=$mob&sid=RCGSOF&msg=$msg&fl=0&gwid=2"; ;
$curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $getUrl); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json')); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, $user . ":" . $pass); curl_setopt($curl, CURLOPT_HTTPGET, TRUE); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl); $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); $responseBody = json_decode($response); curl_close($curl);
?>
<div id="print2"> <table border="0"> <tr> <td> </td></tr> <tr> <td height="87"><table width="100%" border="1" cellspacing="4" cellpadding="4"> <tr> <td><table width="900" border="0" cellspacing="0" cellpadding="0" > <tr> <td height="77" colspan="4" bgcolor="#FFFFFF"><table width="100%" border="0" bgcolor="#FFFFFF"> <tr> <td height="20" align="right" bgcolor="#FFFFFF">Client Copy</td> </tr> <tr> <td width="940" height="20" align="center"><h2>ANSH DIAMOND GROUP</h2></td> </tr> <tr> <td height="20" align="center">Corporate Office : CP 4/1Vinay Khand, Gomati Nagar Station Road Lucknow (U.P.)</td> </tr> <tr> <td height="20" align="center">MOBILE : 05525-2440130</td> </tr> <tr> <td height="20" align="center">EMAIL : ganeshdiamond@gmail.com</td> </tr> </table> <p> </p></td> </tr> <tr> <td width="154" height="30" align="left" bgcolor="#EBEBEB"><strong>Receipt No</strong></td> <td width="229" height="30" align="left" bgcolor="#EBEBEB"><?php echo $_POST[receiptno] ?></td> <td width="142" height="30" align="left" bgcolor="#EBEBEB"><strong>Print Date</strong></td> <td width="369" height="30" align="left" bgcolor="#EBEBEB"><?php echo $regdate ?></td> </tr> <tr> <td height="30" align="left"><strong>Branch Name</strong></td> <td height="30" align="left"><?php echo $_POST[branchname] ?></td> <td height="30" align="left"><strong>Account No</strong></td> <td height="30" align="left"><?php echo $_POST[accountno] ?></td> </tr> <tr> <td height="30" align="left"><strong>Name</strong></td> <td height="30" align="left"><?php echo $_POST[cname].$_POST[cmidname]. $_POST[csurname] ?></td> <td height="30" align="left">Father Name</td> <td height="30" align="left"><?php echo $_POST[fname] ?></td> </tr> <tr> <td height="30" align="left" valign="top"><strong>Applicant Address</strong></td> <td height="30" colspan="3" align="left" valign="top"><?php echo $_POST[address] ?> </td> <td width="1" align="left"></td> <td width="5" align="left"></td> </tr> <tr> <td height="30" align="left"><strong>Deposit Amount</strong></td> <td height="30" align="left"><?php echo $_POST[loanamount] ?></td> <td height="30" align="left"><strong>Deposit Date</strong></td> <td height="30" align="left"><?php echo $regdate ?></td> </tr> <tr> <td height="30" align="left"><strong>Application No</strong></td> <td height="30" align="left"><?php echo $_POST[applicationno] ?></td> <td height="30" align="left"><strong>Plan Name</strong></td> <td height="30" align="left"><?php echo $_POST[select] ?></td> </tr> <tr> <td height="30" align="left"><strong>Plan Period</strong></td> <td height="30" align="left"><?php echo $_POST[plantime]."Years" ?></td> <td height="30" align="left">Total Installment</td> <td height="30" align="left"><?php echo $_POST[noofinstallment] ?></td> </tr> <tr> <td height="30" align="left">Date of Birth</td> <td height="30" align="left"><?php echo $_POST[dob] ?></td> <td height="30" align="left">Aadhar No</td> <td height="30" align="left"><?php echo $_POST[aadharno] ?></td> </tr> <tr> <td height="30" align="left"><strong>Member Code</strong></td> <td height="30" align="left"><?php echo $_POST[mcode] ?></td> <td height="30" align="left"><strong></strong></td> <td height="30" align="right">Authorised Signatory</td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td height="21"><p> </p> <p> </p> <p> </p></td> </tr> <tr><td><table width="100%" border="1" cellspacing="4" cellpadding="4"> <tr> <td><table width="900" border="0" cellspacing="0" cellpadding="0" > <tr> <td height="77" colspan="4" bgcolor="#FFFFFF"><table width="100%" border="0" bgcolor="#FFFFFF"> <tr> <td height="20" align="right" bgcolor="#FFFFFF">Office Copy</td> </tr> <tr> <td width="940" height="20" align="center"><h2>ANSH DIAMOND GROUP</h2></td> </tr> <tr> <td height="20" align="center">Corporate Office : CP 4/1Vinay Khand, Gomati Nagar Station Road Lucknow (U.P.)</td> </tr> <tr> <td height="20" align="center">MOBILE : 05525-2440130</td> </tr> <tr> <td height="20" align="center">EMAIL : ganeshdiamond@gmail.com</td> </tr> </table> <p> </p></td> </tr> <tr> <td width="154" height="30" align="left" bgcolor="#EBEBEB"><strong>Receipt No</strong></td> <td width="229" height="30" align="left" bgcolor="#EBEBEB"><?php echo $_POST[receiptno] ?></td> <td width="142" height="30" align="left" bgcolor="#EBEBEB"><strong>Print Date</strong></td> <td width="369" height="30" align="left" bgcolor="#EBEBEB"><?php echo $regdate ?></td> </tr> <tr> <td height="30" align="left"><strong>Branch Name</strong></td> <td height="30" align="left"><?php echo $_POST[branchname] ?></td> <td height="30" align="left"><strong>Account No</strong></td> <td height="30" align="left"><?php echo $_POST[accountno] ?></td> </tr> <tr> <td height="30" align="left"><strong>Name</strong></td> <td height="30" align="left"><?php echo $_POST[cname].$_POST[cmidname]. $_POST[csurname] ?></td> <td height="30" align="left">Father Name</td> <td height="30" align="left"><?php echo $_POST[fname] ?></td> </tr> <tr> <td height="30" align="left" valign="top"><strong>Applicant Address</strong></td> <td height="30" colspan="3" align="left" valign="top"><?php echo $_POST[address] ?></td> <td width="1" align="left"></td> <td width="5" align="left"></td> </tr> <tr> <td height="30" align="left"><strong>Deposit Amount</strong></td> <td height="30" align="left"><?php echo $_POST[loanamount] ?></td> <td height="30" align="left"><strong>Deposit Date</strong></td> <td height="30" align="left"><?php echo $regdate ?></td> </tr> <tr> <td height="30" align="left"><strong>Application No</strong></td> <td height="30" align="left"><?php echo $_POST[applicationno] ?></td> <td height="30" align="left"><strong>Plan Name</strong></td> <td height="30" align="left"><?php echo $_POST[select] ?></td> </tr> <tr> <td height="30" align="left"><strong>Plan Period</strong></td> <td height="30" align="left"><?php echo $_POST[plantime]."Years" ?></td> <td height="30" align="left">Total Installment</td> <td height="30" align="left"><?php echo $_POST[noofinstallment] ?></td> </tr> <tr> <td height="30" align="left">Date of Birth</td> <td height="30" align="left"><?php echo $_POST[dob] ?></td> <td height="30" align="left">Aadhar No</td> <td height="30" align="left"><?php echo $_POST[aadharno] ?></td> </tr> <tr> <td height="30" align="left"><strong>Member Code</strong></td> <td height="30" align="left"><?php echo $_POST[mcode] ?></td> <td height="30" align="left"><strong></strong></td> <td height="30" align="right">Authorised Signatory</td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> <tr> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> <td height="30" align="left"> </td> </tr> </table></td> </tr> </table></td> </tr> </table> </div> <br/><br/> <table width="300" border="0" cellspacing="10" cellpadding="10"> <tr> <td><input type="button" name="printbutton" value="Prin table" onclick="return print1('print2')"/> </form></td> <td><form action=""><input type="button" value="New" onclick="window.location.href='ddnewaccount.php';"/> </form> </td> </tr> </table>
</td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"><?php include('footer.php'); ?></td> </tr> </table> </body></center> </html>
|