403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.80
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/cooperative/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/cooperative/reportsellm.php
<?
require_once "config/confiteacher.inc.php";
$teach=$objResult["teachcode"];
$cllass=$objResult["regisroom"];
?>
<?php
// ฟังก์ชั่นสำหรับการแบ่งหน้า NEW MODIFY
function page_navi($before_p,$plus_p,$total,$total_p,$chk_page){      
    global $urlquery_str;   
    $pPrev=$chk_page-1;   
    $pPrev=($pPrev>=0)?$pPrev:0;   
    $pNext=$chk_page+1;   
    $pNext=($pNext>=$total_p)?$total_p-1:$pNext;        
    $lt_page=$total_p-4;   
    if($chk_page>0){     
        echo "<a  href='$urlquery_str"."pages=".intval($pPrev+1)."' class='naviPN'>Prev</a>";   
    }   
    if($total_p>=11){   
        if($chk_page>=4){   
            echo "<a $nClass href='$urlquery_str"."pages=1'>1</a><a class='SpaceC'>. . .</a>";      
        }   
        if($chk_page<4){   
            for($i=0;$i<$total_p;$i++){     
                $nClass=($chk_page==$i)?"class='selectPage'":"";   
                if($i<=4){   
                echo "<a $nClass href='$urlquery_str"."pages=".intval($i+1)."'>".intval($i+1)."</a> ";      
                }   
                if($i==$total_p-1 ){    
                echo "<a class='SpaceC'>. . .</a><a $nClass href='$urlquery_str"."pages=".intval($i+1)."'>".intval($i+1)."</a> ";      
                }          
            }   
        }   
        if($chk_page>=4 && $chk_page<$lt_page){   
            $st_page=$chk_page-3;   
            for($i=1;$i<=5;$i++){   
                $nClass=($chk_page==($st_page+$i))?"class='selectPage'":"";   
                echo "<a $nClass href='$urlquery_str"."pages=".intval($st_page+$i+1)."'>".intval($st_page+$i+1)."</a> ";         
            }   
            for($i=0;$i<$total_p;$i++){     
                if($i==$total_p-1 ){    
                $nClass=($chk_page==$i)?"class='selectPage'":"";   
                echo "<a class='SpaceC'>. . .</a><a $nClass href='$urlquery_str"."pages=".intval($i+1)."'>".intval($i+1)."</a> ";      
                }          
            }                                      
        }      
        if($chk_page>=$lt_page){   
            for($i=0;$i<=4;$i++){   
                $nClass=($chk_page==($lt_page+$i-1))?"class='selectPage'":"";   
                echo "<a $nClass href='$urlquery_str"."pages=".intval($lt_page+$i)."'>".intval($lt_page+$i)."</a> ";      
            }   
        }           
    }else{   
        for($i=0;$i<$total_p;$i++){     
            $nClass=($chk_page==$i)?"class='selectPage'":"";   
            echo "<a href='$urlquery_str"."pages=".intval($i+1)."' $nClass  >".intval($i+1)."</a> ";      
        }          
    }      
    if($chk_page<$total_p-1){   
        echo "<a href='$urlquery_str"."pages=".intval($pNext+1)."'  class='naviPN'>Next</a>";   
    }   
}
?>
 
