function printDocsMenuList(){
$client = getAuthSubHttpClient();
$docs = new Zend_Gdata_Docs($client);
$feed = $docs->getDocumentListFeed();
?>
<table align = "center">
<tr><td style = "border-bottom: 1px gray dotted;" colspan = 6><font
color = "blue" size = 5>Google Docs Sharing</font></td></tr>
<?php
foreach ($feed->entries as $entry) {
// Find the URL of the HTML view of the document.
$alternateLink = '';
foreach ($entry->link as $link) {
if ($link->getRel() === 'alternate') {
$alternateLink = $link->getHref();
}
}
// Make the title link to the document on docs.google.com.
// Upload link appended with Doc id
$docID = $entry->id;
//echo $docID;
preg_match('/.*\/(.*)\%3A(.*)/s',$docID,$match);
$pureId = $match[2];
$format = $match[1];
$authKey = $feed->withKey();
echo $authKey;
$downloadLink = "";
// File Format mapping
if($format == "presentation"){
$format = "ppt";
$downloadLink =
"https://docs.google.com/feeds/download/presentations/Export?docID=".$pureId."&exportFormat=".$format."&format=".$format;
}
else if($format == "spreadsheet"){
$format = "xls";
$downloadLink =
"https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=".$pureId."&exportFormat=".$format."&format=".$format."&gid=0";
}
else if($format == "document"){
$format = "doc";
$downloadLink =
"https://docs.google.com/feeds/download/documents/Export?docID=".$pureId."&exportFormat=".$format."&format=".$format;
}