Location: PHPKode > projects > Quick.Cart - free and simple to use shopping cart script > actions/admin-files.php
<?php
$oFile = FilesAdmin::getInstance( );

if( $a == 'list' ){
  if( !isset( $iLinkType ) || !is_numeric( $iLinkType ) )
    $iLinkType = 1;
  
  if( isset( $_POST['sOption'] ) ){
    $oFile->saveFiles( $_POST, $iLinkType );
    $sOption = 'save';
  }

  if( isset( $sOption ) ){
    $content .= $oTpl->tBlock( 'messages.tpl', 'DONE' );
  }
  
  $aLinkTypes = Array( 1 => $lang['Pages'], 2 => $lang['Products'] );
  $sLinkTypeSelect = throwSelectFromArray( $aLinkTypes, $iLinkType );
  
  $content .= $oTpl->tBlock( 'files.tpl', 'LIST_TITLE' );
  $sList = $oFile->listAllFiles( 'files.tpl', $iLinkType );
  $content .= !empty( $sList ) ? $sList : $oTpl->tBlock( 'messages.tpl', 'EMPTY' );
}

$iTypeSearch = ( isset( $iLinkType ) && $iLinkType == 1 ) ? 4 : 5;
?>
Return current item: Quick.Cart - free and simple to use shopping cart script