Jump to content

Getting table info into a new dashboard, but it is not showing some info.


hendrikbez

Recommended Posts

I am trying now for days to add my table info into a new dashboard, but I can not find out why it does  not show.

The light dashboard is working, but the dark one for CORONA-FREE is not display it,  I did add two screenshots. and code for both. I seem not to find where the problem is.

 

The search part is missing and Need it to show

First code is working

<div class="mainpanel">
                    <div class="pageheader">
                        <div class="media">
                           <!-- <div class="pageicon pull-left">
                                <i class="fa fa-th-list"></i>
                            </div>-->
                            <div class="media-body">
                                <ul class="breadcrumb">
                                    <!--<li><a href="#"><i class="glyphicon glyphicon-home"></i></a></li>-->
                                    <!--<li><a href="#">Tables</a></li>
                                    <li>Data Tables</li>-->
                                </ul>
                                <!--<h4>Data Tables</h4>-->
                            </div>
                        </div><!-- media -->
                    </div><!-- pageheader -->
                    
                    <div class="contentpanel">
                    
                        <div class="panel panel-primary-head">
                            <div class="panel-heading">
                                <h4 class="panel-title">Nomics munt inligting Lys</h4>
                                <!-- <p>Searching, ordering, paging etc goodness will be immediately added to the table, as shown in this example.</p>-->
                            </div><!-- panel-heading -->

                            <table id="basicTable" class="table table-striped table-bordered responsive">
                                <thead class="">
                                    <tr>
                                        <th>MUNT ID</th>
										<th>TOTALE MUNTE</th>
										<th>ADRES</th>
										<th>GRAFIEK</th>
										<th>BESTAAN MUNT NOG</th>
                                        <th>SKAKEL</th>
										<th>MUNT SKAKEL</th>
                                        <th>BLOKKETTING</th>
										<th>WAAR</th>
										<th>BEURSIE_NO</th>
										<th>BEURSIE</th>
										<th>GEVERIFIEER</th>
										<th>DATUM GEKOOP</th>
                                        <th>AKSIE</th>
                                    </tr>
                                </thead>

                                <tbody>
                                    <?php


                                        $result = mysqli_query($pdo, " SELECT * FROM nmc_my_munte ORDER BY ID ASC ");
                                        $row = mysqli_fetch_array($result);

                                        do { ?> 
                                            <tr>
                                                <td><?php echo $row["COIN_ID"]; ?></td>
												<td><?php echo $row["TOTAL_COIN"]; ?></td>
												<td><?php echo $row["ADDRESS"]; ?></td>
												<td><?php echo $row["CHART"]; ?></td>
												<td><?php echo $row["DEAD1"]; ?></td>
                                                <td><?php echo $row["LINK"]; ?></td>
												<td><?php echo $row["SITE"]; ?></td>
                                                <td><?php echo $row["BLOCKCHAIN"]; ?></td>
												<td><?php echo $row["WHERE_NOW"]; ?></td>
												<td><?php echo $row["WALLET_NO"]; ?></td>
												<td><?php echo $row["WALLET"]; ?></td>
												<td><?php echo $row["VERIFIED"]; ?></td>
												<td><?php echo $row["CREATED_AT"]; ?></td>
												<td>
                                                    <a href="NMCinligting.php?DELETE_COIN_ID=<?php echo $row["COIN_ID"];
													?>" onclick="return confirm('Is jy seker jy wil <?php echo $row['COIN_ID'];
													?> munt verwyder?')" data-toggle="tooltip" title="Delete" class="delete-row tooltips">
													<img src="css/binncm.png">
													</a>
													
                                                    <a href="NMCverander.php?COIN_ID=<?php echo $row["COIN_ID"]; ?>" >
													<img src="css/editncm.png">
													</a>
                                                </td>
                                            </tr>

                                            <?php 

                                        } while ($row = mysqli_fetch_array($result)); ?>

                                </tbody>
                            </table>
                        </div><!-- panel -->
                        
                    
                        
                        
                        <br />
                        
                        <!-- panel -->
                        
                        <!-- panel -->
                        
                    </div><!-- contentpanel -->
                </div><!-- mainpanel -->
            </div><!-- mainwrapper -->
        </section>
		<script src="js/fontawesome-6.1.2.js?<?php echo time(); ?>" /></script>
         <script src="js/jquery-1.11.1.min.js?<?php echo time(); ?>" /></script>
        <script src="js/jquery-migrate-1.2.1.min.js?<?php echo time(); ?>" /></script>
        <script src="js/bootstrap.min.js?<?php echo time(); ?>" /></script>
        <script src="js/modernizr.min.js?<?php echo time(); ?>" /></script>
        <script src="js/pace.min.js?<?php echo time(); ?>" /></script>
        <script src="js/retina.min.js?<?php echo time(); ?>" /></script>
        <script src="js/jquery.cookies.js?<?php echo time(); ?>" /></script>
        
        <script src="js/jquery.dataTables.min.js?<?php echo time(); ?>" /></script>
        <script src="http://cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.js?<?php echo time(); ?>" /></script>
        <script src="http://cdn.datatables.net/responsive/1.0.1/js/dataTables.responsive.js?<?php echo time(); ?>" /></script>
        <script src="js/select2.min.js?<?php echo time(); ?>" /></script>

        <script src="js/custom.js?<?php echo time(); ?>" /></script>
        <script>
            jQuery(document).ready(function(){
                
                jQuery('#basicTable').DataTable({
                    responsive: true
                });
                
                var shTable = jQuery('#shTable').DataTable({
                    "fnDrawCallback": function(oSettings) {
                        jQuery('#shTable_paginate ul').addClass('pagination-active-dark');
                    },
                    responsive: true
                });
                
                // Show/Hide Columns Dropdown
                jQuery('#shCol').click(function(event){
                    event.stopPropagation();
                });
                
                jQuery('#shCol input').on('click', function() {

                    // Get the column API object
                    var column = shTable.column($(this).val());
 
                    // Toggle the visibility
                    if ($(this).is(':checked'))
                        column.visible(true);
                    else
                        column.visible(false);
                });
                
                var exRowTable = jQuery('#exRowTable').DataTable({
                    responsive: true,
                    "fnDrawCallback": function(oSettings) {
                        jQuery('#exRowTable_paginate ul').addClass('pagination-active-success');
                    },
                    "ajax": "ajax/objects.txt",
                    "columns": [
                        {
                            "class":          'details-control',
                            "orderable":      false,
                            "data":           null,
                            "defaultContent": ''
                        },
                        { "data": "name" },
                        { "data": "position" },
                        { "data": "office" },
                        { "data": "salary" }
                    ],
                    "order": [[1, 'asc']] 
                });
                
                // Add event listener for opening and closing details
                jQuery('#exRowTable tbody').on('click', 'td.details-control', function () {
                    var tr = $(this).closest('tr');
                    var row = exRowTable.row( tr );
             
                    if ( row.child.isShown() ) {
                        // This row is already open - close it
                        row.child.hide();
                        tr.removeClass('shown');
                    }
                    else {
                        // Open this row
                        row.child( format(row.data()) ).show();
                        tr.addClass('shown');
                    }
                });
               
                
                // DataTables Length to Select2
                jQuery('div.dataTables_length select').removeClass('form-control input-sm');
                jQuery('div.dataTables_length select').css({width: '60px'});
                jQuery('div.dataTables_length select').select2({
                    minimumResultsForSearch: -1
                });
    
            });
            
            function format (d) {
                // `d` is the original data object for the row
                return '<table class="table table-bordered nomargin">'+
                    '<tr>'+
                        '<td>Full name:</td>'+
                        '<td>'+d.name+'</td>'+
                    '</tr>'+
                    '<tr>'+
                        '<td>Extension number:</td>'+
                        '<td>'+d.extn+'</td>'+
                    '</tr>'+
                    '<tr>'+
                        '<td>Extra info:</td>'+
                        '<td>And any further details here (images etc)...</td>'+
                    '</tr>'+
                '</table>';
            }
        </script>
        
        
        <script src="js/jquery.validate.min.js?<?php echo time(); ?>" /></script>

        
        
        <script>
            jQuery(document).ready(function(){
              
                // Basic Form
                jQuery("#basicForm").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    }
                });
              
                // Error Message In One Container
                jQuery("#basicForm2").validate({
                    errorLabelContainer: jQuery("#basicForm2 div.errorForm")
                });
              
                // With Checkboxes and Radio Buttons
                
                jQuery('#genderError').attr('for','gender');
                jQuery('#intError').attr('for','int[]');
                
                jQuery("#basicForm3").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    }
                });
                
                jQuery("#basicForm4").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    },
                    ignore: null
                });
                
                // Validation with select boxes
                jQuery("#flowers, #fruits").select2({
                    minimumResultsForSearch: -1
                });
              
            });
        </script>

    </body>
