สอบถาม ต้องการลบตารางส่วนของ path way ลบออกยังไงคะ

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

hayatee
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 670
ลงทะเบียนเมื่อ: 19/04/2021 10:01 am

สอบถาม ต้องการลบตารางส่วนของ path way ลบออกยังไงคะ

โพสต์ที่ยังไม่ได้อ่าน โดย hayatee »

ต้องการลบออก ตารางรายการ และคุณจำนวนเงิน ค่ะ
Programming - PHP-1.png
showhome.php

โค้ด: เลือกทั้งหมด

<?php
ob_start();

require_once'conn.php';
include '../head_html.php';
include '../PHP-Pagination-master/Pagination.class.php';
?>

<meta property="og:url"           content="<?php echo ((array_key_exists('HTTPS', $_SERVER) && $_SERVER["HTTPS"] == "on") ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>" />
<meta property="og:type"          content="website" />
<meta property="og:title"         content="<?php echo $lang_des_show;?>" />
<meta property="og:description"   content=" <?php echo $lang_des_show;?> " />
<meta property="og:image"         content="https://www.mindphp.com/images/content/Tool/M-Tax-Calculator.png" />
<meta property="og:image:alt"     content="<?php echo $lang_progrcalculatetax; ?>" />
<meta name="keywords"             content="<?php echo $lang_des_showk;?>" />

<title><?php echo $lang_displaythetax;?></title>
<script type="application/ld+json">
{
        "@context": "http://schema.org",
        "@type": "SoftwareApplication",
        "name": "Tax Calculator",
        "image": "https://www.mindphp.com/images/info/mindphp-logo-v40.png",
        "description": "โปรแกรมคำนวณภาษีหัก ณ ที่จ่าย",
        "operatingSystem": "Windows 7",
        "applicationCategory": "http://schema.org/GameApplication",
        "aggregateRating": {
                  "@type": "AggregateRating",
                 "ratingValue": "4.3",
                 "ratingCount": "31242"
        },
         "offers": {
                 "@type": "Offer",
                 "price": "1.00",
                  "priceCurrency": "USD"
        }
}
</script>


<?php


$page = 1;
if(isset($_GET['page'])){
	$page = $_GET['page'];
}


// ดาต้าเบสที่ปิดไว้ลอง รันหน้าเปล่าๆดูก่อน

$row = 10;
$total_data = "SELECT COUNT(no) FROM $data";
$result_1 = mysqli_query($conn, $total_data);
$total = mysqli_fetch_row($result_1);
$total_data = $total[0];
$Pagination = new Pagination($page,$total_data);
$Pagination->parse();
$start = ($page - 1)* $row;

?>

<?php
include '../header.php';

// if (isset($_GET['no'])) {
//     $sql = "SELECT * FROM $data WHERE no = " . $_GET['no'];
//     $result = mysqli_query($conn, $sql);
//     $fetch = mysqli_fetch_assoc($result);
// }
// 


    $no = $_REQUEST['no'];
        // $sql1 = "SELECT no,name,money,wht,totalwht,tax,total,time,ip 
        //             FROM tools_calculate_payment         
        //         INNER JOIN tools_deduction ON tools_deduction.wht_no = tools_calculate_payment.wht 
        //         where no = '".$no."'";

        $sql = "SELECT * FROM tools_calculate_payment 
        INNER JOIN tools_deduction ON tools_deduction.wht_no = tools_calculate_payment.wht 
            where tools_calculate_payment.no ORDER BY no desc Limit 0,10 ";

                $query1 = $conn->query($sql);
                $result1 = mysqli_fetch_assoc($query1);

?>





