index.php 3.39 KB
Newer Older
majidbeigi's avatar
majidbeigi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
<?php

	include_once('../../library/config.php');

    $logadmin = new ADMIN();

    if(!$logadmin->logincheck()){

        header('location:../../adminn/login/');

    }

    $err = null;


    if(isset($_POST['delete']))

    {

        $id = $_POST['id'];

        $tmp = new PRODUCT();

        $tmp->deletebrand3($id);

    }
?>

<!DOCTYPE html>

<html>

<head>

        <?php

            include_once($_SERVER['DOCUMENT_ROOT'].SITE.'/library/head.php');               

        ?>

    <script>

        $(function(){

          $("div.holder").jPages({
            containerID : "container",
            perPage:6
              });
            });
    </script>
</head>

<body>

<!-- Base Table -->

<table class="body" cellspacing="0" cellpadding="0" align="center">

    <!-- Head -->

    <?php

        include($_SERVER['DOCUMENT_ROOT'].SITE.'/library/header.php');

    ?>

<tr>

    <!-- Main -->

    <td align="center" >
    <div dir="rtl" id="main" align="center" class="ui-corner-all , ui-widget-content">

        <div align="left" style="padding: 5px;"> <a href="login/logout.php"> LOGOUT </a> </div>

        <?php

            echo $_SESSION['admin_name'];

        ?>

        پنل مدیریت آپشن اضافه شدنی

        <hr />

    <!-- Top Menu -->

    <?php

        include($_SERVER['DOCUMENT_ROOT'].SITE.'/adminn/library/topmenu.php');

    ?>

    <div align="right">
    <span style="font-weight: bold;margin-left: 20px;">
    <a href="adminn/brand3/add.php"> فرم ایجاد آپشن اضافه شدنی </a>
    </span>
    </div>
    <hr />
    <table dir="rtl" border="1" cellpadding="6" cellspacing="0" style="width: 100%px;">
    <thead>
    <tr>
        <td style="width: 200px;background: #C8E0E4;"> نام فارسی </td>
        <td style="width: 200px;background: #C8E0E4;"> نام انگلیسی </td>
        <td style="width: 200px;background: #C8E0E4;"> قیمت </td>
        <td style="width: 150px;background: #C8E0E4;"> کد </td>
        <td style="width: 40px;background: #C8E0E4;"> ویرایش </td>
        <td style="width: 40px;background: #C8E0E4;"> حذف </td>
    </tr>

    </thead>

    <tbody id="container">

    <?php

        $brand3 = new PRODUCT();

        $res = $brand3->loadbrand3();

        $i=0;

        while(isset($res[$i]['id_brand3']) && $res[$i]['id_brand3'] )
        {
            print"<tr><td>".$res[$i]['namef']."</td>";
            print"<td>".$res[$i]['namee']."</td>";
            print"<td>".$res[$i]['price']."</td>";
            print"<td>".$res[$i]['code']."</td>";
            print"<td><a href='adminn/brand3/edit.php?id=".$res[$i]['id_brand3']."'><div class='edit'></div></a></td>";
            print"<td>
                <form method='post' action=''>
                <input type='hidden' value=".$res[$i]['id_brand3']." name='id' />
                <input type='submit' value='' class='delete'  name='delete' onclick=\"return confirm('delete?');\" />
                </form>
                </td></tr>";
            $i++;
        }   
    ?>

    </tbody>

    </table>

    <div dir="ltr" class="holder"></div>

    </div>

    </td>

</tr>

<!-- Footer -->

        <?php

            include($_SERVER['DOCUMENT_ROOT'].SITE.'/library/footer.php');

        ?>

</table>

</body>

</html>