当前位置: 首页>>代码示例>>PHP>>正文


PHP l10n_dec函数代码示例

本文整理汇总了PHP中l10n_dec函数的典型用法代码示例。如果您正苦于以下问题:PHP l10n_dec函数的具体用法?PHP l10n_dec怎么用?PHP l10n_dec使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了l10n_dec函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do_timeout_treatment

function do_timeout_treatment($post_keyname, $check_key_treated = array())
{
    global $env_nbm, $base_url, $page, $must_repost;
    if ($env_nbm['is_sendmail_timeout']) {
        if (isset($_POST[$post_keyname])) {
            $post_count = count($_POST[$post_keyname]);
            $treated_count = count($check_key_treated);
            if ($treated_count != 0) {
                $time_refresh = ceil((get_moment() - $env_nbm['start_time']) * $post_count / $treated_count);
            } else {
                $time_refresh = 0;
            }
            $_POST[$post_keyname] = array_diff($_POST[$post_keyname], $check_key_treated);
            $must_repost = true;
            $page['errors'][] = l10n_dec('Execution time is out, treatment must be continue [Estimated time: %d second].', 'Execution time is out, treatment must be continue [Estimated time: %d seconds].', $time_refresh);
        }
    }
}
开发者ID:donseba,项目名称:Piwigo,代码行数:18,代码来源:notification_by_mail.php

示例2: add_url_params

            $user_tpl = $tpl;
            if ($authkey !== false) {
                $user_tpl['assign']['LINK'] = add_url_params($tpl['assign']['LINK'], array('auth' => $authkey['auth_key']));
                if (isset($user_tpl['assign']['IMG']['link'])) {
                    $user_tpl['assign']['IMG']['link'] = add_url_params($user_tpl['assign']['IMG']['link'], array('auth' => $authkey['auth_key']));
                }
            }
            $user_args = $args;
            if (isset($authkey)) {
                $user_args['auth_key'] = $authkey['auth_key'];
            }
            switch_lang_to($u['language']);
            pwg_mail($u['email'], $user_args, $user_tpl);
            switch_lang_back();
        }
        $message = l10n_dec('%d mail was sent.', '%d mails were sent.', count($users));
        $message .= ' (' . implode(', ', $usernames) . ')';
        $page['infos'][] = $message;
    } elseif ('group' == $_POST['who'] and !empty($_POST['group'])) {
        check_input_parameter('group', $_POST, false, PATTERN_ID);
        pwg_mail_group($_POST['group'], $args, $tpl);
        $query = '
SELECT
    name
  FROM ' . GROUPS_TABLE . '
  WHERE id = ' . $_POST['group'] . '
;';
        list($group_name) = pwg_db_fetch_row(pwg_query($query));
        $page['infos'][] = l10n('An information email was sent to group "%s"', $group_name);
    }
    unset_make_full_url();
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:album_notification.php

示例3: l10n

// +-----------------------------------------------------------------------+
// |                                actions                                |
// +-----------------------------------------------------------------------+
if (!empty($_POST)) {
    if (empty($_POST['comments'])) {
        $page['errors'][] = l10n('Select at least one comment');
    } else {
        include_once PHPWG_ROOT_PATH . 'include/functions_comment.inc.php';
        check_input_parameter('comments', $_POST, true, PATTERN_ID);
        if (isset($_POST['validate'])) {
            validate_user_comment($_POST['comments']);
            $page['infos'][] = l10n_dec('%d user comment validated', '%d user comments validated', count($_POST['comments']));
        }
        if (isset($_POST['reject'])) {
            delete_user_comment($_POST['comments']);
            $page['infos'][] = l10n_dec('%d user comment rejected', '%d user comments rejected', count($_POST['comments']));
        }
    }
}
// +-----------------------------------------------------------------------+
// |                             template init                             |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('comments' => 'comments.tpl'));
$template->assign(array('F_ACTION' => get_root_url() . 'admin.php?page=comments'));
// +-----------------------------------------------------------------------+
// | Tabs                                                                  |
// +-----------------------------------------------------------------------+
include_once PHPWG_ROOT_PATH . 'admin/include/tabsheet.class.php';
$my_base_url = get_root_url() . 'admin.php?page=';
$tabsheet = new tabsheet();
$tabsheet->set_id('comments');
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:comments.php

