Location: PHPKode > projects > PHP Web FileManager - Similiar to Yahoo! > lib/lib.func.php
<?php

/**
 * Ensure that one checkbox is checked
 */
function isLeastOneCheckBox($frm,$fileCount,&$modList) {
  $result = false;
  for ($i=0;$i<$fileCount;$i++) {
    if (!empty( $frm["checkbox" . $i] )) {
      $modList[$i] = true;
      $result = true;
    } else {
      $modList[$i] = false;
    }
  }
  return $result;
}

function uploadFiles($userfile,&$errormsg,$theFileManager,$locale) {
  $fileCount = count($userfile);
  $isAtLeastOneFileSelected = false;
  for ($j=0;$j<$fileCount;$j++) {
  if ( $userfile["size"][$j] > 0 ) {
    $isAtLeastOneFileSelected = true;
      break;
    }
  }
  if ($isAtLeastOneFileSelected) {
    $errormsg = $theFileManager->uploadFiles($userfile["tmp_name"],$userfile["name"],$userfile["size"]);
  } else {
    $errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_SEL_UPLOAD_FILE_GIVEN);
  }
}

?>
Return current item: PHP Web FileManager - Similiar to Yahoo!