Your IP : 18.116.27.225


Current Path : /home/lentoinv/churchmr.com/account/
Upload File :
Current File : /home/lentoinv/churchmr.com/account/ini.php

<?php     session_start(); ob_start();
		//error_reporting(0); 
	//@ini_set('display_error', 0);  
	include("../cludes/connect.inc.php");
	
	$y='2018';
	
		
		//FOR YEAR 2017//
/*		 $a=1; 
							while($b<=52){
							
							$b=$a++; 
							
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Sunday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Monday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Tuesday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Wednesday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Thursday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Friday','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year17 (ww,day,yy)
VALUES('$b','Saturday','$y')") or die(mysqli_error());



							}
*/							
							/*		 $a=1; 
							while($b<=364){
							$b=$a++; 
							if($b<32){$m=1; $d=$b;} elseif($b<60){$m=2; $d=$b-31;} elseif($b<91){$m=3; $d=$b-59;} elseif($b<121){$m=4; $d=$b-90;} elseif($b<152){$m=5; $d=$b-120;} elseif($b<182){$m=6; $d=$b-151;} elseif($b<213){$m=7; $d=$b-181;} elseif($b<244){$m=8; $d=$b-212;} elseif($b<274){$m=9; $d=$b-243;} elseif($b<305){$m=10; $d=$b-273;} elseif($b<335){$m=11; $d=$b-304;} elseif($b<366){$m=12; $d=$b-334;}
							
$sql = $db->query("UPDATE year17 SET mm='$m',dd='$d' WHERE sn='$b' ") or die(mysqli_error());
							}

*/
									 $a=373; 
							while($b<=800){
							$b=$a++; 
 	 $que=$db->query("select * FROM year17 WHERE sn = '$b' " )or die(mysqli_error());
					$ro=mysqli_fetch_array($que);
					$sn = $ro['sn'];
					$s=$sn-6;
		/*			
		
					//$mm = $ro['mm'];
					//$yy = $ro['yy'];
					
					
				
if($mm==1){$m='JAN';} elseif($mm==2){$m='FEB';} elseif($mm==3){$m='MAR';} elseif($mm==4){$m='APR';} elseif($mm==5){$m='MAY';} elseif($mm==6){$m='JUN';} elseif($mm==7){$m='JUL';} elseif($mm==8){$m='AUG';} elseif($mm==9){$m='SEP';} elseif($mm==10){$m='OCT';} elseif($mm==11){$m='NOV';} elseif($mm==12){$m='DEC';} 
$date = $dd.'-'.$m.'-'.$yy; */
$sql = $db->query("UPDATE year17 SET sn='$s' WHERE sn='$b' ") or die(mysqli_error());
							}
		
		
		/*
		
				 $a=1; 
							while($b<=364){
							$b=$a++; 
							$c=$b+1;
 $que=$db->query("select * FROM year17 WHERE sn = '$b' " )or die(mysqli_error());
					$ro=mysqli_fetch_array($que);
					$d = substr($ro['day'],0,3);
					$ww = $ro['ww'];
					$w = $ro['w'];
					$mm = $ro['mm'];
					$day = $ro['day'];
		
					
					$sql = $db->query("UPDATE year18 SET day='$day',ww='$ww',w='$w',mm='$mm' WHERE sn='$c' ") or die(mysqli_error());
							}
		*/
		//FOR YEAR 2018//
		/*
	 $a=1; 
							while($b<=52){
							
							$b=$a++; 
							

$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Mon','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Tue','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Wed','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Thu','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Fri','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Sat','$y')") or die(mysqli_error());
$sql = $db->query("INSERT INTO year18 (ww,day,yy)
VALUES('$b','Sun','$y')") or die(mysqli_error());


							}
			*/				
			/*	
		 $a=1; 
							while($b<=364){
							$b=$a++; 
							if($b<32){$m=1; $d=$b;} elseif($b<60){$m=2; $d=$b-31;} elseif($b<91){$m=3; $d=$b-59;} elseif($b<121){$m=4; $d=$b-90;} elseif($b<152){$m=5; $d=$b-120;} elseif($b<182){$m=6; $d=$b-151;} elseif($b<213){$m=7; $d=$b-181;} elseif($b<244){$m=8; $d=$b-212;} elseif($b<274){$m=9; $d=$b-243;} elseif($b<305){$m=10; $d=$b-273;} elseif($b<335){$m=11; $d=$b-304;} elseif($b<366){$m=12; $d=$b-334;}
							
$sqq = $db->query("UPDATE year18 SET mm='$m',dd='$d' WHERE sn='$b' ") or die(mysqli_error());
							} 

								 $a=1; 
							while($b<=364){
							$b=$a++; 
 $que=$db->query("select * FROM year18 WHERE sn = '$b' " )or die(mysqli_error());
					$ro=mysqli_fetch_array($que);
					$dd = $ro['dd'];
					
					
if($dd<8){$w=1;} elseif($dd<15){$w=2;} elseif($dd<22){$w=3;} elseif($dd<29){$w=4;} elseif($dd<31){$w=5;}
$sqs = $db->query("UPDATE year18 SET w='$w' WHERE sn='$b' ") or die(mysqli_error());
							}
	
	
							
	if($sql){ echo 'Operation Successful';}
	*/
	//echo date('D');
	
	?>

?>