示例4: implode

        $filter['visible_images'] = implode(',', array_from_query($query, 'image_id'));
        if (empty($filter['visible_images'])) {
            // Must be not empty
            $filter['visible_images'] = -1;
        }
        // Save filter data on session
        pwg_set_session_var('filter_enabled', $filter['enabled']);
        pwg_set_session_var('filter_check_key', $filter_key);
        pwg_set_session_var('filter_categories', serialize($filter['categories']));
        pwg_set_session_var('filter_visible_categories', $filter['visible_categories']);
        pwg_set_session_var('filter_visible_images', $filter['visible_images']);
    } else {
        // Read only data
        $filter['categories'] = unserialize(pwg_get_session_var('filter_categories', serialize(array())));
        $filter['visible_categories'] = pwg_get_session_var('filter_visible_categories', '');
        $filter['visible_images'] = pwg_get_session_var('filter_visible_images', '');
    }
    unset($filter_key);
    if (get_filter_page_value('add_notes')) {
        $header_notes[] = l10n_dec('Photos posted within the last %d day.', 'Photos posted within the last %d days.', $filter['recent_period']);
    }
    include_once PHPWG_ROOT_PATH . 'include/functions_filter.inc.php';
} else {
    if (pwg_get_session_var('filter_enabled', false)) {
        pwg_unset_session_var('filter_enabled');
        pwg_unset_session_var('filter_check_key');
        pwg_unset_session_var('filter_categories');
        pwg_unset_session_var('filter_visible_categories');
        pwg_unset_session_var('filter_visible_images');
    }
}
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:31,代码来源:filter.inc.php

示例5: IN

// |                               delete places                           |
// +-----------------------------------------------------------------------+
if (isset($_POST['delete']) and isset($_POST['places'])) {
    $query = '
SELECT name
  FROM ' . osm_place_table . '
  WHERE id IN (' . implode(',', $_POST['places']) . ')
;';
    $place_names = array_from_query($query, 'name');
    $query = '
DELETE
  FROM ' . osm_place_table . '
  WHERE id IN (' . implode(',', $_POST['places']) . ')
;';
    pwg_query($query);
    $page['infos'][] = l10n_dec('The following place was deleted', 'The %d following places were deleted', count($place_names)) . ' : ' . implode(', ', $place_names);
}
// +-----------------------------------------------------------------------+
// |                               add a place                             |
// +-----------------------------------------------------------------------+
if (isset($_POST['add']) and !empty($_POST['add_place'])) {
    $query = "INSERT INTO `" . osm_place_table . "` (`name`, `latitude`, `longitude`) VALUE ('" . $_POST['add_place'] . "', '" . $_POST['add_lat'] . "', '" . $_POST['add_lon'] . "');";
    $result = pwg_query($query);
}
// all places
$query = 'SELECT * FROM `' . osm_place_table . '`;';
$result = pwg_query($query);
$all_places = array();
while ($place = pwg_db_fetch_assoc($result)) {
    $all_places[] = $place;
}
开发者ID:lcorbasson,项目名称:piwigo-openstreetmap,代码行数:31,代码来源:admin_place.php

