You are here

function filedepot_getSubmissionCnt in filedepot 7

Same name and namespace in other branches
  1. 6 lib-common.php \filedepot_getSubmissionCnt()
1 call to filedepot_getSubmissionCnt()
filedepotAjaxServer_generateLeftSideNavigation in ./lib-ajaxserver.php
Generate Left Side Navigation code which is used to create the YUI menu's in the AJAX handler javascript.

File

./lib-common.php, line 279
lib-common.php Common library of functions for the applications

Code

function filedepot_getSubmissionCnt() {
  $filedepot = filedepot_filedepot();

  // Determine if this user has any submitted files that they can approve
  $query = db_query("SELECT cid from {filedepot_filesubmissions}");
  $submissions = 0;
  while ($A = $query
    ->fetchAssoc()) {
    if ($filedepot
      ->checkPermission($A['cid'], 'approval')) {
      $submissions++;
    }
  }
  return $submissions;
}