*/
public function getAvailableTags()
{
+ /* retrive tags from database */
$this->get_tags();
$output = "";
if(isset($_SESSION['selected_tags']) && in_array($key, $_SESSION['selected_tags']))
continue;
- // calculate CSS font-size
- // find the $value in excess of $min_qty
- // multiply by the font-size increment ($size)
- // and add the $min_size set above
+ // calculate CSS font-size
+ // find the $value in excess of $min_qty
+ // multiply by the font-size increment ($size)
+ // and add the $min_size set above
$size = $min_size + (($value - $min_qty) * $step);
// uncomment if you want sizes in whole %:
$size = ceil($size);
*/
public function getSelectedTags()
{
+ /* retrive tags from database */
$this->get_tags();
$output = "";
+
foreach($this->avail_tags as $tag)
{
// return all selected tags
}
}
- $output = substr($output, 0, strlen($output)-2);
- print $output;
+ if($output != "") {
+ $output = substr($output, 0, strlen($output)-2);
+ return $output;
+ }
+ else {
+ return "no tags selected";
+ }
} // getSelectedTags()
return HTML_AJAX.grab(encodeURI('rpc.php?action=what_to_do'));
}
-function init_phpfspot()
+function init_phpfspot(mode)
{
+ /* always load list of available tags */
refreshAvailableTags();
+ /* ask the server what we are currently displaying */
whattodo = AskServerWhatToDo();
if(whattodo == 'showpi' || whattodo == 'showpi_date') {
refreshSelectedTags();
}
}
-}
+} // init_phpfspot()
function setBackGrdColor(item, color)
{
break;
case 'show_available_tags':
- $fspot->getAvailableTags();
+ print $fspot->getAvailableTags();
break;
case 'show_selected_tags':
- $fspot->getSelectedTags();
+ print $fspot->getSelectedTags();
break;
case 'addtag':