示例6: check

 /**
  * Check integrities
  *
  * @param void
  * @return void
  */
 function check()
 {
     global $page, $header_notes, $conf;
     // Ignore list
     $conf_c13y_ignore = unserialize($conf['c13y_ignore']);
     if (is_array($conf_c13y_ignore) and isset($conf_c13y_ignore['version']) and $conf_c13y_ignore['version'] == PHPWG_VERSION and is_array($conf_c13y_ignore['list'])) {
         $ignore_list_changed = false;
         $this->ignore_list = $conf_c13y_ignore['list'];
     } else {
         $ignore_list_changed = true;
         $this->ignore_list = array();
     }
     // Retrieve list
     $this->retrieve_list = array();
     $this->build_ignore_list = array();
     trigger_notify('list_check_integrity', $this);
     // Information
     if (count($this->retrieve_list) > 0) {
         $header_notes[] = l10n_dec('%d anomaly has been detected.', '%d anomalies have been detected.', count($this->retrieve_list));
     }
     // Treatments
     if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection'])) {
         $corrected_count = 0;
         $not_corrected_count = 0;
         foreach ($this->retrieve_list as $i => $c13y) {
             if (!empty($c13y['correction_fct']) and $c13y['is_callable'] and in_array($c13y['id'], $_POST['c13y_selection'])) {
                 if (is_array($c13y['correction_fct_args'])) {
                     $args = $c13y['correction_fct_args'];
                 } else {
                     if (!is_null($c13y['correction_fct_args'])) {
                         $args = array($c13y['correction_fct_args']);
                     } else {
                         $args = array();
                     }
                 }
                 $this->retrieve_list[$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
                 if ($this->retrieve_list[$i]['corrected']) {
                     $corrected_count += 1;
                 } else {
                     $not_corrected_count += 1;
                 }
             }
         }
         if ($corrected_count > 0) {
             $page['infos'][] = l10n_dec('%d anomaly has been corrected.', '%d anomalies have been detected corrected.', $corrected_count);
         }
         if ($not_corrected_count > 0) {
             $page['errors'][] = l10n_dec('%d anomaly has not been corrected.', '%d anomalies have not been corrected.', $not_corrected_count);
         }
     } else {
         if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection'])) {
             $ignored_count = 0;
             foreach ($this->retrieve_list as $i => $c13y) {
                 if (in_array($c13y['id'], $_POST['c13y_selection'])) {
                     $this->build_ignore_list[] = $c13y['id'];
                     $this->retrieve_list[$i]['ignored'] = true;
                     $ignored_count += 1;
                 }
             }
             if ($ignored_count > 0) {
                 $page['infos'][] = l10n_dec('%d anomaly has been ignored.', '%d anomalies have been ignored.', $ignored_count);
             }
         }
     }
     $ignore_list_changed = ($ignore_list_changed or count(array_diff($this->ignore_list, $this->build_ignore_list)) > 0 or count(array_diff($this->build_ignore_list, $this->ignore_list)) > 0);
     if ($ignore_list_changed) {
         $this->update_conf($this->build_ignore_list);
     }
 }
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:75,代码来源:check_integrity.class.php

示例7: get_display_images_count

/**
 * Returns display text for images counter of category
 *
 * @param int $cat_nb_images nb images directly in category
 * @param int $cat_count_images nb images in category (including subcats)
 * @param int $cat_count_categories nb subcats
 * @param bool $short_message if true append " in this album"
 * @param string $separator
 * @return string
 */
function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_categories, $short_message = true, $separator = '\\n')
{
    $display_text = '';
    if ($cat_count_images > 0) {
        if ($cat_nb_images > 0 and $cat_nb_images < $cat_count_images) {
            $display_text .= get_display_images_count($cat_nb_images, $cat_nb_images, 0, $short_message, $separator) . $separator;
            $cat_count_images -= $cat_nb_images;
            $cat_nb_images = 0;
        }
        //at least one image direct or indirect
        $display_text .= l10n_dec('%d photo', '%d photos', $cat_count_images);
        if ($cat_count_categories == 0 or $cat_nb_images == $cat_count_images) {
            //no descendant categories or descendants do not contain images
            if (!$short_message) {
                $display_text .= ' ' . l10n('in this album');
            }
        } else {
            $display_text .= ' ' . l10n_dec('in %d sub-album', 'in %d sub-albums', $cat_count_categories);
        }
    }
    return $display_text;
}
开发者ID:donseba,项目名称:Piwigo,代码行数:32,代码来源:functions_category.inc.php

示例8: do_subscribe_unsubscribe_notification_by_mail

