aboutsummaryrefslogtreecommitdiff
path: root/www/ajaxVote.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 08:02:17 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-28 08:02:17 +0000
commita3ba58dfc048c948230317191c67101c4aa80bfb (patch)
tree75dc0309ac92381e3df31820894aa79f320b9e1f /www/ajaxVote.php
parenta63765a4ad05b83f4c4ffcb7790b528f09f20a43 (diff)
downloadsemanticscuttle-a3ba58dfc048c948230317191c67101c4aa80bfb.tar.gz
semanticscuttle-a3ba58dfc048c948230317191c67101c4aa80bfb.tar.bz2
basic ajax voting support. has a bad counting bug somewhere
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@445 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'www/ajaxVote.php')
-rw-r--r--www/ajaxVote.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/www/ajaxVote.php b/www/ajaxVote.php
new file mode 100644
index 0000000..27eb62c
--- /dev/null
+++ b/www/ajaxVote.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * We re-use vote.php but set the ajax flag
+ */
+$GLOBALS['ajaxRequest'] = true;
+require 'vote.php';
+
+$bs = SemanticScuttle_Service_Factory::get('Bookmark');
+$ts = SemanticScuttle_Service_Factory::get('Template');
+$bmrow = $bs->getBookmark($bookmark);
+
+header('Content-Type: text/xml; charset=utf-8');
+echo '<voteresult><bookmark>' . $bookmark . '</bookmark>'
+ . '<html xmlns="http://www.w3.org/1999/xhtml">';
+$ts->loadTemplate(
+ 'bookmarks-vote.inc.tpl.php',
+ array('row' => $bmrow)
+);
+
+echo '</html></voteresult>';
+?> \ No newline at end of file