<div class="container">
    <!--pathway-->
    <div class="col-md-12">
        <div class="row">
            <div class="btn-group btn-breadcrumb">
                <a href="#" class="btn btn-default"><?php echo $lang_youarehere;?>:</a>
                <a href="https://www.mindphp.com/online-tools/mindphp-tools.html" class="btn btn-default"><?php echo $lang_tools;?></a>
                <a href="index.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_progrcalculatetax;?></a>
                <a href="listhomeloan.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_listtable;?></a>
                
                    <?php
                    $dataname = (isset($fetch['name'])) ? $fetch['name'] : '';
                    $dataprice = (isset($fetch['money'])) ? $fetch['money'] : '';
                    $taxx = (isset($fetch['taxx'])) ? $fetch['taxx'] : '';
                    echo $lang_you."  " . $dataname . $lang_amount."  " . $dataprice ."  ".$lang_baht;
                    ?>
                </a>
            </div>
        </div><br>
    </div>
    <div class="row"> 


 <!--menu-->
        <div class="col-md-4">
            <?php include 'menu_sidebar.php'; ?>
        </div>
        <div class="col-md-8">
            <div class="col-md-12">
                <?php include 'script_facebook.php'; ?>
            </div>
        </div>
        <br>


<!-- //เติม , (คอมมา) -->
<script src="jquerynum/jquery.number.js"></script>
<script type="text/javascript">

			$(function(){
				// Set up the number formatting.
				$('#moneys').number( true, 2 );


				// Get the value of the number for the demo.
				$('#get_number').on('click',function(){

					var val = $('#moneys').val();

					$('#number_container').slideDown('fast');
					$('#the_number').text( val !== '' ? val : '(empty)' );
				});
			});
		</script>




        <div class="col-md-8">
            <form method="post" action="" name="form">
                <div class="panel-group">
                    <div class="panel panel-primary" align="center">
                        <div class="panel-heading"><b><?php echo $lang_progcalcutaxwith;?></b></div>
                        <div class="panel-body">
                            <div class="input-group">
                                <span class="input-group-addon alert-info" id="basic-addon1"><?php echo $lang_name;?></span>
                                <input type="text" required name="name" class="form-control" autocomplete="off" placeholder="<?php echo $lang_enteryourname;?>" value="<?php echo $dataname; ?>">
                            </div><br>
                        <div class="input-group"><span class="input-group-addon alert-info" id="basic-addon1"><?php echo $lang_amount;?></span>
                                <input type="text" id="moneys" required name="price" class="form-control text-right"  placeholder="0.00" value="<?php echo $dataprice; ?>">
                                <span class="input-group-addon alert-info"><?php echo $lang_baht;?> </span>
                            </div><br>
                            <div class="input-group"><span class="text-center" id="basic-addon1"><?php echo $lang_withholdingtax . ":";?></span>

                            <?php 
                                    $sql = "SELECT * FROM tools_deduction"; 
                                    $result = mysqli_query($conn, $sql);   
                            ?>

                            
                                <select name="wht" >
                                    <?php  while ($fetch = mysqli_fetch_array($result)) { ?>
                                        <option value = "<?php echo $fetch['wht_no'] ?>" > <?php echo $fetch['wht_name'] ?> </option>
                                            
                                    <?php } ?>                
                                </select>

                                </div><br>


                                        <input type="submit" name="submit" class="btn btn-success" value="<?php echo $lang_calculate;?>" >
                                        <input type="reset" name="reset" class="btn btn-warning" onclick="window.location = 'index.php?lang=<?php echo $lang; ?>';"><br><br>


                            <?php
                            if (isset($_GET['wht'])) {
                                echo '<input type = "hidden" name = "wht_no" value = "' . $_GET['wht'] . '" />';
                            }
                            if (isset($_POST['submit'])) {

                                $name = $_POST['name'];  //รับชื่อ
                                $numbzz = $_POST['price']; //รับค่าเงินต้น
                                $numbz  =  $numbzz;         //จำนวนเงิน
                                $taxx =  $_POST['wht']; 
                                $numbz= str_replace(',','', $numbz); //ตัดสตริง , ออกเพื่อมาเลชมาคำนวณ
                                $textex = ($numbz * 100 ) /107 ;  //ค่าถอด vat
                                $tex2 = $textex ;


                                date_default_timezone_set("Asia/Bangkok");
                                $datetime = time();
                                $date = date("Y-m-d  H:i:s", time());
                                $ip = $_SERVER["REMOTE_ADDR"];


                                $name2= str_replace("'",'', $name);
                                $sql = "INSERT INTO $data (name,money,wht,totalwht,tax,total,time,ip)"
                                . "VALUES ('$name2','$numbz','$taxx','$tax_percent','$textex','$totaltax','$date','$ip')";
                                mysqli_query($conn, $sql) or die($lang_datacannot);

                                $last_id = mysqli_insert_id($conn);
                                header("location: ../exclude_tax/showhome.php?id=$last_id");
                                exit(0);
                            }
                            
                            ?>
                              <!--ฟังชั้นคำอ่าน -->
                            <?php
                            // function Convert($amount_number)
                            // {
                            //   $amount_number = number_format($amount_number, 2, ".","");
                            //   $pt = strpos($amount_number , ".");
                            //   $number = $fraction = "";
                            //   if ($pt === false)
                            //     $number = $amount_number;
                            //     else
                            //     {
                            //       $number = substr($amount_number, 0, $pt);
                            //       $fraction = substr($amount_number, $pt + 1);
                            //     }
                            //
                            //     $ret = "";
                            //     $baht = ReadNumber ($number);
                            //     if ($baht != "")
                            //     $ret .= $baht . "บาท";
                            //
                            //     $satang = ReadNumber($fraction);
                            //     if ($satang != "")
                            //     $ret .=  $satang . "สตางค์";
                            //     else
                            //     $ret .= "ถ้วน";
                            //     return $ret;
                            //   }
                            //
                            //   function ReadNumber($number)
                            //   {
                            //     $position_call = array("แสน", "หมื่น", "พัน", "ร้อย", "สิบ", "");
                            //     $number_call = array("", "หนึ่ง", "สอง", "สาม", "สี่", "ห้า", "หก", "เจ็ด", "แปด", "เก้า");
                            //     $number = $number + 0;
                            //     $ret = "";
                            //     if ($number == 0) return $ret;
                            //     if ($number > 1000000)
                            //     {
                            //       $ret .= ReadNumber(intval($number / 1000000)) . "ล้าน";
                            //       $number = intval(fmod($number, 1000000));
                            //     }
                            //
                            //     $divider = 100000;
                            //     $pos = 0;
                            //     while($number > 0)
                            //     {
                            //       $d = intval($number / $divider);
                            //       $ret .= (($divider == 10) && ($d == 2)) ? "ยี่" :
                            //       ((($divider == 10) && ($d == 1)) ? "" :
                            //       ((($divider == 1) && ($d == 1) && ($ret != "")) ? "เอ็ด" : $number_call[$d]));
                            //       $ret .= ($d ? $position_call[$pos] : "");
                            //       $number = $number % $divider;
                            //       $divider = $divider / 10;
                            //       $pos++;
                            //     }
                            //     return $ret;
                            //   }
                             
                             ?>

                            <!--แสดงผลตอนกด ดูข้อมูลจากหน้า index -->
                            
                            <div class="row">
                                <h3><?php echo $lang_userinformation;?></h3>
                                <table id="table-listtax" class="table table-striped">
                                    
                                    <tbody>
                                        <tr class="active">
                                                <td width="50%">
                                                    <p><b><?php echo $lang_no;?></b></p>
                                                </td>
                                            <td>
                                                <?php echo $result1['no'] ?>
                                            </td>
                                        </tr>

                                        <tr class="warning">
                                                <td>
                                                    <p><b><?php echo $lang_name;?></b></p>
                                                </td>
                                            <td>
                                                <?php echo $result1['name']; ?>
                                            </td>
                                        </tr>
                                        
                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_amount;?></b></p>
                                            </td>
                                            <td>
                                            <?php echo $result1['money'];?>
                                            </td>
                                        </tr>

                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_withholdingtax;?>%</b></p>
                                            </td>
                                            <td>
                                            
                                            <?php echo ($result1['wht_name']); ?>
                                            </td>
                                        </tr>

                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_totaldeduction;?></b></p>
                                            </td>
                                            <td>
                                            
                                            <?php echo number_format($result1['totalwht'], 2); ?>
                                            </td>
                                        </tr>

                                        <tr class="warning">
                                            <td>
                                                <p><b><?php echo $lang_taxs;?> </b></p>
                                            </td>
                                            <td>
                                            <?php echo number_format($result1['tax'], 2); ?>
                                            </td>
                                        </tr>
                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_interest;?></b></p>
                                            </td>
                                            <td>
                                            <?php echo number_format($result1['total'], 2); ?>
                                            </td>
                                            <tr class="warning">
                                                  <td>
                                                      <p><b><?php echo $lang_textnumder." : "; ?></b></p>
                                                  </td>
                                                  <td>
                                                    <?php $textnum = ($lang == 'th') ? convert($result1['total']) : Currency::bahtEng($result1['total']) ;  ?>
                                                      <?php echo $textnum ; ?>
                                                  </td>
                                              </tr>

                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_activetime;?></b></p>
                                            </td>
                                            <td>
                                                <?php

                                                echo $result1['time'];
                                                ?>
                                            </td>
                                        </tr>
                                        <tr class="active">
                                            <td>
                                                <p><b><?php echo $lang_yoouripis;?></b></p>
                                            </td>
                                            <td>
                                                <?php echo $result1['ip']; ?>
                                            </td>
                                        </tr>

                                    </tbody>
                                </table>
                                

                            </div>
                        </div>
                        <div align="right"><?php echo $lang_vercheckpace." ". $tax; ?>&nbsp;&nbsp;&nbsp; <br>
                        <br></div>
                    </div>
                </div>


            </form>


            




    </div>
    <div class="col-md-12 table-responsive" align="center">
        <h3 align="center"><?php echo $lang_recentinformation;?></h3>
        <table class="table table-striped">
        <thead class="bg-primary" align="center">
          <tr>
              <th>
                  <p align="center"><?php echo $lang_no;?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_name;?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_amount;?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_withholdingtax;?></p>
              </th>

               <th>
                    <p align="center"><?php echo $lang_totaldeduction;?></p>
                </th>
              <th>
                  <p align="center"><?php echo $lang_taxs;?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_interest; ?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_activetime;?></p>
              </th>

              <th>
                  <p align="center"><?php echo $lang_yoouripis;?></p>
              </th>
              <th>
                  <p align="center"><?php echo $lang_showinformation;?></p>
              </th>
          </tr>
                </thead>


            <?php
            $sql = "SELECT * FROM tools_calculate_payment 
                        INNER JOIN tools_deduction ON tools_deduction.wht_no = tools_calculate_payment.wht 
                        where tools_calculate_payment.no ORDER BY no desc Limit 0,10 ";
                    $result2 = mysqli_query($conn, $sql);
                    while ($fetch = mysqli_fetch_assoc($result2)) {


            // $sql = "SELECT * FROM $data ORDER BY no desc Limit 0,10";
            // $result = mysqli_query($conn, $sql);
            // while ($fetch = mysqli_fetch_assoc($result)) {
                ?>

                <tr align="center">
                <td>
                        <?php echo $fetch['no']; ?>
                    </td>
                    <td>
                        <?php echo $fetch['name']; ?>
                    </td>
                    <td>
                        <?php echo number_format($fetch['money'], 2); ?>
                    </td>
                    <td>
                            <?php echo ($fetch['wht_name']); ?>
                        </td>

                        <td>
                            <?php echo number_format($fetch['totalwht'], 2); ?>
                        </td>

                    <td>
                        <?php echo number_format($fetch['tax'], 2); ?>
                    </td>

                    <td>
                        <?php echo number_format($fetch['total'], 2); ?>
                    </td>

                    <td>
                        <?php
                        echo  $fetch['time'];
                        ?>
                    </td>
                    <td>
                        <?php include 'ip.php'; ?>
                    </td>
                    <td>
                        <a href="showhome.php?no=<?php echo $fetch['no']; ?>&lang=<?php echo $lang; ?>">
                            <i class="glyphicon glyphicon-new-window"></i>
                        </a>
                    </td>
                </tr>
                <?php
            }
            ?>
        </table>

        <div class="text-center">
            	<nav aria-label="page navigation">
            		<?php echo $Pagination->parse(); ?>
            	</nav>

            </div>

        <input type="button" class="btn btn-primary" onclick="window.location = 'listhomeloan.php?lang=<?php echo $lang; ?>';" value="<?php echo $lang_seemore;?>">
    </div>

