Shell File Manager

Current Path : /home/camscanae/public_html/assets/img/images/
Upload File :
Current File : /home/camscanae/public_html/assets/img/images/IP_camera_item.php

<?php
ob_start();
session_start();
$pageTitle = 'Items';
include 'initCategory.php';

// Check If Get Request item Is Numeric & Get Its Integer Value
$itemid = isset($_GET['itemid']) && is_numeric($_GET['itemid']) ? intval($_GET['itemid']) : 0;

// Select All Data Depend On This ID
$stmt = $con->prepare("SELECT * FROM tb1
							
							WHERE 
								id = ?
							AND 
								Approve = Approve");

// Execute Query
$stmt->execute(array($itemid));

$count = $stmt->rowCount();

if ($count > 0) {

    // Fetch The Data
    $item = $stmt->fetch();
?>
    <section id="inner-headline">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <h2 class="pageTitle" style="font-size:27px"><?php echo $item['Name'] ?></h2>
                </div>
            </div>
        </div>
    </section><br>
    <div class="container">
        <div class="row">
            <div class="col-md-3"> <?php
                                    $connection = mysqli_connect("localhost", "root", "", "CamScan FZCO_test_db"); // add db and passs 
                                    $query = "SELECT * FROM tb1 WHERE Approve=1";
                                    $query_run = mysqli_query($connection, $query);
                                    ?>


                <?php
                if (mysqli_num_rows($query_run) > 0) {
                    $fieldcount = mysqli_num_fields($query_run); // لحساب عدد الاعمدة بكل صف
                    while ($row = mysqli_fetch_assoc($query_run)) {
                ?><center>
                            <?php echo '<img src="img/' . $item['Image'] . '" width="250px;" height="250px" alt=" Image Loading..." > ' ?>

                            <div class="block-heading-two">
                                <h3><strong style=" font-size:25px ;color: #007580 ;  ">Downloads</strong></h3>
                            </div>
                        </center>
                        <!-- Accordion starts -->
                        <ul class="collapsible" id="accordionSection" data-collapsible="accordion" style=" font-weight: 500; ">
                            <li>
                                <div class="collapsible-header"><img src="img/datasheet.png" style="  width: 30px; height: 30px "> Data Sheet </div>
                                <div class="collapsible-body">
                                    <p> <a href="dawnlode.php?file=<?php echo $item['DataSheet'] ?>"> Download Data Sheet</a> </p>
                                </div>
                            </li>
                            <li>
                                <div class="collapsible-header"><img src="img/User_ma.png" style="  width: 30px; height: 30px "> User Manual</div>
                                <div class="collapsible-body">
                                    <p> <a href="dawnlode.php?file=<?php echo $item['Manual'] ?>"> Download User Manual</a> </p>
                                </div>
                            </li>
                            <li>
                                <div class="collapsible-header"><img src="img/certificate.png" style="  width: 30px; height: 30px "> Certifications</div>
                                <div class="collapsible-body">
                                    <p> <a href="dawnlode.php?file=<?php echo $item['Certifications'] ?>"> Download Certifications</a> </p>
                                </div>
                            </li>
                        </ul><br><br>

            </div>


            <div class="col-md-9 item-info">
                <style>
                    table {
                        width: 100%;
                        font-family: arial, sans-serif;
                        border-collapse: collapse;
                    }

                    th,
                    td {
                        padding: 8px;
                        text-align: left;
                        border-top: 1px solid #DDDDDD;
                    }

                    tbody tr:nth-child(odd) {
                        background-color: #DDDDDD;
                    }
                </style>
                </head>

                <body>
                    <table>

                        <tbody>
                            <tr>
                                <td><img src="img/question.png" width="22px"> <strong> Type : </strong><?php echo $item['type'] ?></td>
                            </tr>
                            <tr>
                                <td><img src="img/menu.png" width="22px"> <strong> Product category : </strong><?php echo $item['product_category'] ?></td>
                            </tr>
                            <tr>
                                <td><img src="img/model.png" width="22px"><strong> Model : </strong><?php echo $item['model'] ?></td>
                            </tr>
                            <tr>
                                <td><img src="img/calender.png" width="22px"> <strong> Last Update : </strong><?php echo $item['Added_date'] ?></td>
                            </tr>
                        </tbody>
                    </table>
                    <br><br><br>





                    <?php
                        $itemid = isset($_GET['itemid']) && is_numeric($_GET['itemid']) ? intval($_GET['itemid']) : 0;
                        //                echo '<pre>'; print_r($itemid);

                        $connection = mysqli_connect("localhost", "root", "", "CamScan FZCO_test_db");
                        $query = "SELECT * FROM `tb1` AS q
                LEFT JOIN `tb2` AS i ON (
                q.id = i.tb1_id 
                ) WHERE q.id = '" . $itemid . "' ";
                        $query_run = mysqli_query($connection, $query);
                        //                $result = $connection->query($query);
                        //         echo '<pre>'; print_r($query_run);
                        if (mysqli_num_rows($query_run) > 0) {
                            $fieldcount = mysqli_num_fields($query_run);
                            //echo $fieldcount;
                            while ($row = mysqli_fetch_assoc($query_run)) {
                                //                                 echo '<pre>'; print_r($row['f2']);
                                //                        foreach ($row as $product) {
                                //                            echo '<pre>';print_r($product['f2']);
                                //                        }

                    ?>

                            <p style=" font-size:25px ;color: #007580 ;  "><strong> Features <br></p> </strong>

                            <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">

                                <tbody>


                                    <td> <?php echo $row['f1']; ?></td>



                                </tbody>
                            </table>

                            <p style=" font-size:25px ;color: #007580 ;  "><strong> Specifications <br></p> </strong>

                            <!--            <ul class="list-unstyled">-->
                            <table class="table table-striped">
                                <thead>
                                    <tr>
                                        <th scope="col"><?php echo $row['f2']  ?></th>
                                        <th scope="col"><?php echo $row['f3']  ?></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                    for ($i = 2; $i < $fieldcount; $i++) {
                                        if (isset($row['y' . $i]) && $row['y' . $i] != '') {


                                    ?>
                                            <tr style=" font-weight: 500; ">
                                                <td><?php echo $row['y' . $i]  ?></td>
                                                <td><?php echo $row['x' . $i]  ?></td>
                                            </tr>


                                    <?php }
                                    }
                                    ?>
                                </tbody>
                            </table>
                    <?php
                            }
                        }

                    ?>








                    <?php

                        $allItems = getAllFrom('*', 'tb2', 'where Approve = 1', '', 'id');
                        foreach ($allItems as $item) {
                            $connection = mysqli_connect("localhost", "root", "", "CamScan FZCO_test_db");
                            $query = "SELECT * FROM tb2 WHERE id=id";
                            $query_run = mysqli_query($connection, $query);
                    ?> <?php } ?>

                    <?php
                        $itemid = isset($_GET['itemid']) && is_numeric($_GET['itemid']) ? intval($_GET['itemid']) : 0;
                        $stmt = $con->prepare("SELECT * FROM tb2
							
							WHERE 
								tb1_id = ?
							AND 
								Approve = Approve");

                        $stmt->execute(array($itemid));
                        $count = $stmt->rowCount();
                        if ($count > 0) {
                            $item = $stmt->fetch();
                            $fieldcount = mysqli_num_fields($query_run);

                            //     echo '<pre>'; print_r($stmt);


                            //     foreach ($item as $product) {
                            ////         echo '<pre>'; print_r($product['f2']);
                            //
                            //
                            //
                            //        
                    ?>
                        <!---->
                        <!--         <p style=" font-size:25px ;color: #007580 ;  " ><strong> Features <br></p> </strong>-->
                        <!---->
                        <!--         <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">-->
                        <!---->
                        <!--             <tbody>-->
                        <!---->
                        <!---->
                        <!--             <td> --><?php //echo $product['f1'];
                                                    ?><!--</td>-->
                        <!---->
                        <!---->
                        <!---->
                        <!--             </tbody>-->
                        <!--         </table>-->
                        <!---->
                        <!---->
                        <!---->
                        <!---->
                        <!--        <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">-->
                        <!--            <thead>-->
                        <!--            <tr>-->
                        <!--                <th scope="col" >--><?php //echo $product['f2']  
                                                                ?><!--</th>-->
                        <!--                <th scope="col" >--><?php // echo $product['f3']  
                                                                ?><!--</th>-->
                        <!--            </tr>-->
                        <!--            </thead>-->
                        <!--        <tbody>-->
                        <!--        --><?php
                                        //        for ($i=2;$i<$fieldcount;$i++){
                                        //            if (isset($product['y'.$i]) && $product['y'.$i]!=''){
                                        //
                                        //
                                        //                
                                        ?>
                        <!--                <tr style=" font-weight: 500; " >-->
                        <!--                    <td>--><?php //echo $product['y'.$i]  
                                                        ?><!--</td>-->
                        <!--                    <td>--><?php // echo $product['x'.$i]  
                                                        ?><!--</td>-->
                        <!--                </tr>-->
                        <!---->
                        <!---->
                        <!--            --><?php //}
                                            //        }
                                            //        
                                            ?>
                        <!--        </tbody>-->
                        <!--        </table>-->
                        <!--        --><?php
                                        //        }
                                        //
                                        //
                                        //        
                                        ?>









                        <?php
                            $connection = mysqli_connect("localhost", "root", "", "CamScan FZCO_test_db");
                            $query = "SELECT * FROM tb2 WHERE Approve=1 And tb1_id=tb1_id";
                            $query_run = mysqli_query($connection, $query);
                        ?>


                        <?php
                            if (mysqli_num_rows($query_run) > 0) {
                                $fieldcount = mysqli_num_fields($query_run); // لحساب عدد الاعمدة بكل صف
                                while ($row = mysqli_fetch_assoc($query_run)) {
                        ?>


                                <p style=" font-size:25px ;color: #007580 ;  "><strong> Features <br></p> </strong>

                                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">

                                    <tbody>


                                        <td> <?php echo $item['f1']; ?></td>



                                    </tbody>
                                </table>

                                <p style=" font-size:25px ;color: #007580 ;  "><strong> Specifications <br></p> </strong>

                                <ul class="list-unstyled">
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th scope="col"><?php echo $item['f2']  ?></th>
                                                <th scope="col"><?php echo $item['f3']  ?></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
                                            for ($i = 2; $i < $fieldcount; $i++) {
                                                if (isset($item['y' . $i]) && $item['y' . $i] != '') {


                                            ?>
                                                    <tr style=" font-weight: 500; ">
                                                        <td><?php echo $item['y' . $i]  ?></td>
                                                        <td><?php echo $item['x' . $i]  ?></td>
                                                    </tr>


                                            <?php }
                                            }
                                            ?>
                                        </tbody>
                                    </table>







            </div>
        </div>
    </div>
<?php
                                }
                            }
                        }
?>











</div>
</div>
</div>
<?php
                    }
                }
            }
?>


</ul>







<?php include 'footer.php' ?>
</div>
<a href="#" class="scrollup waves-effect waves-dark"><i class="fa fa-angle-up active"></i></a>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/jquery.easing.1.3.js"></script>
<script src="materialize/js/materialize.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.fancybox.pack.js"></script>
<script src="assets/js/jquery.fancybox-media.js"></script>
<script src="assets/js/jquery.flexslider.js"></script>
<script src="assets/js/animate.js"></script>
<script src="assets/js/modernizr.custom.js"></script>
<script src="assets/js/jquery.isotope.min.js"></script>
<script src="assets/js/jquery.magnific-popup.min.js"></script>
<script src="assets/js/animate.js"></script>
<script src="assets/js/custom.js"></script>
</body>

</html>

Shell File Manager Version 1.1, Coded By Shell
Email: [email protected]