<!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=tis-620" />
<title> </title>
<style type="text/css">
/* css แบ่งหน้า */
.browse_page{   
    clear:both;   
    margin-left:12px;   
    height:25px;   
    margin-top:5px;   
    display:block;   
}   
.browse_page a,.browse_page a:hover{   
    display:block;   
    width: 2%;
    font-size:14px;   
    float:left;   
    margin:0px 5px;
    border:1px solid #CCCCCC;   
    background-color:#F4F4F4;   
    color:#333333;   
    text-align:center;   
    line-height:22px;   
    font-weight:bold;   
    text-decoration:none;   
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px; 
}   
.browse_page a:hover{   
    border:1px solid #CCCCCC;
    background-color:#999999;
    color:#FFFFFF;   
}   
.browse_page a.selectPage{   
    display:block;   
    width:45px;   
    font-size:14px;   
    float:left;   
    margin-right:2px;   
    border:1px solid #CCCCCC;
    background-color:#999999;
    color:#FFFFFF;   
    text-align:center;   
    line-height:22px;    
    font-weight:bold;   
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px; 
}   
.browse_page a.SpaceC{   
    display:block;   
    width:45px;   
    font-size:14px;   
    float:left;   
    margin-right:2px;   
    border:0px dotted #0A85CB;   
    background-color:#FFFFFF;   
    color:#333333;   
    text-align:center;   
    line-height:22px;   
    font-weight:bold;   
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px; 
}   
.browse_page a.naviPN{   
    width:50px;   
    font-size:12px;   
    display:block;   
/*    width:25px;   */
    float:left;   
    border:1px solid #CCCCCC;
    background-color:#999999;
    color:#FFFFFF;   
    text-align:center;   
    line-height:22px;   
    font-weight:bold;      
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px; 
}  
/* จบ css แบ่งหน้า */
</style>
 
</head>
 
<body>
 
 
<div style="margin:auto;text-align:left;width:900px;">
<!--ส่วนสร้างฟอร์ม สำหรับค้นหา -->

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="00">

<tbody>
  
  <tr>
    <td align="left" >
 <br />
 
        <table width="100%" border="1" cellspacing="0" cellpadding="2" style="border-collapse:collapse;">
        <tr>
        <td width="50" height="20" align="center" bgcolor="#F2F2F2">#</td>
        <td width="50" height="20" bgcolor="#F2F2F2">&nbsp; ปี</td>
		<td width="50" height="20" bgcolor="#F2F2F2">&nbsp; จำนวนขาย.</td>
		<td width="50" height="20" bgcolor="#F2F2F2">&nbsp; จำนวนเงิน</td>
		<td width="50" height="20" bgcolor="#F2F2F2">&nbsp; </td>
		<td width="50" height="20" bgcolor="#F2F2F2">&nbsp; Excel &nbsp;&nbsp;&nbsp;&nbsp;!del! </td>
        </tr>
<?php
        $i=1;
        $q="SELECT * FROM sell where 1 group by yearssell";
        // เงื่อนไขการค้นหา ถ้ามีการส่งค่า ตัวแปร $_GET['keyword'] 
        if(isset($_GET['keyword']) && $_GET['keyword']!=""){
            // ต่อคำสั่ง sql 
            $q.=" AND idstudentb LIKE '%".trim($_GET['keyword'])."%' ";  
        }
        $qr=@mysql_query($q);   
         
        $total=@mysql_num_rows($qr);
        $e_page=5; // กำหนด จำนวนรายการที่แสดงในแต่ละหน้า   
        if(!isset($_GET['pages'])){   
            $_GET['pages']=0;   
        }else{   
            $_GET['pages']=$_GET['pages']-1;
            if($_GET['pages']<0){
                $_GET['pages']=0;   
            }
            $chk_page=$_GET['pages'];     
            $_GET['pages']=$_GET['pages']*$e_page;   
        }   
        $q.=" ORDER BY yearssell asc  LIMIT ".$_GET['pages'].",$e_page";
             
        $qr=@mysql_query($q);   
        if(@mysql_num_rows($qr)>=1){   
            $plus_p=($chk_page*$e_page)+@mysql_num_rows($qr);   
        }else{   
            $plus_p=($chk_page*$e_page);       
        }   
        $total_p=ceil($total/$e_page);   
        $before_p=($chk_page*$e_page)+1;  
        /// END PAGE NAVI ZONE          
         
        while($rs=@mysql_fetch_array($qr)){
       $jornals=$rs['idsell'];
	   $jour_dat=$rs['jour_dat'];
	   $jour_mou=$rs['jour_mou'];
	   $jour_year=$rs['jour_year'];
	   $jour_at=$rs['jour_at'];
	   $Name=$rs['Name'];
	   $idstudentb=$rs['idstudentb'];
	   $sname=$rs['surname'];
	   $cllass=$rs['cllass'];
	   $romm=$rs['room'];
	   $tyb=$rs['tyb'];
	   $share=$rs['pricein'];
	   $class=$rs['yearssell'];
	   $yearsin=$rs['yearssell'];

	   


		


	            $crsql="SELECT count(userbysell) FROM `sell`
				WHERE yearssell = '$class'" ;
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$sumstudent=$dcrd[0];
				$sumallstu+=$sumstudent;
	   


				$crsql="SELECT sum(pricsell) FROM `sell`
				WHERE yearssell = '$class'" ;
				$slr=mysql_query($crsql) or die(mysql_error()."<br>".$crsql);
				$dcrd = mysql_fetch_array($slr);
				$sumsh=$dcrd[0];
				$sumallsumsh+=$sumsh;


				

?>  
  <tr>
    <td width="50" height="20" align="center"><?=(($e_page*$chk_page)+$i)?></td>
    <td width="50"height="20">&nbsp;<a href=reportyears.php?id=<? echo "$class"; ?> target="_blank"><? echo " $yearsin"; ?></td>
	<td width="50" height="20">&nbsp;<? echo "$sumstudent"; ?></td>
	<td width="50" height="20">&nbsp;<? echo "$sumsh"; ?></td>
	<td width="50" height="20">&nbsp;<? echo "$summouny"; ?></td>
	<td width="50" height="20"><a href=excellsell.php?id=<? echo "$class"; ?>>Excel</a>

	
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	
	<a href=delyears.php?id=<? echo "$yearsin"; ?> onClick="return confirm ('คุณต้องการลบข้อมูลนี้? ')">!ลบ!</a>
	
	</td>
  </tr>

<?php $i++; } ?>     
    </table>
     
  
 


</tbody>
 
 
<thead>
<table width="100%" border="1" cellspacing="0" cellpadding="2" style="border-collapse:collapse;">
        <tr>
        <td width="50" height="20" align="center" bgcolor="#F2F2F2"></td>
        <td width="50" height="20" bgcolor="#F2F2F2">&nbsp; รวม</td>
		<td width="50" height="20" bgcolor="#F2F2F2"><? echo "$sumallstu"; ?> </td>
		<td width="50" height="20" bgcolor="#F2F2F2"><? echo "$sumallsumsh"; ?> </td>
		<td width="50" height="20" bgcolor="#F2F2F2"><? echo "$sumallmouny"; ?></td>
		<td width="50"height="20" bgcolor="#F2F2F2">&nbsp; </td>
        </tr>
		</table>
  <tr>
    <td align="left">
     
  
 <div style="margin:auto;width:100%;">
  <?php if($total>10){ ?>                  
  <div class="browse_page">   
    <?php      
    if(count($_GET)<=1){
        $urlquery_str="?";
    }else{
        $para_get="";
        foreach($_GET as $key=>$value){
            if($key!="pages"){
                $para_get.=$key."=".$value."&";
            }
        }
        $urlquery_str="?$para_get";
    }
    // เรียกใช้งานฟังก์ชั่น สำหรับแสดงการแบ่งหน้า      
    page_navi($before_p,$plus_p,$total,$total_p,$chk_page);       
    ?>
    </div>   
    <?php } ?>  
</div>    
     
     
    </td>
  </tr>
  <tr>
  <td height="30" align="left">&nbsp;</td>
  </tr>
</thead>  
 
<tfoot>
  <tr>
  <td height="30">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">
 
 <div style="margin:auto;width:100%;">
     <?php if($total>10){ ?>                  
    <div class="browse_page">   
    <?php      
    // เรียกใช้งานฟังก์ชั่น สำหรับแสดงการแบ่งหน้า      
    page_navi($before_p,$plus_p,$total,$total_p,$chk_page);       
    ?>
    </div>   
    <?php } ?>     
</div>  
     
    </td>
  </tr>
</tfoot>  

</table>
		
</div>
 
 
</body>
</html>


Youez - 2016 - github.com/yon3zu
LinuXploit