</div>
<?php include '../footer.php'; ?>
menu_sidebar.php

โค้ด: เลือกทั้งหมด

<div id="sidebar" class="well sidebar-nav">
    <?php
    foreach ($menu_sidebar as $names => $value) {
        ?>
        <h5><larger><b><?php echo $names; ?></b></larger></h5>
        <ul class="nav nav-pills nav-stacked">
            <?php
            foreach ($value as $title => $link) {
                echo '<li><a href="'.$link.'">'.$title.'</a></li>';
            }
            ?>
        </ul>
        <?php
        
    }
    ?>
</div>
ภาพประจำตัวสมาชิก
eange08
PHP VIP Members
PHP VIP Members
โพสต์: 16014
ลงทะเบียนเมื่อ: 22/12/2020 10:09 am

Re: สอบถาม ต้องการลบตารางส่วนของ path way ลบออกยังไงคะ

โพสต์ที่ยังไม่ได้อ่าน โดย eange08 »

ให้เอาท่อนนี้ออก จะมีส่วนที่เกินมาจากชื่อโปรแกรมของเรา

โค้ด: เลือกทั้งหมด

<div class="row">
            <div class="btn-group btn-breadcrumb">
                <a href="#" class="btn btn-default"><?php echo $lang_youarehere;?>:</a>
                <a href="https://www.mindphp.com/online-tools/mindphp-tools.html" class="btn btn-default"><?php echo $lang_tools;?></a>
                <a href="index.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_progrcalculatetax;?></a>
                <!--ส่วนที่เกินมา-->
                <a href="listhomeloan.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_listtable;?></a>
                
                    <?php
                    $dataname = (isset($fetch['name'])) ? $fetch['name'] : '';
                    $dataprice = (isset($fetch['money'])) ? $fetch['money'] : '';
                    $taxx = (isset($fetch['taxx'])) ? $fetch['taxx'] : '';
                    echo $lang_you."  " . $dataname . $lang_amount."  " . $dataprice ."  ".$lang_baht;
                    ?>
                </a>
                  <!--ส่วนที่เกินมา-->
            </div>
        </div>
