<?php
// +------------------------------------------------------------------------+
// | PHP Melody version 1.6.7 ( www.phpsugar.com )
// +------------------------------------------------------------------------+
// | PHP Melody IS NOT FREE SOFTWARE
// | If you have downloaded this software from a website other
// | than www.phpsugar.com or if you have received
// | this software from someone who is not a representative of
// | phpSugar, you are involved in an illegal activity.
// | ---
// | In such case, please contact: support@phpsugar.com.
// +------------------------------------------------------------------------+
// | Developed by: phpSugar (www.phpsugar.com) / support@phpsugar.com
// | Copyright: (c) 2004-2011 PhpSugar.com. All rights reserved.
// +------------------------------------------------------------------------+

$showm = '1';
include('header.php');
include_once('syndicate_news.php');
?>
<div id="sub_menu">

</div>
<div id="content">
<table width="100%" border="0" cellspacing="2" cellpadding="5">
  <tr>
    <td width="33%" valign="top">
	<div id="index_getstarted">
	 <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
        <td colspan="2"><h2 class="bh2">Get Started</h2></td>
      </tr>
<?php
if (_MOD_ARTICLE == 1)
{
?>
      <tr>
        <td width="5%"><img src="images/ico_article.png" alt="Add new article" width="16" height="16" /></td>
        <td><a href="article_manager.php?do=new">Add an article</a></td>
      </tr>
<?php
}
?>
      <tr>
        <td width="5%"><img src="images/ico_add.png" alt="Upload new video" width="16" height="16" /></td>
        <td><a href="addvideo.php">Add / upload new video</a></td>
      </tr>
      <tr>
        <td width="5%"><img src="images/ico_embedvideo.gif" alt="Upload new video" width="16" height="16" /></td>
        <td><a href="embedvideo.php">Embed new video</a></td>
      </tr>
      <tr>
        <td width="5%"><img src="src/icons/youtube.gif" alt="" width="16" height="16" /></td>
        <td><a href="import.php">Import from YouTube</a></td>
      </tr>
      <tr>
        <td width="5%"><img src="images/ico_stats.png" alt="Statistics" width="16" height="16" /></td>
        <td><a href="statistics.php">View statistics</a> &mdash; <a href="index.php?forcesync=1">Reset statistics</a></td>
      </tr>
	  <?php
		if(file_exists("db_backup.php"))
		{
			?>
			<tr>
			 <td width="5%"><img src="images/ico_bkup.png" alt="Backup database" width="16" height="16" /></td>
			 <td><a href="db_backup.php?restart=1">Backup database</a></td>
		    </tr>
			<?php
		}	
	  
	  if(file_exists("db_update.php"))
	  {
	  ?>
      <tr>
        <td><img src="images/warning.gif" alt="Update Database" width="16" height="16" border="0" /></td>
        <td><a href="db_update.php">Update Database</a></td>
      </tr>	
	  <?php
	  }	//	if "db_update.php" exists
	?>
    </table>
	</div>
	</td>
    <td width="33%" valign="top">
	 <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
        <td colspan="2"><h2 class="bh2">Quick Stats</h2></td>
      </tr>
      <tr>
        <td width="40%"><strong>Videos</strong>: </td>
        <td width="60%"><?php echo $config['total_videos']; ?>
          <a href="videos.php"><img src="images/go.gif" alt="Gi" width="12" height="7" border="0" /></a></td>
      </tr>
      <tr>
        <td><strong>Pending approval:</strong></td>
        <td><?php echo $total_members = count_entries('pm_temp', '', ''); ?>
          <a href="approve.php"><img src="images/go.gif" alt="Go" width="12" height="7" border="0" /></a></td>
      </tr>
      <tr>
        <td><strong>Reported videos</strong>: </td>
        <td><?php $crps = count_entries('pm_reports', 'r_type', '1'); echo $crps; ?>
            <a href="reports.php">
              <?php if($crps > 0) { echo '<img src="images/warning.gif" alt="Go" width="16" height="16" border="0" />'; } else { echo '<img src="images/go.gif" alt="Go" width="12" height="7" border="0" />';} ?>
            </a> </td>
      </tr>
      <tr>
        <td><strong>Comments</strong>:</td>
        <td><?php echo $total_members = count_entries('pm_comments', '', ''); ?>
          <a href="comments.php"><img src="images/go.gif" alt="Go" width="12" height="7" border="0" /></a></td>
      </tr>
      <tr>
        <td><strong>Members</strong>:</td>
        <td><?php echo $total_members = count_entries('pm_users', '', ''); ?>
          <a href="members.php"><img src="images/go.gif" alt="Go" width="12" height="7" border="0" /></a></td>
      </tr>
	  <tr>
        <td><strong>Articles</strong>:</td>
        <td><?php echo $config['total_articles']; ?>
		<a href="articles.php"><img src="images/go.gif" alt="Go" width="12" height="7" border="0" /></a>
		</td>
      </tr>
	  <tr>
        <td><strong>Pages</strong>:</td>
        <td><?php echo $config['total_pages']; ?>
		<a href="pages.php"><img src="images/go.gif" alt="Go" width="12" height="7" border="0" /></a>
		</td>
      </tr>
    </table>
	</td>
    <td width="33%" align="left" valign="top">
	 <table width="100%" border="0" cellspacing="1" cellpadding="3">
      <tr>
        <td colspan="2"><h2 class="bh2">PHP Melody <?php echo _PM_VERSION; ?></h2></td>
      </tr>
      <tr>
        <td width="38%"><strong>Customer ID</strong>: </td>
        <td width="62%"><?php echo _CUSTOMER_ID; ?>
          <a href="videos.php"></a></td>
      </tr>
      <tr>
        <td><strong>Your Version</strong>: </td>
        <td><?php echo _PM_VERSION; ?></td>
      </tr>
      <tr>
        <td><strong>Latest Version</strong>:</td>
        <td><?php echo cache_this('read_version', 'pm_version'); ?></td>
      </tr>	  
    </table>
	</td>
  </tr>
  
  <tr>
    <td colspan="3">
	<br />
	<h2>Updates</h2>
	<div id="rel_news">
	<?php echo cache_this('get_rss_news', 'home_news'); ?>	</div>	</td>
  </tr>
</table>
</div>
<?php
include('footer.php');
?>