Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/icure/
Upload File :
Current File : /var/www/html/mmishra/icure/z.php

<?php

date_default_timezone_set('Asia/Calcutta');

require("config.inc");
include("functions.inc");

dbConnect("icure");
$rs = mysql_query("select * from employees order by emp_no");
while ($o = mysql_fetch_object($rs)) {
    $i++;        
	echo "$i -- " .$o->emp_no. " -- " .$o->emp_name. "\n";
}


/*
$rs = mysql_query("select roll_no,hostel_no,room_no from hostel_rooms order by roll_no");
while ($o = mysql_fetch_object($rs)) {
        $rno = $o->roll_no;
        $hlno = $o->hostel_no;
        $rmno = $o->room_no;
	
	$i++;
        mysql_query("update students set hostel_no='$hlno',room_no=$rmno where roll_no='$rno'");
        
	echo "$i -- $rno -- $hlno -- $rmno\n";
}

$rs = mysql_query("select reg_no,pat_id,dr_id,date(reg_datetime) as reg_dt from registrations order by reg_no");
while ($o = mysql_fetch_object($rs)) {
	$regno = $o->reg_no;
	$drid = $o->dr_id;
	$patid = $o->pat_id;
	$regdt = $o->reg_dt;

	$sr = mysql_query("select * from registrations where reg_no<>$regno and pat_id='$patid' and dr_id='$drid' and reg_datetime like '$regdt%'");
	while ($q = mysql_fetch_object($sr)) {
		echo "$q->reg_no $q->dependent\n";
	}
}

$uid = $_REQUEST["uid"];
$sname = $_REQUEST["sname"];
$pwd = $_REQUEST["pwd"];

require('classes/fpdf.php');

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,"LDAP A/c created for $uid - $sname (pwd: $pwd)");
$pdf->Output();


$rs = mysql_query("select * from TABLE26 order by roll_no");
while ($o = mysql_fetch_object($rs)) {
        $rno = $o->roll_no;
        $dob = $o->dob;

	$dt = date_create($dob);
	$dob1 = date_format($dt, "Y-m-d");

        //mysql_query("update TABLE26 set dob1='$dob1' where roll_no='$rno'");
        mysql_query("update students set dob='$dob1' where roll_no='$rno'");
        echo("update TABLE26 set dob1='$dob1' where roll_no='$rno'\n");
        //mysql_query("update medicationsregistrations set pat_id='$eno2' where pat_id='$eno1'");
}
*/

/*
$rs = mysql_query("select * from employees order by emp_name");
while ($o = mysql_fetch_object($rs)) {
        $i++;
	$eno1 = $o->emp_no;
	$eno2 = $o->e_no;

	mysql_query("update registrations set pat_id='$eno2' where pat_id='$eno1'");
	//mysql_query("update medicationsregistrations set pat_id='$eno2' where pat_id='$eno1'");
        echo "$eno1 --> $eno2\n";
}
*/

//echo previous_month();

//require_once("classes/class.phpmailer.php");
/*
require 'classes/PHPMailerAutoload.php';

        $mail = new PHPMailer();
        //$mail->SetLanguage("en", "classes/language/"); // set language
        $mail->IsHTML(true); // telling the class to use HML format
        $mail->IsSMTP(); // telling the class to use SMTP
        $mail->SMTPDebug = 2; // telling the class to use SMTP
        $mail->Host = "smtp.gmail.com"; // SMTP server
        $mail->Port = 587; // SMTP server
        $mail->SMTPAuth = true; // SMTP authentication
        $mail->SMTPSecure = 'tls'; // SMTP authentication
        $mail->FromName = "AutoMailer";
        $mail->From = "mmishra@iiita.ac.in";
        $mail->AddAddress("mmishra@iiita.ac.in", "mmishra");
        //$mail->AddCC("mmishra@iiita.ac.in", "AutoMailer");
        $mail->Username = "mmishra@iiita.ac.in";
        $mail->Password = "happy@2015";

        $mail->Subject = "Test mail";
        $mail->Body = "This is a test mail";
        $mail->WordWrap = 75;

        if (!$mail->Send()) {
                return $mail->ErrorInfo;
        } else {
                return TRUE;
        }

*/
?>