index.php 2.36 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
<?php
    
    include_once('../../library/config.php');


    if(strcmp($_SERVER['SERVER_NAME'],"dentalstock.ir")==0)

    {

        header('location: http://www.dentalstock.ir/adminn/login/');

    }

    $logadmin = new ADMIN();

    if($logadmin->logincheck()){

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

    }

    

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

        {

            $username=$_POST['username'];

            $password=$_POST['password'];



                if( $logadmin->login($username,$password))

                {

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

                }

                else

                {

                   $err=$logadmin ->error;    

                }    

        }

?>

<!DOCTYPE html>

<html>

<head>

        <?php

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

        ?>

</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 id="main" align="center" class="ui-corner-all , ui-widget-content">

        ورود به مدیریت

        

            <?php 

                if(isset($err))

                {

                    echo "<span style='position:absolute;left :50%; color:red;font-size:12px;margin-top:100px;'>".$err."</span>";

                }

            ?>

        <div dir="rtl" style="margin-top: 100px;" >

            <form dir="rtl" method="post" action="" style="padding: 10px;">

            نام کاربری : <input type="text" name="username" style="line-height: 28px; font-size: 14px; outline: none;vertical-align: middle; width: 150px;height: 25px;" />

            <br />

            کلمه عبور : <input type="password" name="password" style="line-height: 28px;font-size: 14px;outline: none;vertical-align: middle;margin-top: 8px; width: 150px;height: 25px;"  />

            <br />

            <input type="submit" name="login" value="ورود" style="font-family: tahoma;margin-left: 50px;margin-top: 3px;"/>

            </form>



        </div>

    </div>

    </td>

</tr>

<!-- Footer -->

        <?php

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

        ?>

</table>

</body>

</html>