Your IP : 3.23.101.241


Current Path : /home/lentoinv/churchmr.com/dclm/
Upload File :
Current File : /home/lentoinv/churchmr.com/dclm/progstable.php

<?php
session_start();
ob_start();
		error_reporting(0); 
	@ini_set('display_error', 0);    include("../cludes/connect.inc.php");
	


/*
$i=1;
while($i<=365){ $e=$i++; 

if($e<=31){$mm = 1; $dd=$e; $month='JAN'; }elseif($e<=59){$mm = 2; $month='FEB';  $dd=$e-31;}elseif($e<=90){$mm = 3; $month='MAR';  $dd=$e-59;}elseif($e<=120){$mm = 4; $month='APR';  $dd=$e-90;}elseif($e<=151){$mm = 5; $month='MAY';  $dd=$e-120;}elseif($e<=181){$mm = 6; $month='JUN';  $dd=$e-151;}elseif($e<=212){$mm = 7; $month='JUL';  $dd=$e-181;}elseif($e<=242){$mm = 8; $month='AUG';  $dd=$e-212;}elseif($e<=273){$mm = 9; $month='SEP';  $dd=$e-242;}elseif($e<=304){$mm = 10; $month='OCT';  $dd=$e-273;}elseif($e<=334){$mm = 11; $month='NOV';  $dd=$e-304;}elseif($e<=365){$mm = 12; $month='DEC';  $dd=$e-334;}


$d = $e%7; 
if($d==1){$day='Mon';}elseif($d==2){$day='Tue';}elseif($d==3){$day='Wed';}elseif($d==4){$day='Thu';}elseif($d==5){$day='Fri';}elseif($d==6){$day='Sat';}elseif($d==0){$day='Sun';} 

if($e<=7){$ww = 1;}elseif($d==0){$ww=$e/7;}elseif(($e/7)<10){$ww=substr(($e/7),0,1)+1;}else{$ww=substr(($e/7),0,2)+1;} 

$sql = $db->query("INSERT INTO progs(snd,dd,ww,w,mm,month,yy,day) VALUES('$e','$dd','$ww','$w','$mm','$month','18','$day') ") or die(mysqli_error());

}		
*/

/*$i=1;
while($i<=365){ $e=$i++; 

if($e<=31){$mm = 1; $dd=$e; $month='JAN'; }elseif($e<=59){$mm = 2; $month='FEB';  $dd=$e-31;}elseif($e<=90){$mm = 3; $month='MAR';  $dd=$e-59;}elseif($e<=120){$mm = 4; $month='APR';  $dd=$e-90;}elseif($e<=151){$mm = 5; $month='MAY';  $dd=$e-120;}elseif($e<=181){$mm = 6; $month='JUN';  $dd=$e-151;}elseif($e<=212){$mm = 7; $month='JUL';  $dd=$e-181;}elseif($e<=242){$mm = 8; $month='AUG';  $dd=$e-212;}elseif($e<=273){$mm = 9; $month='SEP';  $dd=$e-242;}elseif($e<=304){$mm = 10; $month='OCT';  $dd=$e-273;}elseif($e<=334){$mm = 11; $month='NOV';  $dd=$e-304;}elseif($e<=365){$mm = 12; $month='DEC';  $dd=$e-334;}


$d = $e%7; 
if($d==1){$day='Tue';}elseif($d==2){$day='Wed';}elseif($d==3){$day='Thu';}elseif($d==4){$day='Fri';}elseif($d==5){$day='Sat';}elseif($d==6){$day='Sun';}elseif($d==0){$day='Mon';} 

if($e<=6){$ww = 1;}elseif($d==0){$ww=($e/7)+1;}elseif(($e/7)<10){$ww=substr(($e/7),0,1)+1;}else{$ww=substr(($e/7),0,2)+1;} 

$sql = $db->query("INSERT INTO progs(snd,dd,ww,w,mm,month,yy,day) VALUES('$e','$dd','$ww','$w','$mm','$month','19','$day') ") or die(mysqli_error());

}		
*/
/*
$i=1;
while($i<=366){ $e=$i++; 

if($e<=31){$mm = 1; $dd=$e; $month='JAN'; }elseif($e<=60){$mm = 2; $month='FEB';  $dd=$e-31;}elseif($e<=91){$mm = 3; $month='MAR';  $dd=$e-60;}elseif($e<=121){$mm = 4; $month='APR';  $dd=$e-91;}elseif($e<=152){$mm = 5; $month='MAY';  $dd=$e-121;}elseif($e<=182){$mm = 6; $month='JUN';  $dd=$e-152;}elseif($e<=213){$mm = 7; $month='JUL';  $dd=$e-182;}elseif($e<=243){$mm = 8; $month='AUG';  $dd=$e-213;}elseif($e<=274){$mm = 9; $month='SEP';  $dd=$e-243;}elseif($e<=305){$mm = 10; $month='OCT';  $dd=$e-274;}elseif($e<=335){$mm = 11; $month='NOV';  $dd=$e-305;}elseif($e<=366){$mm = 12; $month='DEC';  $dd=$e-335;}


$d = $e%7; 
if($d==1){$day='Wed';}elseif($d==2){$day='Thu';}elseif($d==3){$day='Fri';}elseif($d==4){$day='Sat';}elseif($d==5){$day='Sun';}elseif($d==6){$day='Mon';}elseif($d==0){$day='Tue';} 

$m=$e+2; $n = $m%7; 
if($e<=5){$ww = 1;}elseif($e==6){$ww = 2;}elseif($n==0){$ww=($m/7)+1;}elseif(($m/7)<10){$ww=substr(($m/7),0,1)+1;}else{$ww=substr(($m/7),0,2)+1;} 

$sql = $db->query("INSERT INTO progs(snd,dd,ww,w,mm,month,yy,day) VALUES('$e','$dd','$ww','$w','$mm','$month','20','$day') ") or die(mysqli_error());

}	
*/

//$qu=$db->query("select * FROM progs WHERE day='Mon' " )or die(mysqli_error());
			$i=1097;
while($i<=1252){ $e=$i++; 
$qu=$db->query("SELECT * FROM progs WHERE sn ='$e' " )or die(mysqli_error());
							$ru=mysqli_fetch_array($qu);
							$sn = $ru['sn'];
							$ww = $ru['ww'];
							$dd = $ru['dd'];
							$mm = $ru['mm'];
							$day = $ru['day'];
							$month = $ru['month'];
							$yy = $ru['yy'];
							
$sq=$db->query("SELECT * FROM progs WHERE mm='$mm' AND yy='$yy' AND sn>1096 AND sn<='$sn' " )or die(mysqli_error());
							$w=mysqli_num_rows($sq);
						
							
			$qu=$db->query("UPDATE progs SET w='$w' WHERE sn='$e' " )or die(mysqli_error());					
							}	
/*						$i=1;
while($i<=9){ $e=$i++; 
$n = '0'.$e;}				
							*/
								
								
	//						
							

//	$qu=$db->query("UPDATE progs SET x=1 WHERE day='Sun' OR day='Mon' OR day='Thu' " )or die(mysqli_error());						


	echo 'OPERAtion COMplete';

?>


?>