<!DOCTYPE html>
<html>
<head>
  <title>Proja | سیستم مدیریت پروژه</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <link rel="stylesheet" type="text/css" href="./themes/default/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="./themes/default/css/font-awesome.min.css">
  <link rel="stylesheet" type="text/css" href="./themes/default/css/style.css">
  <link rel="stylesheet" type="text/css" href="./themes/default/css/bootstrap-datepicker.min.css">
  <link rel="shortcut icon" href="./images/proja.png">
  <script src="./themes/default/js/jquery.min.js"></script>
  <script src="./themes/default/js/bootstrap.min.js"></script>
  <script src="./themes/default/tinymce/tinymce.min.js"></script>
  <script src="./themes/default/js/bootstrap-datepicker.min.js"></script>
  <script src="./themes/default/js/bootstrap-datepicker.fa.min.js"></script>
    <script type="text/javascript">
    tinymce.init({
      selector: '.editor',
      directionality : "rtl",
      language: 'fa_IR'

    });
    </script>
  <script src="./themes/default/js/script.js"></script>
  <script>
    function  Sure()
    {
      if(confirm("آیا از حذف این رکورد مطمئن هستید؟"))
        return true;
      else
        return false;
    }

  </script>
</head>
<body>
<?php 
$admin= new ManageAdmins();
$dir=0;
if (isset($_SESSION['projecta_admin'])) {
$session_content = explode(':',$_SESSION['projecta_admin']);
$user=$session_content[0];
$admininfo=$admin->Getinfo("ausername",$user);
$aid=$admininfo['0']['aid'];
$adminTasks_array=$admin->GetAdminTasks($aid);


echo'
  <nav class="navbar navbar-default navbar-fixed-top" >
    <div class="container" >
      <div class="navbar-header flright cflnone">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="./"><img src="./images/brand-logo.png" height="25"></a>
      </div>
      <div id="navbar" class="navbar-collapse collapse ">
        <section class="color-1">
          <nav class="cl-effect-1">
            <ul class="nav navbar-nav cflnone flright">
              '.($admininfo['0']['allow_add_project']==0 && $admininfo['0']['allow_edit_project']==0 && $admininfo['0']['allow_delete_project']==0 && $admininfo['0']['allow_list_projects']==0?'':'
              <li class="dropdown cflnone" style="float:right;">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">پروژه‌ها <i class=" fa fa-arrows-alt" aria-hidden="true">&nbsp;</i><span class="caret"></span></a>
                <ul class="dropdown-menu dropdown-menu-right" style="text-align:right">
                  '.($admininfo['0']['allow_add_project']==0?'':'<li><a href="projects.php?op=add">افزودن پروژه جدید&nbsp;<i class=" fa fa-plus" aria-hidden="true"></i></a></li>').'
                  '.($admininfo['0']['allow_edit_project']==0 && $admininfo['0']['allow_delete_project']==0 && $admininfo['0']['allow_list_projects']==0?'':'<li><a href="projects.php?op=list">لیست و ویرایش پروژه‌ها&nbsp;<i class=" fa fa-list" aria-hidden="true"></i></a></li>').'
                </ul>
              </li><br class="cnone" clear="right">' ).'
              
              '.($admininfo['0']['allow_add_issue']==0 && $admininfo['0']['allow_edit_issue']==0 && $admininfo['0']['allow_delete_issue']==0 && $admininfo['0']['allow_list_issues']==0?'':'
              <li class="dropdown cflnone" style="float:right;">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">مسئله‌ها <i class=" fa fa-quote-right" aria-hidden="true">&nbsp;</i><span class="caret"></span></a>
                <ul class="dropdown-menu dropdown-menu-right">
                  '.($admininfo['0']['allow_add_issue']==0?'':'<li><a href="issues.php?op=add">افزودن مسئله جدید&nbsp;<i class=" fa fa-plus" aria-hidden="true"></i></a></li>').'
                  '.($admininfo['0']['allow_edit_issue']==0 && $admininfo['0']['allow_delete_issue']==0 && $admininfo['0']['allow_list_issues']==0?'':'<li><a href="issues.php?op=list">لیست و ویرایش مسئله‌ها&nbsp;<i class=" fa fa-list" aria-hidden="true"></i></a></li>').'
                </ul>
              </li><br class="cnone" clear="right">' ).'

              '.($admininfo['0']['allow_add_task']==0 && $admininfo['0']['allow_edit_task']==0 && $admininfo['0']['allow_delete_task']==0 && $admininfo['0']['allow_list_tasks']==0 && empty($adminTasks_array)?'':'<li class="dropdown cflnone" style="float:right;">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">ماموریت‌ها <i class=" fa fa-tasks" aria-hidden="true">&nbsp;</i><span class="caret"></span></a>
                  <ul class="dropdown-menu dropdown-menu-right" >
                    '.($admininfo['0']['allow_add_task']==0?'':'<li><a href="tasks.php?op=add">افزودن ماموریت جدید&nbsp;<i class=" fa fa-plus" aria-hidden="true"></i></a></li>').'
                    '.($admininfo['0']['allow_edit_task']==0 && $admininfo['0']['allow_delete_task']==0 && $admininfo['0']['allow_list_tasks']==0 && empty($adminTasks_array)?'':'<li><a href="tasks.php?op=list">لیست و ویرایش ماموریت‌ها&nbsp;<i class=" fa fa-list" aria-hidden="true"></i></a></li>').'
                  </ul>
                </li><br class="cnone" clear="right">' ).'
              
              '.($admininfo['0']['allow_manage_issue_types']==0?'':'<li class="dropdown cflnone" style="float:right;">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">رسته‌ها <i class=" fa fa-slack" aria-hidden="true">&nbsp;</i><span class="caret"></span></a>
                <ul class="dropdown-menu dropdown-menu-right">
                  <li><a href="issue-types.php?op=add">مدیریت رسته‌ها&nbsp;<i class=" fa fa-toggle-on" aria-hidden="true"></i></a></li>
                </ul>
              </li><br class="cnone" clear="right">').'

              '.($admininfo['0']['allow_add_admin']==0 && $admininfo['0']['allow_edit_admin']==0 && $admininfo['0']['allow_delete_admin']==0 && $admininfo['0']['allow_list_admins']==0?'':'<li class="dropdown cflnone" style="float:right;">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">مدیران <i class=" fa fa-user" aria-hidden="true">&nbsp;</i><span class="caret"></span></a>
                  <ul class="dropdown-menu dropdown-menu-right">
                    '.($admininfo['0']['allow_add_admin']==0?'':'<li><a href="admins.php?op=add">افزودن مدیر جدید&nbsp;<i class=" fa fa-plus" aria-hidden="true"></i></a></li>').'
                    '.($admininfo['0']['allow_edit_admin']==0 && $admininfo['0']['allow_delete_admin']==0 && $admininfo['0']['allow_list_admins']==0?'':'<li><a href="admins.php?op=list">لیست و ویرایش مدیران&nbsp;<i class=" fa fa-list" aria-hidden="true"></i></a></li>').'
                  </ul>
                </li><br class="cnone" clear="right">' ).'

            </ul>
            <ul class="nav navbar-nav navbar-right cflleft">
              <li class="dropdown">
                <a href="#"  class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">&nbsp;<i class="fa fa-cog" aria-hidden="true"></i><span class="caret"></span></a>
                <ul class="dropdown-menu dropdown-menu-left" >
                <li><a href="admins.php?op=edit">ویرایش پروفایل&nbsp;<i class=" fa fa-user-circle" aria-hidden="true"></i></a></li>
                <li><a href="logout.php">خروج&nbsp;<i class=" fa fa-sign-out" aria-hidden="true"></i></a></li>
                </ul>
              </li>
            </ul>
          </nav>
        </section>
      </div><!--/.nav-collapse -->
    </div>
  </nav>
';

  echo '    
      <!-- AcssesModal -->
        <div class="modal fade" id="AccessModal" role="dialog">
          <div class="modal-dialog modal-md">
            <div class="modal-content text-right">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" style="float:left;">&times;</button>
                <h4 class="modal-title">sss&nbsp;<i class=" fa fa-lock" aria-hidden="true"></i>
</h4>
              </div>
              <div class="modal-body">

                <p>.sss</p>
              </div>
              <div class="modal-footer" style="text-align:left;">
                <button type="button" class="btn btn-default" data-dismiss="modal">sss</button>
              </div>
            </div>
          </div>
        </div>
';
}

echo'

    <div class="container">

      <!-- Main component for a primary marketing message or call to action -->

      <div id="jumbotron" class="jumbotron '.($_SERVER['REQUEST_URI']== "/login.php" ?'col-lg-6 col-md-6 col-sm-12 col-xs-12 col-md-pull-3 col-lg-pull-3 ' :' col-lg-12 col-md-12 col-sm-12 col-xs-12 rtl').' " >


';

 ?>



