'MailshellSession')); if (isset($imp) && is_object($imp)) $imp->unpickle(); ////////////////////// end of common stuff for Horde/IMP setup.... include './mail/client/dbconnect.inc'; include ('/home/httpd/html/mail/client/templates/categoryURL_func.inc'); //require ('./mail/client/templates/categoryPageFunctions.inc'); include ('/home/httpd/html/mail/client/templates/getSQLSortDir_func.inc'); include('/home/httpd/html/gz_mysql.inc'); include('./gz_genGzAds.inc'); include('./gz_popular.inc'); include ('/home/httpd/html/mail/client/templates/categoryComplexTable.inc'); $default->include_dir = './mail/client/templates'; // sort options $sortbyoptions = "relevance:pick rating:popularity rank:date added:topics:author:list name:frequency:email type"; // Insert current parameters as hidden fields. Used to // pass parameters when sorting columns of results. function getParamsAsHiddenFields() { global $category, $pid; $buffer = ''; $buffer = ''; return $buffer; } // NEEDSWORK - should be cleaned up. These variable initializations are // required for rendering complexdatatable. $adstable = $resourcetable; $authtable = $authortable; $tableGenerator = new complexTableGenerator('/viewuserpick.html'); $tableGenerator->checkParams(); // Connect to the machine containing User Picks data $databasehost = USERPICKSHOST; $result = dbconnect(); if (!$result) { // unable to display user picks at this time. $title = "($MAILSHELL_TITLE_TEXT)"; // set title of the HTML page. include "$default->include_dir/doctype.inc"; $page_heading = 'User Picks'; $isOffersPage = true; include "$default->include_dir/generic-header.inc"; displayErrorToUser('Sorry, our system is undergoing some maintenance. User Picks are not available at this time. Please try again later.'); // restore connection unset($databasehost); dbconnect(); include "$default->include_dir/generic-footer.inc"; exit; } // Try to look up the user pick if (isset($pid)) { /// --- needed for complex data table generation $dbsql = new tDB_MySQL($databasehost, $dbuser, $dbpassword, $dbname); $dbsql->pconnect(); // calculate total number of lists. This is used to identify // what are popular and picks.. top 10% $dbsql->query("SELECT numres FROM category WHERE name='top'"); $dbsql->next_record(); $TOTAL_RESOURCES = $dbsql->fld(0); /// end of needed for complex data table generation // Now retrieve information about the User Picks List. // $query = "SELECT guid, userdisplayname,title, description,rating, UNIX_TIMESTAMP(created),resources,public FROM $userpickstable WHERE pid ='" . addslashes($pid) . "'"; // $query = "SELECT u.guid, u.userdisplayname, u.title, u.description, u.rating, UNIX_TIMESTAMP(u.created),u.resources,u.public, s.sponsorLogo, s.url, s.name FROM $userpickstable u LEFT JOIN sponsor s ON u.sponsorid=s.id WHERE pid ='" . addslashes($pid) . "'"; $query = "SELECT guid, userdisplayname,title, description,rating, UNIX_TIMESTAMP(created),resources,public,sponsorLogo,sponsorURL,sponsorTag FROM $userpickstable WHERE pid ='" . addslashes($pid) . "'"; // print "query is $query
"; $result = @mysql_query($query); if ($result && $row = @mysql_fetch_row($result)) { $listguid = $row[0]; if (isset($row[1])) $listusername = $row[1]; else $listusername = ''; $listtitle = $row[2]; if (isset($row[3])) $listdescription = $row[3]; if (isset($row[4])) $rating = $row[4]; else $rating = 0; if (isset($row[5])) { $listdate = date("F j, Y", $row[5]); } if (isset($row[6])) { $pickresid = explode(' ', $row[6]); } if (isset($row[7])) { $isPublic = $row[7]; } else $isPublic = 1; $sponsorLogo = isset($row[8]) ? $row[8] : ""; $sponsorURL = isset($row[9]) ? $row[9] : ""; $sponsorDomain = isset($row[10]) ? $row[10] : ""; $foundPicksList = true; $referData['pick'] = $pid; $referData['pickguid'] = $listguid; } } if (!isset($foundPicksList)) { $error_message = "The User Pick List does not exist. Perhaps the user has deleted it."; } $safeListTitle = htmlspecialchars($listtitle); if (!$sponsorURL && $listguid) { $displayUserName = htmlspecialchars($listusername) . " (ID:$listguid)"; } else { $displayUserName = htmlspecialchars($listusername); } $title = "$displayUserName - $safeListTitle ($MAILSHELL_TITLE_TEXT)"; // set title of the HTML page. include "$default->include_dir/doctype.inc"; $isOffersPage = true; $page_heading = 'List Topics > ' . 'Users Picks > ' . "$displayUserName - $safeListTitle" . ''; include "$default->include_dir/generic-header.inc"; if (isset($error_message)) displayErrorToUser($error_message); else { ?>
Date created:  
Title of picks:   ()
Description:  
Created by user:  (ID:', $listguid; ?>)
User's overall rating of lists below: ', getImageForRating($rating * 20, 0, false); // rating is on a scale of 1-5, so we'll convert to the 1-100 scale used to determine an appropriate number of stars to show. ?>
'; echo $tableGenerator->complexDataTable('', $query); } // // restore connection to default server. unset($databasehost); dbconnect(); page_close(); require "$default->include_dir/generic-footer.inc"; ?>