<table id="example-table" class="table table-striped table-bordered table-hover table-green">
                            <thead>
                                <tr>
                                    <th>رقم</th>
                                    <th>اسم  القسم</th>
                                    <th>العنوان</th>
                                    <th>المحتوي</th>
                                    <th>الصوره</th>
                                    <!--<th>تعديل</th>-->
                                    <!--<th> حذف</th>-->
                                </tr>
                            </thead>
                            <tbody>
                                <?php 
$num = 1;
$department = new departement();
$result_set = $department->selectAllDepartInfo($con);
if (mysqli_num_rows($result_set)) {
    while ($all = mysqli_fetch_array($result_set)) {
        ?>
                                        <tr class="odd gradeX">

                                            <td><?php 
        echo $num++;
        ?>
</td>
                                            <td><?php 
        echo $all['depart_name'];
        ?>
</td>
                                            <td><?php 
                    <div class="portlet-title">

                        <h4>إضافة قسم</h4>

                    </div>

                    <div class="portlet-widgets">

                        <a data-toggle="collapse" data-parent="#accordion" href="#basicFormExample"><i class="fa fa-chevron-down"></i></a>

                    </div>

                    <div class="clearfix"></div>
                    <?php 
if (isset($_POST['addDepart'])) {
    $depart_obj = new departement();
    $departement_name = secure_variable($_POST['depart_name']);
    $result = $depart_obj->addDepartment($con, $departement_name);
    if ($result == 'done') {
        echo 'تم الاضافه';
        header("refresh:1;url=showDepartement.php");
    }
}
?>
                </div>



                <div id="basicFormExample" class="panel-collapse collapse in">

                    <div class="portlet-body">
Beispiel #3
0
    <body>
        <div class="header_top">
            <div class="wrap">		
                <div class="logo" style="float: left;">
                    <a href="index.php"><h1><span class="black">الحصري</span> <span class="red">للاثاث</span></h1></a>
                </div>	
                <div class="logo" style="float: right;">
                    <img style="height:90px;width:250px" src="images/logo.png">
                </div>	


                <div class="menu" style="float: left;position: relative;margin-top: 3%">
                    <ul>
                        <li  style="direction: rtl"><a href="index.php">الرئيسيه</a></li>
                        <?php 
$departement = new departement();
$result = $departement->getAllDepartemnt($con);
while ($all = mysqli_fetch_array($result)) {
    //                                var_dump($all);
    ?>
    
                            <li <?php 
    if (isset($_GET['depart']) && $_GET['depart'] != '') {
        if ($all['depart_id'] == $_GET['depart']) {
            echo 'class="active"';
        }
    }
    ?>
 >
                                <a href="gallery.php?depart=<?php 
    echo $all['depart_id'];
                    <div class="portlet-title">

                        <h4>إضافة قسم</h4>

                    </div>

                    <div class="portlet-widgets">

                        <a data-toggle="collapse" data-parent="#accordion" href="#basicFormExample"><i class="fa fa-chevron-down"></i></a>

                    </div>

                    <div class="clearfix"></div>
                    <?php 
if (isset($_POST['updateDepart'])) {
    $depart_obj = new departement();
    $departement_name = secure_variable($_POST['depart_name']);
    $result = $depart_obj->updateDepartement($con, $_GET['depart_id'], $departement_name);
    if ($result == 'done') {
        echo 'تم التعديل';
        header("refresh:1;url=showalldepart.php");
    }
}
?>
                </div>



                <div id="basicFormExample" class="panel-collapse collapse in">

                    <div class="portlet-body">