<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=moderation.page.mnotfind
[END_COT_EXT]
==================== */

defined('COT_CODE') or die('Wrong URL');

if(in_array('portfolio', $moderauth)) {
  require_once cot_incfile('portfolio', 'module');

  $publicportfolio = $db->query("SELECT COUNT(*) FROM $db_portfolio WHERE item_state='0'");
  $publicportfolio = $publicportfolio->fetchColumn();

  $portfolioqueued = $db->query("SELECT COUNT(*) FROM $db_portfolio WHERE item_state='2'");
  $portfolioqueued = $portfolioqueued->fetchColumn();

  $t->assign(array(
  	'ADMIN_HOME_PORTFOLIO_QUEUED_URL' => cot_url('moderation', 'm=portfolio&state=2'),
  	'ADMIN_HOME_PORTFOLIO_PUBLIC_URL' => cot_url('moderation', 'm=portfolio&state=0'),
  	'ADMIN_HOME_PORTFOLIO_QUEUED' => $portfolioqueued,
  	'ADMIN_HOME_PORTFOLIO_PUBLIC' => $publicportfolio,
  ));

  $t->parse('MAIN.LINE_PORTFOLIO');
}