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


PHP FileTemplate::get_pictures_data_path方法代码示例

本文整理汇总了PHP中FileTemplate::get_pictures_data_path方法的典型用法代码示例。如果您正苦于以下问题:PHP FileTemplate::get_pictures_data_path方法的具体用法?PHP FileTemplate::get_pictures_data_path怎么用?PHP FileTemplate::get_pictures_data_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileTemplate的用法示例。


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

示例1: retrieve

 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 ###################################################*/
require_once '../kernel/begin.php';
include_once '../wiki/wiki_functions.php';
load_module_lang('wiki');
define('TITLE', $LANG['wiki_explorer']);
$bread_crumb_key = 'wiki_explorer';
require_once '../wiki/wiki_bread_crumb.php';
$cat = retrieve(GET, 'cat', 0);
require_once '../kernel/header.php';
$template = new FileTemplate('wiki/explorer.tpl');
$module_data_path = $template->get_pictures_data_path();
//Contenu de la racine:
$root = '';
foreach (WikiCategoriesCache::load()->get_categories() as $key => $cat) {
    if ($cat['id_parent'] == 0) {
        $root .= '<li><a href="javascript:open_cat(' . $key . '); show_wiki_cat_contents(' . $cat['id_parent'] . ', 0);"><i class="fa fa-folder"></i>' . stripslashes($cat['title']) . '</a></li>';
    }
}
$result = PersistenceContext::get_querier()->select("SELECT title, id, encoded_title\n\tFROM " . PREFIX . "wiki_articles a\n\tWHERE id_cat = 0\n\tAND a.redirect = 0\n\tORDER BY is_cat DESC, title ASC");
while ($row = $result->fetch()) {
    $root .= '<li><a href="' . url('wiki.php?title=' . $row['encoded_title'], $row['encoded_title']) . '"><i class="fa fa-file"></i>' . stripslashes($row['title']) . '</a></li>';
}
$result->dispose();
$template->put_all(array('TITLE' => $LANG['wiki_explorer'], 'L_ROOT' => $LANG['wiki_root'], 'SELECTED_CAT' => $cat > 0 ? $cat : 0, 'ROOT_CONTENTS' => $root, 'L_CATS' => $LANG['wiki_cats_tree']));
$contents = '';
$result = PersistenceContext::get_querier()->select("SELECT c.id, a.title, a.encoded_title\nFROM " . PREFIX . "wiki_cats c\nLEFT JOIN " . PREFIX . "wiki_articles a ON a.id = c.article_id\nWHERE c.id_parent = 0\nORDER BY title ASC");
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:31,代码来源:explorer.php

示例2: foreach

     $error_controller = PHPBoostErrors::user_not_authorized();
     DispatchManager::redirect($error_controller);
 }
 $cat_links = '';
 foreach ($categories as $category) {
     if ($category->get_id() != Category::ROOT_CATEGORY && $category->get_id_parent() == $categories[$id_category]->get_id_parent()) {
         $cat_links .= ' <a href="' . GalleryUrlBuilder::get_link_cat($category->get_id()) . '">' . $category->get_name() . '</a> &raquo;';
     }
 }
 //Gestion erreur.
 $get_error = retrieve(GET, 'error', '');
 $array_error = array('e_upload_invalid_format', 'e_upload_max_weight', 'e_upload_max_dimension', 'e_upload_error', 'e_upload_php_code', 'e_upload_failed_unwritable', 'e_upload_already_exist', 'e_unlink_disabled', 'e_unsupported_format', 'e_unabled_create_pics', 'e_error_resize', 'e_no_graphic_support', 'e_unabled_incrust_logo', 'delete_thumbnails', 'upload_limit');
 if (in_array($get_error, $array_error)) {
     $tpl->put('message_helper', MessageHelper::display(LangLoader::get_message($get_error, 'errors'), MessageHelper::WARNING));
 }
 $module_data_path = $tpl->get_pictures_data_path();
 //Aficchage de la photo uploadée.
 if (!empty($g_idpics)) {
     try {
         $imageup = PersistenceContext::get_querier()->select_single_row(GallerySetup::$gallery_table, array('idcat', 'name', 'path'), 'WHERE id = :id', array('id' => $g_idpics));
     } catch (RowNotFoundException $e) {
         $error_controller = PHPBoostErrors::unexisting_element();
         DispatchManager::redirect($error_controller);
     }
     $tpl->assign_block_vars('image_up', array('NAME' => stripslashes($imageup['name']), 'IMG' => '<a href="gallery.php?cat=' . $imageup['idcat'] . '&amp;id=' . $g_idpics . '#pics_max"><img src="pics/' . $imageup['path'] . '" alt="' . $imageup['name'] . '" /></a>', 'L_SUCCESS_UPLOAD' => $LANG['success_upload_img'], 'U_CAT' => '<a href="gallery.php?cat=' . $imageup['idcat'] . '">' . $categories[$imageup['idcat']]->get_name() . '</a>'));
 }
 //Affichage du quota d'image uploadée.
 $category_authorizations = GalleryService::get_categories_manager()->get_heritated_authorizations($id_category, Category::WRITE_AUTHORIZATIONS, Authorizations::AUTH_PARENT_PRIORITY);
 $quota = isset($category_authorizations['r-1']) ? $category_authorizations['r-1'] != '3' : true;
 if ($quota) {
     switch (AppContext::get_current_user()->get_level()) {
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:31,代码来源:gallery.php


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