$available_zoom = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18');
// Available options
$available_add_before = array('Author' => l10n('Author'), 'datecreate' => l10n('Created on'), 'datepost' => l10n('Posted on'), 'Dimensions' => l10n('Dimensions'), 'File' => l10n('File'), 'Filesize' => l10n('Filesize'), 'Tags' => l10n('Tags'), 'Categories' => l10n('Albums'), 'Visits' => l10n('Visits'), 'Average' => l10n('Rating score'), 'rating' => l10n('Rate this photo'), 'Privacy' => l10n('Who can see this photo?'));
// Available options
// 0 - PLUGIN_INDEX_CONTENT_BEGIN
// 1 - PLUGIN_INDEX_CONTENT_COMMENT
// 2 - PLUGIN_INDEX_CONTENT_END
$available_cat_index = array('0' => l10n('Thumbnail'), '1' => l10n('Description'), '2' => l10n('Last'));
// Available pin
$available_pin = array('0' => l10n('NOPIN'), '1' => l10n('DEFAULTPIN'), '2' => l10n('DEFAULTPINGREEN'), '3' => l10n('DEFAULTPINRED'), '4' => l10n('LEAFPINGREEN'), '5' => l10n('LEAFPINORANGE'), '6' => l10n('LEAFPINRED'), '7' => l10n('MAPICONSBLEU'), '8' => l10n('MAPICONSGREEN'), '9' => l10n('OWNPIN'), '10' => l10n('IMAGE'));
// Available popup
$available_popup = array('0' => l10n('CLICK'), '2' => l10n('NEVER'));
// Available layout value
$available_layout = array('1' => 'osm-map.tpl', '2' => 'osm-map2.tpl', '3' => 'osm-map3.tpl');
$query = 'SELECT COUNT(*) FROM ' . IMAGES_TABLE . ' WHERE `latitude` IS NOT NULL and `longitude` IS NOT NULL ';
list($nb_geotagged) = pwg_db_fetch_array(pwg_query($query));
// Update conf if submitted in admin site
if (isset($_POST['submit']) && !empty($_POST['osm_height'])) {
    // Check the center GPS position is valid
    $osm_left_center = (isset($_POST['osm_left_center']) and strlen($_POST['osm_left_center']) != 0) ? $_POST['osm_left_center'] : '0,0';
    $center_arr = explode(',', $osm_left_center);
    //print_r($center_arr);
    $latitude = $center_arr[0];
    $longitude = $center_arr[1];
    if (isset($latitude) and isset($longitude)) {
        if (strlen($latitude) == 0 and strlen($longitude) == 0) {
            array_push($page['warnings'], l10n('Both latitude/longitude must not empty'));
        }
    }
    if (isset($latitude) and ($latitude <= -90 or $latitude >= 90)) {
        array_push($page['warnings'], l10n('The specify center latitude (-90=S to 90=N) is not valid'));
Beispiel #2
0
$sQuery = "\n\t\tSELECT SQL_CALC_FOUND_ROWS " . str_replace(" , ", " ", implode(", ", $aColumns)) . "\n\t\tFROM   {$sTable}\n\t\t{$sWhere}\n\t\t{$sOrder}\n\t\t{$sLimit}\n\t";
$rResult = pwg_query($sQuery);
/* Data set length after filtering */
$rResultFilterTotal = pwg_query('SELECT FOUND_ROWS();');
list($iFilteredTotal) = pwg_db_fetch_row($rResultFilterTotal);
/* Total data set length */
$sQuery = "\n\t\tSELECT COUNT(" . $sIndexColumn . ")\n\t\tFROM   {$sTable}\n\t";
$rResultTotal = pwg_query($sQuery);
$aResultTotal = pwg_db_fetch_array($rResultTotal);
$iTotal = $aResultTotal[0];
/*
 * Output
 */
$output = array("sEcho" => intval($_REQUEST['sEcho']), "iTotalRecords" => $iTotal, "iTotalDisplayRecords" => $iFilteredTotal, "aaData" => array());
$user_ids = array();
while ($aRow = pwg_db_fetch_array($rResult)) {
    $user_ids[] = $aRow[$conf['user_fields']['id']];
    $row = array();
    for ($i = 0; $i < count($aColumns); $i++) {
        if ($aColumns[$i] == "status") {
            $row[] = l10n('user_status_' . $aRow[$aColumns[$i]]);
        } else {
            if ($aColumns[$i] == "level") {
                $row[] = $aRow[$aColumns[$i]] == 0 ? '' : l10n(sprintf('Level %d', $aRow[$aColumns[$i]]));
            } else {
                if ($aColumns[$i] != ' ') {
                    /* General output */
                    $colname = $aColumns[$i];
                    foreach ($conf['user_fields'] as $real_name => $alias) {
                        if ($aColumns[$i] == $real_name) {
                            $colname = $alias;