function do_subscribe_unsubscribe_notification_by_mail($is_admin_request, $is_subscribe = false, $check_key_list = array())
{
    global $conf, $page, $env_nbm, $conf;
    set_make_full_url();
    $check_key_treated = array();
    $updated_data_count = 0;
    $error_on_updated_data_count = 0;
    if ($is_subscribe) {
        $msg_info = l10n('User %s [%s] was added to the subscription list.');
        $msg_error = l10n('User %s [%s] was not added to the subscription list.');
    } else {
        $msg_info = l10n('User %s [%s] was removed from the subscription list.');
        $msg_error = l10n('User %s [%s] was not removed from the subscription list.');
    }
    if (count($check_key_list) != 0) {
        $updates = array();
        $enabled_value = boolean_to_string($is_subscribe);
        $data_users = get_user_notifications('subscribe', $check_key_list, !$is_subscribe);
        // Prepare message after change language
        $msg_break_timeout = l10n('Time to send mail is limited. Others mails are skipped.');
        // Begin nbm users environment
        begin_users_env_nbm(true);
        foreach ($data_users as $nbm_user) {
            if (check_sendmail_timeout()) {
                // Stop fill list on 'send', if the quota is override
                $page['errors'][] = $msg_break_timeout;
                break;
            }
            // Fill return list
            $check_key_treated[] = $nbm_user['check_key'];
            $do_update = true;
            if ($nbm_user['mail_address'] != '') {
                // set env nbm user
                set_user_on_env_nbm($nbm_user, true);
                $subject = '[' . $conf['gallery_title'] . '] ' . ($is_subscribe ? l10n('Subscribe to notification by mail') : l10n('Unsubscribe from notification by mail'));
                // Assign current var for nbm mail
                assign_vars_nbm_mail_content($nbm_user);
                $section_action_by = $is_subscribe ? 'subscribe_by_' : 'unsubscribe_by_';
                $section_action_by .= $is_admin_request ? 'admin' : 'himself';
                $env_nbm['mail_template']->assign(array($section_action_by => true, 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], 'GOTO_GALLERY_URL' => get_gallery_home_url()));
                $ret = pwg_mail(array('name' => stripslashes($nbm_user['username']), 'email' => $nbm_user['mail_address']), array('from' => $env_nbm['send_as_mail_formated'], 'subject' => $subject, 'email_format' => $env_nbm['email_format'], 'content' => $env_nbm['mail_template']->parse('notification_by_mail', true), 'content_format' => $env_nbm['email_format']));
                if ($ret) {
                    inc_mail_sent_success($nbm_user);
                } else {
                    inc_mail_sent_failed($nbm_user);
                    $do_update = false;
                }
                // unset env nbm user
                unset_user_on_env_nbm();
            }
            if ($do_update) {
                $updates[] = array('check_key' => $nbm_user['check_key'], 'enabled' => $enabled_value);
                $updated_data_count += 1;
                $page['infos'][] = sprintf($msg_info, stripslashes($nbm_user['username']), $nbm_user['mail_address']);
            } else {
                $error_on_updated_data_count += 1;
                $page['errors'][] = sprintf($msg_error, stripslashes($nbm_user['username']), $nbm_user['mail_address']);
            }
        }
        // Restore nbm environment
        end_users_env_nbm();
        display_counter_info();
        mass_updates(USER_MAIL_NOTIFICATION_TABLE, array('primary' => array('check_key'), 'update' => array('enabled')), $updates);
    }
    $page['infos'][] = l10n_dec('%d user was updated.', '%d users were updated.', $updated_data_count);
    if ($error_on_updated_data_count != 0) {
        $page['errors'][] = l10n_dec('%d user was not updated.', '%d users were not updated.', $error_on_updated_data_count);
    }
    unset_make_full_url();
    return $check_key_treated;
}
开发者ID:lcorbasson,项目名称:Piwigo,代码行数:71,代码来源:functions_notification_by_mail.inc.php

