<?php 

$file 	= './dbc_config/config.xml';

$xmlstr = file_get_contents($file);

$xml 	= simplexml_load_string($xmlstr);

$config	= $xml->xpath('//config');

?>

<?php $curr_lang = get_current_lang(); ?>



      <div class="page-title">

        <div>

          <h1><i class="fa fa-file-o"></i> <?php echo lang_key('dashboard');?> <div class="version">NewsPilot - version : <?php echo $config[0]->version;?></div></h1>

          <h4><?php echo lang_key('overview_stats_more');?></h4>

        </div>

      </div>


    <div class="row">

      <div class="col-md-7">

        <div class="row">

          <div class="col-md-7">

            <div class="row">

              <div class="col-md-12">

                <div class="tile">

                  <p class="title">

                    NewsPilot - Create Your News Site Easily

                  </p>

                  <p>

                    Create and grab News with styles

                  </p>

                  <div class="img img-bottom">

                    <i class="fa fa-desktop"></i>

                  </div>

                </div>

              </div>

            </div>

            

          </div>

          <div class="col-md-5">

            <div class="row">

              <div class="col-md-12 tile-active">

                <div class="tile tile-magenta">

                  <div class="img img-center">

                    <i class="fa fa-desktop"></i>

                  </div>

                  <p class="title text-center">

                    NewsPilot Admin

                  </p>

                </div>

                <div class="tile tile-blue">

                  <p class="title">

                    NewsPilot - Auto News Grabber Admin

                  </p>

                  <p>

                     NewsPilot is the most complete and easy manageable News script. You can create or grab news using RSS feed and post them in different categories.

                  </p>

                  <div class="img img-bottom">

                    <i class="fa fa-desktop"></i>

                  </div>

                </div>

              </div>

            </div>

            

          </div>


        </div>
        
      </div>

      <div class="col-md-5">

        <div class="row">

          <div class="col-md-6">

            <div class="tile tile-orange">

              <div class="img">

                <i class="fa fa-users"></i>

              </div>

              <div class="content">

                <p class="big">

                  <?php 
                  $CI = get_instance();
                  $CI->load->database();
                  $query = $CI->db->get_where('users',array('status'=>1));
                  echo $query->num_rows();
                  ?>

                </p>

                <p class="title">

                  <?php echo lang_key('users') ?>

                </p>

              </div>

            </div>

          </div>

          <div class="col-md-6">

            <div class="tile tile-dark-blue">

              <div class="img">

                <i class="fa fa-bars"></i>

              </div>

              <div class="content">
                <p class="big">
                  <?php
                  $query = $CI->db->get_where('news',array('status'=>1));
                  echo $query->num_rows();
                  ?>
                </p>
                <p class="title">
                  <?php echo lang_key('news');?>
                </p>
              </div>
            </div>
          </div>

          
        </div>
      </div>
    </div>

    <div class="row">
    	<div class="col-md-12">
      		<div class="alert alert-info">
          		برای دریافت اتوماتیک اخبار کد زیر را بر روی کرون جابز کنترل پنل هاست خود تنظیم کنید <br/>
          		php -q <?php echo constant("CRON_PATH").'/index.php';?> 
      		</div>
			
			<?php
			echo base64_decode('PGRpdiBjbGFzcz0iYWxlcnQgYWxlcnQtd2FybmluZyI+DQogICAgICAgICAgCQnYp9uM2YYg2KfYs9qp2LHbjNm+2Kog2KjZhyDYtdmI2LHYqiDYsdin24zar9in2YYg2KfYsiDYs9mI24wg2b7Ysdi024zZhiDYp9iz2qnYsduM2b7YqiDZgdin2LHYs9uMINiz2KfYstuMINmIINio2YfbjNmG2Ycg2LPYp9iy24wg2LTYr9mHINin2LPYqi4g2KjYsdin24wg2K/YsduM2KfZgdiqINm+2LTYqtuM2KjYp9mG24wg2Ygg2YXYt9ix2K0g2qnYsdiv2YYg2LPZiNin2YTYp9iqINmIINmF2LTaqdmE2KfYqiDZhNi32YHYpyDYr9ixINiq2KfZhNin2LEg2q/Zgdiq2q/ZiCDZhdi32LHYrSDaqdmG24zYryA8YnIvPg0KICAgICAgCQk8YnIvPg0KCQkJICAgICAgICA8YSBocmVmPSJodHRwOi8vZm9ydW0ucGVyc2lhbnNjcmlwdC5pci8iIHRhcmdldD0iX2JsYW5rIiBjbGFzcz0iYnRuIGJ0bi1pbmZvIj7Yqtin2YTYp9ixINqv2YHYqtqv2YjbjCDZvtix2LTbjNmGINin2LPaqdix24zZvtiqPC9hPg0KDQoJCQkNCgkJCTwvZGl2Pg==');
			?>
        </div>
    </div>

    <div class="row">
      <div class="col-md-12">
        <a href="http://forum.persianscript.ir/" target="_blank" class="btn btn-info"><?php echo lang_key('see_full_documentation');?></a>
      </div>
    </div> 
<style type="text/css">
  .version{
    font-size: 14px;
    font-style: italic;
    margin:10px 0 0 44px;
  }
</style>