hayatee
PHP Super Hero Member
PHP Super Hero Member
โพสต์: 670
ลงทะเบียนเมื่อ: 19/04/2021 10:01 am

Re: สอบถาม ต้องการลบตารางส่วนของ path way ลบออกยังไงคะ

โพสต์ที่ยังไม่ได้อ่าน โดย hayatee »

eange08 เขียน: 14/06/2021 12:09 pm ให้เอาท่อนนี้ออก จะมีส่วนที่เกินมาจากชื่อโปรแกรมของเรา

โค้ด: เลือกทั้งหมด

<div class="row">
            <div class="btn-group btn-breadcrumb">
                <a href="#" class="btn btn-default"><?php echo $lang_youarehere;?>:</a>
                <a href="https://www.mindphp.com/online-tools/mindphp-tools.html" class="btn btn-default"><?php echo $lang_tools;?></a>
                <a href="index.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_progrcalculatetax;?></a>
                <!--ส่วนที่เกินมา-->
                <a href="listhomeloan.php?lang=<?php echo $lang; ?>" class="btn btn-default"><?php echo $lang_listtable;?></a>
                
                    <?php
                    $dataname = (isset($fetch['name'])) ? $fetch['name'] : '';
                    $dataprice = (isset($fetch['money'])) ? $fetch['money'] : '';
                    $taxx = (isset($fetch['taxx'])) ? $fetch['taxx'] : '';
                    echo $lang_you."  " . $dataname . $lang_amount."  " . $dataprice ."  ".$lang_baht;
                    ?>
                </a>
                  <!--ส่วนที่เกินมา-->
            </div>
        </div>

ได้แล้วค่ะ ขอบคุณค่ะ
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: Google [Bot] และบุคลทั่วไป 44