示例9: array_push

                    array_push($page['errors'], l10n('UAM_No_reminder_for_Webmaster'));
                }
                if (in_array($user['id'], $collection)) {
                    array_push($page['errors'], l10n('UAM_No_reminder_for_your_account'));
                }
                if (count($page['errors']) == 0) {
                    foreach ($collection as $user_id) {
                        $query = '
SELECT id, username, mail_address
FROM ' . USERS_TABLE . '
WHERE id = ' . $user_id . '
;';
                        $data = pwg_db_fetch_assoc(pwg_query($query));
                        ghostreminder($user_id, stripslashes($data['username']), $data['mail_address']);
                    }
                    array_push($page['infos'], l10n_dec('UAM_%d_Reminder_Sent', 'UAM_%d_Reminders_Sent', count($collection)));
                    $page['filtered_users'] = get_ghost_user_list();
                }
            }
            if (isset($_POST['GhostTracker_Init']) and is_admin()) {
                $query1 = '
SELECT *
FROM ' . USER_LASTVISIT_TABLE . ';';
                $count = pwg_db_num_rows(pwg_query($query1));
                if ($count != 0) {
                    $query = '
SELECT DISTINCT u.id,
                ui.status AS status
FROM ' . USERS_TABLE . ' AS u
  INNER JOIN ' . USER_INFOS_TABLE . ' AS ui
    ON u.id = ui.user_id
开发者ID:Eric-Piwigo,项目名称:UserAdvManager,代码行数:31,代码来源:UAM_admin.php

示例10: ws_users_delete

/**
 * API method
 * Deletes users
 * @param mixed[] $params
 *    @option int[] user_id
 *    @option string pwg_token
 */
function ws_users_delete($params, &$service)
{
    if (get_pwg_token() != $params['pwg_token']) {
        return new PwgError(403, 'Invalid security token');
    }
    global $conf, $user;
    include_once PHPWG_ROOT_PATH . 'admin/include/functions.php';
    $protected_users = array($user['id'], $conf['guest_id'], $conf['default_user_id'], $conf['webmaster_id']);
    // an admin can't delete other admin/webmaster
    if ('admin' == $user['status']) {
        $query = '
SELECT
    user_id
  FROM ' . USER_INFOS_TABLE . '
  WHERE status IN (\'webmaster\', \'admin\')
;';
        $protected_users = array_merge($protected_users, query2array($query, null, 'user_id'));
    }
    // protect some users
    $params['user_id'] = array_diff($params['user_id'], $protected_users);
    $counter = 0;
    foreach ($params['user_id'] as $user_id) {
        delete_user($user_id);
        $counter++;
    }
    return l10n_dec('%d user deleted', '%d users deleted', $counter);
}
开发者ID:donseba,项目名称:Piwigo,代码行数:34,代码来源:pwg.users.php

示例11: list

  FROM ' . GROUPS_TABLE . '
;';
list($nb_groups) = pwg_db_fetch_row(pwg_query($query));
$query = '
SELECT COUNT(*)
  FROM ' . RATE_TABLE . '
;';
list($nb_rates) = pwg_db_fetch_row(pwg_query($query));
$template->assign(array('PHPWG_URL' => PHPWG_URL, 'PWG_VERSION' => PHPWG_VERSION, 'OS' => PHP_OS, 'PHP_VERSION' => phpversion(), 'DB_ENGINE' => 'MySQL', 'DB_VERSION' => $db_version, 'DB_ELEMENTS' => l10n_dec('%d photo', '%d photos', $nb_elements), 'DB_CATEGORIES' => l10n_dec('%d album including', '%d albums including', $nb_categories) . l10n_dec('%d physical', '%d physicals', $nb_physical) . l10n_dec(' and %d virtual', ' and %d virtuals', $nb_virtual), 'DB_IMAGE_CATEGORY' => l10n_dec('%d association', '%d associations', $nb_image_category), 'DB_TAGS' => l10n_dec('%d tag', '%d tags', $nb_tags), 'DB_IMAGE_TAG' => l10n_dec('%d association', '%d associations', $nb_image_tag), 'DB_USERS' => l10n_dec('%d user', '%d users', $nb_users), 'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups), 'DB_RATES' => $nb_rates == 0 ? l10n('no rate') : l10n('%d rates', $nb_rates), 'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH . 'admin.php?action=check_upgrade', 'U_PHPINFO' => PHPWG_ROOT_PATH . 'admin.php?action=phpinfo', 'PHP_DATATIME' => $php_current_timestamp, 'DB_DATATIME' => $db_current_date));
if ($conf['activate_comments']) {
    $query = '
SELECT COUNT(*)
  FROM ' . COMMENTS_TABLE . '
;';
    list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
    $template->assign('DB_COMMENTS', l10n_dec('%d comment', '%d comments', $nb_comments));
}
if ($nb_elements > 0) {
    $query = '
SELECT MIN(date_available)
  FROM ' . IMAGES_TABLE . '
;';
    list($first_date) = pwg_db_fetch_row(pwg_query($query));
    $template->assign('first_added', array('DB_DATE' => l10n('first photo added on %s', format_date($first_date))));
}
// graphics library
switch (pwg_image::get_library()) {
    case 'imagick':
        $library = 'ImageMagick';
        $img = new Imagick();
        $version = $img->getVersion();
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:intro.php

示例12: l10n

            $page['infos'][] = l10n('Tags <em>%s</em> merged into tag <em>%s</em>', implode(', ', $tags_deleted), $name_of_tag[$destination_tag_id]);
        }
    }
}
// +-----------------------------------------------------------------------+
// |                               delete tags                             |
// +-----------------------------------------------------------------------+
if (isset($_POST['delete']) and isset($_POST['tags'])) {
    $query = '
SELECT name
  FROM ' . TAGS_TABLE . '
  WHERE id IN (' . implode(',', $_POST['tags']) . ')
;';
    $tag_names = array_from_query($query, 'name');
    delete_tags($_POST['tags']);
    $page['infos'][] = l10n_dec('The following tag was deleted', 'The %d following tags were deleted', count($tag_names)) . ' : ' . implode(', ', $tag_names);
}
// +-----------------------------------------------------------------------+
// |                           delete orphan tags                          |
// +-----------------------------------------------------------------------+
if (isset($_GET['action']) and 'delete_orphans' == $_GET['action']) {
    check_pwg_token();
    delete_orphan_tags();
    $_SESSION['page_infos'] = array(l10n('Orphan tags deleted'));
    redirect(get_root_url() . 'admin.php?page=tags');
}
// +-----------------------------------------------------------------------+
// |                               add a tag                               |
// +-----------------------------------------------------------------------+
if (isset($_POST['add']) and !empty($_POST['add_tag'])) {
    $ret = create_tag($_POST['add_tag']);
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:tags.php

示例13: content_55bbb4656e3694_35803903


//.........这里部分代码省略.........
        $_smarty_tpl->tpl_vars['ref_level'] = new Smarty_variable(0, null, 0);
        $_smarty_tpl->tpl_vars['cat'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['cat']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['block']->value->data['MENU_CATEGORIES'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['cat']->key => $_smarty_tpl->tpl_vars['cat']->value) {
            $_smarty_tpl->tpl_vars['cat']->_loop = true;
            if ($_smarty_tpl->tpl_vars['cat']->value['LEVEL'] > $_smarty_tpl->tpl_vars['ref_level']->value) {
                ?>
  <ul>
<?php 
            } else {
                ?>
    </li>
    <?php 
                echo str_repeat('</ul></li>', $_smarty_tpl->tpl_vars['ref_level']->value - $_smarty_tpl->tpl_vars['cat']->value['LEVEL']);
                ?>

<?php 
            }
            ?>
    <li <?php 
            if ($_smarty_tpl->tpl_vars['cat']->value['SELECTED']) {
                ?>
class="selected"<?php 
            }
            ?>
>
      <a href="<?php 
            echo $_smarty_tpl->tpl_vars['cat']->value['URL'];
            ?>
" <?php 
            if ($_smarty_tpl->tpl_vars['cat']->value['IS_UPPERCAT']) {
                ?>
rel="up"<?php 
            }
            ?>
 title="<?php 
            echo $_smarty_tpl->tpl_vars['cat']->value['TITLE'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['cat']->value['NAME'];
            ?>
</a>
<?php 
            if ($_smarty_tpl->tpl_vars['cat']->value['count_images'] > 0) {
                ?>
      <span class="<?php 
                if ($_smarty_tpl->tpl_vars['cat']->value['nb_images'] > 0) {
                    ?>
menuInfoCat<?php 
                } else {
                    ?>
menuInfoCatByChild<?php 
                }
                ?>
" title="<?php 
                echo $_smarty_tpl->tpl_vars['cat']->value['TITLE'];
                ?>
">[<?php 
                echo $_smarty_tpl->tpl_vars['cat']->value['count_images'];
                ?>
]</span>
<?php 
            }
            if (!empty($_smarty_tpl->tpl_vars['cat']->value['icon_ts'])) {
                ?>
      <img title="<?php 
                echo $_smarty_tpl->tpl_vars['cat']->value['icon_ts']['TITLE'];
                ?>
" src="<?php 
                echo $_smarty_tpl->tpl_vars['ROOT_URL']->value;
                echo $_smarty_tpl->tpl_vars['themeconf']->value['icon_dir'];
                ?>
/recent<?php 
                if ($_smarty_tpl->tpl_vars['cat']->value['icon_ts']['IS_CHILD_DATE']) {
                    ?>
_by_child<?php 
                }
                ?>
.png" class="icon" alt="(!)">
<?php 
            }
            ?>
  <?php 
            $_smarty_tpl->tpl_vars['ref_level'] = new Smarty_variable($_smarty_tpl->tpl_vars['cat']->value['LEVEL'], null, 0);
        }
        echo str_repeat('</li></ul>', $_smarty_tpl->tpl_vars['ref_level']->value);
        ?>


	<p class="totalImages"><?php 
        echo l10n_dec('%d photo', '%d photos', $_smarty_tpl->tpl_vars['block']->value->data['NB_PICTURE']);
        ?>
</p>
</dd>
<?php 
    }
开发者ID:abhinay100,项目名称:piwigo_app,代码行数:101,代码来源:ljbwkp^3b51e7a387b3a789b3f9ac5637238737c2c31ccd.file.menubar_categories.tpl.php

示例14: pqv_end_section_init

function pqv_end_section_init()
{
    global $template, $page;
    if (!pqv_is_active()) {
        return;
    }
    if (empty($page['items'])) {
        return;
    }
    $query = '
SELECT
    id
  FROM ' . IMAGES_TABLE . '
  WHERE id IN (' . implode(',', $page['items']) . ')
    AND pqv_validated = \'false\'
;';
    $pqv_rejected = query2array($query, null, 'id');
    if (isset($_GET['pqv_delete']) and count($pqv_rejected) > 0) {
        include_once PHPWG_ROOT_PATH . 'admin/include/functions.php';
        $deleted_count = delete_elements($pqv_rejected, true);
        if ($deleted_count > 0) {
            invalidate_user_cache();
            $_SESSION['page_infos'][] = l10n_dec('%d photo was deleted', '%d photos were deleted', $deleted_count);
            $redirect_url = duplicate_index_url(array(), array('pqv_delete'));
            redirect($redirect_url);
        }
    }
    if (count($pqv_rejected) > 0) {
        $delete_url = add_url_params(duplicate_index_url(), array('pqv_delete' => 1));
        $template->assign('CONTENT_DESCRIPTION', '<a href="' . $delete_url . '" onclick="return confirm(\'' . l10n('Are you sure?') . '\');">delete the ' . count($pqv_rejected) . ' rejected photo(s)</a>');
    }
}
开发者ID:plegall,项目名称:Piwigo-photo_quick_validation,代码行数:32,代码来源:main.inc.php

示例15: l10n_dec

 /**
  * @deprecated use "translate_dec" modifier
  */
 function l10n_dec($s, $p, $v)
 {
     return l10n_dec($s, $p, $v);
 }
开发者ID:squidjam,项目名称:Piwigo,代码行数:7,代码来源:template.class.php


注:本文中的l10n_dec函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。