|  |  | 
          
            | รบกวนพี่ ๆ หน่อยครับ 
 คือผมต้องการ เพิ่ม หรือ ลบ ตารางการแสดงรูปภาพจากหน้าเว็บ อัตโนมัติ ครับ
 
 โดยจะมีปุ่มกดเพิ่ม หรือลบ ตารางนั้น ๆ
 
 แบบในรูปอ่าครับ มันเป็นหน้าเว็บที่เขียนกับ php แล้วผมต้องการจะเกิดเพิ่ม ดดยมีปุ่มอยู่
 
 
  
 Code
 
 <?php 
	$allowed_types = array('jpg','jpeg','gif','png','bmg');
	$Client_01 = array();$Client_02 = array();$Client_03 = array();
	$Parts_01 = array(); $Parts_02 = array(); $Parts_03 = array();
	$Count_01 = 0;		$Count_02 = 0;		$Count_03 = 0;
	$directory = array('Client_01/','Client_02/','Client_03/');
	foreach (scandir($directory[0]) as $key => $value)
	{
		if($key>1)
		{
			if ($value !=='.' and $value !=='..' and $value !=='_notes')
			{
				$file_parts = explode('.',$value);
				$exit = strtolower(array_pop($file_parts));
				
				if(in_array($exit,$allowed_types))
				{$Count_01++;$Client_01[] = $directory[0].$value;
				 $Parts_01 = $file_parts;
				}
			}
		}
	}
	
	foreach (scandir($directory[1]) as $key => $value)
	{
		if($key>1)
		{
			if ($value !=='.' and $value !=='..' and $value !=='_notes')
			{
				$file_parts = explode('.',$value);
				$exit = strtolower(array_pop($file_parts));
				
				if(in_array($exit,$allowed_types))
				{$Count_02++;$Client_02[] = $directory[1].$value;
				 $Parts_02 = $file_parts;
				}
			}
		}
	}
	
	foreach (scandir($directory[2]) as $key => $value)
	{
		if($key>1)
		{
			if ($value !=='.' and $value !=='..' and $value !=='_notes')
			{
				$file_parts = explode('.',$value);
				$exit = strtolower(array_pop($file_parts));
				
				if(in_array($exit,$allowed_types))
				{$Count_03++;$Client_03[] = $directory[2].$value;
				 $Parts_03 = $file_parts;
				}
			}
		}
	}
?>
<html>
<head>
<title>Wellcome to Raspberry Pi Systems</title>
<?php require_once ("option-systems.php");?>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js/jquery.malsup.All.js"></script>
<script type="text/javascript">
$('#slider').cycle({ 
    fx:     'scrollHorz', 
    speed:  'slow', 
    next:   '#next', 
    prev:   '#prev' 
});
</script>
</head>
<body>
<?php require_once ("Head-Menu.php");?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="img/website.jpg">
  <tr>
    <td width="15%"><div class="controller" id="prev"></div></td>
    <td width="70%" align="center" valign="top" id="wrapper">
      <div id="container">
		<div id="slider">
			<img src="img/Hydrangeas.jpg" width="100%" height="100%" />
            <img src="img/Jellyfish.jpg" width="100%" height="100%" />
            <img src="img/Lighthouse.jpg" width="100%" height="100%" />
        </div>
	  </div>
    </div></td>
    <td width="15%"><div class="controller" id="next"></div></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="img/website2.jpg">
  <tr>
    <td><div align="center">
      <table width="80%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center">
          <td width="33.33%"><div align="center">
          		<table width="170px" hight="150px" border="1" align="center" cellpadding="0" cellspacing="0">
        			<tr>
						<td><div align="center" class="fornbody">Raspberry Pi Client 01</div></td>
					</tr>
					<tr>
    					<td width="170" height="150"><div align="center"><a href="Client-01.php"><?php echo "<img style='width:100px;' src='".$Client_01[$Count_01-1]."'/>";?></a></div></td>
					</tr>
					<tr>
    					<td><div align="center" class="fornbody"><?php echo $Parts_01[0];?></div></td>
					</tr>
				</table>
    			<br>
    			<table width="100%" border="0" cellspacing="0" cellpadding="0">
  					<tr>
    					<td><div align="center" class="fornbody">ข้อความแสดงรายละเอียดพื้นที่ที่ติดตั้งอุปกรณ์</div></td>
  					</tr>
				</table></div></td>
                
			<td width="33.33%"><div align="center">
          		<table width="170px" hight="150px" border="1" align="center" cellpadding="0" cellspacing="0">
        			<tr>
						<td><div align="center" class="fornbody">Raspberry Pi Client 02</div></td>
					</tr>
					<tr>
    					<td width="170" height="150"><div align="center"><a href="Client-02.php"><?php echo "<img style='width:100px;' src='".$Client_02[$Count_02-1]."'/>";?></a></div></td>
					</tr>
					<tr>
    					<td><div align="center" class="fornbody"><?php echo $Parts_02[0];?></div></td>
					</tr>
				</table>
    			<br>
    			<table width="100%" border="0" cellspacing="0" cellpadding="0">
  					<tr>
    					<td><div align="center" class="fornbody">ข้อความแสดงรายละเอียดพื้นที่ที่ติดตั้งอุปกรณ์</div></td>
  					</tr>
				</table></div></td>
                
			<td width="33.33%"><div align="center">
          		<table width="170px" hight="150px" border="1" align="center" cellpadding="0" cellspacing="0">
        			<tr>
						<td><div align="center" class="fornbody">Raspberry Pi Client 03</div></td>
					</tr>
					<tr>
    					<td width="170" height="150"><div align="center"><a href="Client-03.php"><?php echo "<img style='width:100px;' src='".$Client_03[$Count_03-1]."'/>";?></a></div></td>
					</tr>
					<tr>
    					<td><div align="center" class="fornbody"><?php echo $Parts_03[0];?></div></td>
					</tr>
				</table>
    			<br>
    			<table width="100%" border="0" cellspacing="0" cellpadding="0">
  					<tr>
    					<td><div align="center" class="fornbody">ข้อความแสดงรายละเอียดพื้นที่ที่ติดตั้งอุปกรณ์</div></td>
  					</tr>
				</table></div></td>
          </div></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>
<br>
    <?php require_once ("Bottom-page.php"); ?>
</body>
</html>
 
 
 Tag : Web Service
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2016-10-12 21:59:36 | By :
                          Akitokung28783 | View :
                          1068 | Reply :
                          1 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |