ajax.php
author Andreas Boehler <andreas@aboehler.at>
Fri, 12 Sep 2014 07:01:55 +0200
changeset 0 11a7dcc4af7a
permissions -rw-r--r--
Initial import of datapopup
0
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     1
<?php
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     2
global $auth;
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     3
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     4
require_once 'action.php';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     5
$plugin = new action_plugin_datapopup;
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     6
$fields = explode(',',$plugin->getConf('fields'));
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     7
$fields = array_map('trim',$fields);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     8
$fields = array_filter($fields);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
     9
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    10
echo '<ul>';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    11
foreach($fields as $name){
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    12
    $val = $plugin->getFields($_POST['link'], $name);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    13
    if($val != "")
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    14
    {
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    15
        echo '<li class="dataov_name">';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    16
        echo '<div class="li">';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    17
        echo hsc($name);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    18
        echo '</div></li>';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    19
        echo '<li class="dataov_'.hsc($name).'">';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    20
        echo '<div class="li">';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    21
        echo hsc($val);
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    22
        echo '</div></li>';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    23
    }
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    24
}
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    25
echo '</ul>';
11a7dcc4af7a Initial import of datapopup
Andreas Boehler <andreas@aboehler.at>
parents:
diff changeset
    26