2009-10-28 08:02:17 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* We re-use vote.php but set the ajax flag
|
|
|
|
*/
|
2010-03-17 20:11:21 +00:00
|
|
|
$httpContentType = 'text/xml';
|
2009-10-28 08:02:17 +00:00
|
|
|
$GLOBALS['ajaxRequest'] = true;
|
|
|
|
require 'vote.php';
|
|
|
|
|
|
|
|
$bs = SemanticScuttle_Service_Factory::get('Bookmark');
|
|
|
|
$ts = SemanticScuttle_Service_Factory::get('Template');
|
|
|
|
$bmrow = $bs->getBookmark($bookmark);
|
|
|
|
|
2009-11-02 09:38:02 +00:00
|
|
|
switch ($GLOBALS['votingMode']) {
|
|
|
|
case 2:
|
|
|
|
$template = 'bookmarks-vote-horizontal.inc.tpl.php';
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
$template = 'bookmarks-vote.inc.tpl.php';
|
|
|
|
}
|
|
|
|
|
2009-10-28 08:02:17 +00:00
|
|
|
echo '<voteresult><bookmark>' . $bookmark . '</bookmark>'
|
|
|
|
. '<html xmlns="http://www.w3.org/1999/xhtml">';
|
|
|
|
$ts->loadTemplate(
|
2009-11-02 09:38:02 +00:00
|
|
|
$template, array('row' => $bmrow)
|
2009-10-28 08:02:17 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
echo '</html></voteresult>';
|
|
|
|
?>
|