</html>

 

 

Not working

<?php include_once 'header.php'?> 


<?php

    if (isset($_GET['DELETE_COIN_ID'])) {

        $COIN_ID = $_GET['DELETE_COIN_ID'];

        $deleteSql = mysqli_query($pdo,"DELETE FROM nmc_my_munte WHERE COIN_ID = '$COIN_ID' "); 

    }

?>


     <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Corona Admin</title>
    <!-- plugins:css -->
    <link rel="stylesheet" href="../../assets/vendors/mdi/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="../../assets/vendors/css/vendor.bundle.base.css">
    <!-- endinject -->
    <!-- Plugin css for this page -->
    <!-- End plugin css for this page -->
    <!-- inject:css -->
    <!-- endinject -->
    <!-- Layout styles -->
    <link rel="stylesheet" href="../../assets/css/style.css">
	<link rel="stylesheet" href="assets/css1/style.default.css">
    <!-- End layout styles -->
    <link rel="shortcut icon" href="../../assets/images/favicon.png" />
    <!-- End custom js for this page -->
        <div class="main-panel">
			<div class="content-wrapper">
				<div class="row">
					 <div class="card-body py-0 px-0 px-sm-3">
						<div class="row align-items-center">
                                <h4 class="panel-title">Nomics munt inligting Lys</h4>
                            
								<div class="col-lg-12 stretch-card">
									<div class="card">
										<div class="card-body">
											<div class="table-responsive">
												 <table id="basicTable" class="table table-bordered table-contextual">
															
													<thead class="table-info">
														  
															<th>MUNT ID</th>
															<th>TOTALE MUNTE</th>
															<th>ADRES</th>
															<th>GRAFIEK</th>
															<th>BESTAAN MUNT NOG</th>
															<th>SKAKEL</th>
															<th>MUNT SKAKEL</th>
															<th>BLOKKETTING</th>
															<th>WAAR</th>
															<th>BEURSIE_NO</th>
															<th>BEURSIE</th>
															<th>GEVERIFIEER</th>
															<th>DATUM GEKOOP</th>
															<th>AKSIE</th>
														</tr>
													</thead>

												<tbody>
													<?php
													$result = mysqli_query($pdo, " SELECT * FROM nmc_my_munte ORDER BY ID ASC ");
													$row = mysqli_fetch_array($result);

												do { ?> 
													<tr>
														<td><?php echo $row["COIN_ID"]; ?></td>
														<td><?php echo $row["TOTAL_COIN"]; ?></td>
														<td><?php echo $row["ADDRESS"]; ?></td>
														<td><?php echo $row["CHART"]; ?></td>
														<td><?php echo $row["DEAD1"]; ?></td>
														<td><?php echo $row["LINK"]; ?></td>
														<td><?php echo $row["SITE"]; ?></td>
														<td><?php echo $row["BLOCKCHAIN"]; ?></td>
														<td><?php echo $row["WHERE_NOW"]; ?></td>
														<td><?php echo $row["WALLET_NO"]; ?></td>
														<td><?php echo $row["WALLET"]; ?></td>
														<td><?php echo $row["VERIFIED"]; ?></td>
														<td><?php echo $row["CREATED_AT"]; ?></td>
														<td>
															<a href="NMCinligting.php?DELETE_COIN_ID=<?php echo $row["COIN_ID"];
															?>" onclick="return confirm('Is jy seker jy wil <?php echo $row['COIN_ID'];
															?> munt verwyder?')" data-toggle="tooltip" title="Delete" class="delete-row tooltips">
																<img src="css/binncm.png">
															</a>
													
															<a href="NMCverander.php?COIN_ID=<?php echo $row["COIN_ID"]; ?>" >
																<img src="css/editncm.png">
															</a>
														</td>
													</tr>

														<?php 

															} while ($row = mysqli_fetch_array($result)); ?>

												</tbody>
												</table>
												</div>
												</div>
											</div>	
										</div>		
									</div>
								</div>
						</div><!-- panel -->
					</div><!-- contentpanel -->
				</div><!-- mainwrapper -->
			</div>
		</div>	
        </section>
		 <!-- plugins:js -->
    <script src="../../assets/vendors/js/vendor.bundle.base.js"></script>
    <!-- endinject -->
    <!-- Plugin js for this page -->
    <!-- End plugin js for this page -->
    <!-- inject:js -->
    <script src="../../assets/js/off-canvas.js"></script>
    <script src="../../assets/js/hoverable-collapse.js"></script>
    <script src="../../assets/js/misc.js"></script>
    <script src="../../assets/js/settings.js"></script>
    <script src="../../assets/js/todolist.js"></script>
	<script src="../../assets/js/jquery.dataTables.min.js"></script>
	<script src="../../assets/js/Tables.js"></script>
    <!-- endinject -->
	
	<script src="../../assets/js1/fontawesome-6.1.2.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/jquery-1.11.1.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/jquery-migrate-1.2.1.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/bootstrap.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/modernizr.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/pace.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/retina.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/jquery.cookies.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/jquery.dataTables.min.js?<?php echo time(); ?>" /></script>
    <script src="http://cdn.datatables.net/plug-ins/725b2a2115b/integration/bootstrap/3/dataTables.bootstrap.js?<?php echo time(); ?>" /></script>
    <script src="http://cdn.datatables.net/responsive/1.0.1/js/dataTables.responsive.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/select2.min.js?<?php echo time(); ?>" /></script>
    <script src="../../assets/js1/custom.js?<?php echo time(); ?>" /></script>	
	
	
	
	
    <!-- Custom js for this page -->
    <!-- End custom js for this page -->
	
	
	
		
		<script src="assets/js/jquery.dataTables.min.js?"></script>
	
	
             
        
        <script src="js/jquery.validate.min.js?<?php echo time(); ?>" /></script>
		
         <script>
            jQuery(document).ready(function(){
                
                jQuery('#basicTable').DataTable({
                    responsive: true
                });
                
                var shTable = jQuery('#shTable').DataTable({
                    "fnDrawCallback": function(oSettings) {
                        jQuery('#shTable_paginate ul').addClass('pagination-active-dark');
                    },
                    responsive: true
                });
                
                // Show/Hide Columns Dropdown
                jQuery('#shCol').click(function(event){
                    event.stopPropagation();
                });
                
                jQuery('#shCol input').on('click', function() {

                    // Get the column API object
                    var column = shTable.column($(this).val());
 
                    // Toggle the visibility
                    if ($(this).is(':checked'))
                        column.visible(true);
                    else
                        column.visible(false);
                });
                
                var exRowTable = jQuery('#exRowTable').DataTable({
                    responsive: true,
                    "fnDrawCallback": function(oSettings) {
                        jQuery('#exRowTable_paginate ul').addClass('pagination-active-success');
                    },
                    "ajax": "ajax/objects.txt",
                    "columns": [
                        {
                            "class":          'details-control',
                            "orderable":      false,
                            "data":           null,
                            "defaultContent": ''
                        },
                        { "data": "name" },
                        { "data": "position" },
                        { "data": "office" },
                        { "data": "salary" }
                    ],
                    "order": [[1, 'asc']] 
                });
                
                // Add event listener for opening and closing details
                jQuery('#exRowTable tbody').on('click', 'td.details-control', function () {
                    var tr = $(this).closest('tr');
                    var row = exRowTable.row( tr );
             
                    if ( row.child.isShown() ) {
                        // This row is already open - close it
                        row.child.hide();
                        tr.removeClass('shown');
                    }
                    else {
                        // Open this row
                        row.child( format(row.data()) ).show();
                        tr.addClass('shown');
                    }
                });
               
                
                // DataTables Length to Select2
                jQuery('div.dataTables_length select').removeClass('form-control input-sm');
                jQuery('div.dataTables_length select').css({width: '60px'});
                jQuery('div.dataTables_length select').select2({
                    minimumResultsForSearch: -1
                });
    
            });
            
            function format (d) {
                // `d` is the original data object for the row
                return '<table class="table table-bordered nomargin">'+
                    '<tr>'+
                        '<td>Full name:</td>'+
                        '<td>'+d.name+'</td>'+
                    '</tr>'+
                    '<tr>'+
                        '<td>Extension number:</td>'+
                        '<td>'+d.extn+'</td>'+
                    '</tr>'+
                    '<tr>'+
                        '<td>Extra info:</td>'+
                        '<td>And any further details here (images etc)...</td>'+
                    '</tr>'+
                '</table>';
            }
        </script>
        
        
        <script>
            jQuery(document).ready(function(){
              
                // Basic Form
                jQuery("#basicForm").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    }
                });
              
                // Error Message In One Container
                jQuery("#basicForm2").validate({
                    errorLabelContainer: jQuery("#basicForm2 div.errorForm")
                });
              
                // With Checkboxes and Radio Buttons
                
                jQuery('#genderError').attr('for','gender');
                jQuery('#intError').attr('for','int[]');
                
                jQuery("#basicForm3").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    }
                });
                
                jQuery("#basicForm4").validate({
                    highlight: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-success').addClass('has-error');
                    },
                    success: function(element) {
                        jQuery(element).closest('.form-group').removeClass('has-error');
                    },
                    ignore: null
                });
                
                // Validation with select boxes
                jQuery("#flowers, #fruits").select2({
                    minimumResultsForSearch: -1
                });
              
            });
        </script>

    </body>
