<?phprequire("includes/check_auth_user.php");require("includes/dbconnect.php");include('includes/function.php');$mdate = date("d-m_H-i-s");$zdb = $_SESSION["zdbyear_" . $dbname];$zyear = right($zdb, 4);$finyear = $zyear;mysql_connect("localhost", "cepheisy_cepheis", "rajF@1998") or die(mysqli_error($conn));mysqli_select_db($conn, "cepheisy_arsexp_root") or die(mysqli_error($conn)) ;$fname1 = "cepheisy_arsexp_root.sql";$cmd1 = "mysqldump -ucepheisy_cepheis -prajF@1998 arsexp_root > $fname1";exec($cmd1);$fname2 = "arsexp" . $finyear . ".sql";$data   = "arsexp_" . $finyear;$cmd2 = "mysqldump -ucepheisy_cepheis -prajF@1998 $data > $fname3";exec($cmd2);exec("zip -r $zipfile $fname1 $fname2");echo $zipfile;include("libmail.php");$m = new Mail; // create the mail//$m->From("backup@cepheisys.com");$m->From("backup@cepheisys.com");$m->To("rajcomputers@hotmail.com");$m->Subject("Auto Generated Backup " . $mdate);$m->Body("This is auto generated backup for ARSEXP system. Please save it to your hard disk"); // set the body$m->Cc("miteshgohil75@yahoo.com");//$m->Bcc("rajcomputers@hotmail.com");$m->Priority(1); // set the priority to Low$m->Attach($zipfile, "application/x-zip-compressed", "attachment"); // attach a file of type image/gif to be displayed in the message if possible$m->Send(); // send the mail//var_dump($m->Get());unlink($fname1);unlink($fname2);unlink($zipfile);echo 'BACKUP SUCESSFULLY DONE, CHECK YOUR MAIL';?>