</html>

 

Screenshot_29.png

Screenshot_27.png

Edited by hendrikbez
Link to comment
Share on other sites

3 minutes ago, mac_gyver said:

changing the styling of a page should only involve changing the css that gets used.

for your problem of not seeing information, what does the 'view source' in the browser show? is the output actually present in the browser?

Do not know if you are talking about this, it does show information, but not the search part

Screenshot_30.png

Link to comment
Share on other sites

the search box is part of the jquery datatables. is the jquery datatable js code loading? are there errors in the browser's developer console? why are you trying to load the jquery datatable js code three times on the page that doesn't work?

i'll restate this more directly, if you have coded a web page properly, to change the styling of that web page, you should only need to change  the css that gets used. if you are editing the rest of the code on the page, you are doing something wrong.

Link to comment
Share on other sites

22 minutes ago, mac_gyver said:

the search box is part of the jquery datatables. is the jquery datatable js code loading? are there errors in the browser's developer console? why are you trying to load the jquery datatable js code three times on the page that doesn't work?

i'll restate this more directly, if you have coded a web page properly, to change the styling of that web page, you should only need to change  the css that gets used. if you are editing the rest of the code on the page, you are doing something wrong.

Thank you, I did look at all of them, and cannot believe I have not see that there are 3 that are the same, it is working now, just have to do some css changes, the only thing is that it show the second last column only the first 3 characters, and then not showing the last column.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.