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


PHP url::backend方法代码示例

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


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

示例1: getTreeStructurePage

    public static function getTreeStructurePage($parentId = 0, $lvl = 0)
    {
        $select = '';
        $id = !$lvl ? 'id="structure-tree"' : '';
        $sql = sql::factory();
        $sql->query('SELECT * FROM ' . sql::table('structure') . ' WHERE parent_id = ' . $parentId . ' ORDER BY sort')->result();
        if ($sql->num()) {
            $select .= '<ul ' . $id . '>';
            while ($sql->isNext()) {
                $edit = '';
                $online = '';
                $offline = '';
                $delete = '';
                $name = $sql->get('name');
                if (dyn::get('user')->hasPerm('page[content]')) {
                    $name = '<a href="' . url::backend('structure', ['subpage' => 'pages', 'structure_id' => $sql->get('id')]) . '">' . $sql->get('name') . '</a>';
                }
                if (dyn::get('user')->hasPerm('page[edit]')) {
                    $edit = '<a href="' . url::backend('structure', ['subpage' => 'pages', 'action' => 'edit', 'id' => $sql->get('id')]) . '" class="btn btn-sm  btn-default fa fa-pencil-square-o"></a>';
                    $online = '<a href="' . url::backend('structure', ['subpage' => 'pages', 'action' => 'online', 'id' => $sql->get('id')]) . '" class="btn btn-sm dyn-online fa fa-check" title="' . lang::get('online') . '"></a>';
                    $offline = '<a href="' . url::backend('structure', ['subpage' => 'pages', 'action' => 'online', 'id' => $sql->get('id')]) . '" class="btn btn-sm dyn-offline fa fa-times" title="' . lang::get('offline') . '"></a>';
                }
                if (dyn::get('user')->hasPerm('page[delete]')) {
                    $delete = '<a href="' . url::backend('structure', ['subpage' => 'pages', 'action' => 'delete', 'id' => $sql->get('id')]) . '" class="btn btn-sm btn-danger fa fa-trash-o delete"></a>';
                }
                $online = $sql->get('online') ? $online : $offline;
                $select .= '<li data-id="' . $sql->get('id') . '">' . PHP_EOL . '
					<div class="handle"><i class="fa fa-sort"></i> ' . $name . PHP_EOL . '
						<span class="btn-group">' . $online . $edit . $delete . '</span>' . PHP_EOL . '
					</div>' . PHP_EOL;
                $select .= self::getTreeStructurePage($sql->get('id'), $lvl + 1);
                if ($sql->counter + 1 == $sql->num()) {
                    $select .= '<div class="droppages"></div>';
                }
                $select .= '</li>' . PHP_EOL;
                $sql->next();
            }
            $select .= '</ul>';
        } elseif (!$select && $lvl == 0) {
            $select = lang::get('no_entries');
        }
        return $select;
    }
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:43,代码来源:misc.php

示例2:

    ?>
	
	<div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title pull-left"><?php 
    echo lang::get('media');
    ?>
</h3>
                    <?php 
    if (dyn::get('user')->hasPerm('media[edit]')) {
        ?>
					<div class="btn-group pull-right">
						<a href="<?php 
        echo url::backend('media', ['subpage' => 'files', 'action' => 'add', 'id' => $id]);
        ?>
" class="btn btn-sm btn-default"><?php 
        echo lang::get('add');
        ?>
</a>
					</div>
                    <?php 
    }
    ?>
					<div class="clearfix"></div>
                </div>
				<div class="panel-body">
					<form action="index.php" method="get">
						<input type="hidden" name="page" value="media" />
						<input type="hidden" name="subpage" value="files" />
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:31,代码来源:media.files.php

示例3:

<?php

$action = type::super('action', 'string');
$id = type::super('id', 'int', 0);
$subpage = type::super('subpage', 'string', 'pages');
$structure_id = type::super('structure_id', 'int');
if ($subpage == 'popup') {
    backend::addSubnavi('Popup', url::backend('structure', ['subpage' => 'popup']));
}
if (dyn::get('user')->hasPerm('page[edit]') || dyn::get('user')->hasPerm('page[delete]') || dyn::get('user')->hasPerm('page[content]')) {
    backend::addSubnavi(lang::get('pages'), url::backend('structure', ['subpage' => 'pages']));
    backend::addSubnavi(lang::get('blocks'), url::backend('structure', ['subpage' => 'blocks']));
}
if (dyn::get('user')->hasPerm('page[module]')) {
    backend::addSubnavi(lang::get('modules'), url::backend('structure', ['subpage' => 'module']));
}
include_once backend::getSubnaviInclude();
开发者ID:pasterntt,项目名称:dynaoCMS,代码行数:17,代码来源:structure.php

示例4:

<div class="clearfix"></div>
<div class="row">
	<div class="col-lg-12">
    	<div id="ajax-content"></div>
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title pull-left"><?php 
echo lang::get('media');
?>
</h3>
                <?php 
if (dyn::get('user')->hasPerm('media[category][edit]')) {
    ?>
				<div class="btn-group pull-right">
					<a href="<?php 
    echo url::backend('media', ['subpage' => 'category', 'action' => 'add', 'pid' => $pid]);
    ?>
" class="btn btn-sm btn-default"><?php 
    echo lang::get('add');
    ?>
</a>
				</div>
                <?php 
}
?>
				<div class="clearfix"></div>
			</div>
			<?php 
echo $table->show();
?>
		</div>
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:31,代码来源:media.category.php

示例5:

    if ($action == 'online' && dyn::get('user')->hasPerm('page[edit]')) {
        $sql = sql::factory();
        $sql->query('SELECT online FROM ' . sql::table('structure') . ' WHERE id=' . $id)->result();
        $online = $sql->get('online') ? 0 : 1;
        $sql->setTable('structure');
        $sql->setWhere('id=' . $id);
        $sql->addPost('online', $online);
        $sql->update();
        echo message::success(lang::get('save_status'));
        $action = '';
    }
    if ($action == '') {
        if (ajax::is()) {
            echo pageMisc::getTreeStructurePage();
            exit;
        }
        $button = [];
        if (dyn::get('user')->hasPerm('page[edit]')) {
            $button = ['<a class="btn btn-sm btn-default" href="' . url::backend('structure', ['subpage' => 'pages', 'action' => 'add']) . '">' . lang::get('add') . '</a>'];
        }
        ?>
	<div class="row" id="structure-body"><?php 
        echo bootstrap::panel(lang::get('pages'), $button, pageMisc::getTreeStructurePage());
        ?>
</div>
	<?php 
        if (dyn::get('user')->hasPerm('page[edit]')) {
            layout::addJs("layout/js/structureSort.js");
        }
    }
}
开发者ID:pasterntt,项目名称:dynaoCMS,代码行数:31,代码来源:structure.pages.php

示例6:

<?php

backend::addSubNavi(lang::get('import'), url::backend('import', ['subpage' => 'import']));
backend::addSubNavi(lang::get('export'), url::backend('import', ['subpage' => 'export']));
$page = type::super('page', 'string');
$subpage = type::super('subpage', 'string');
$action = type::super('action', 'string');
include_once backend::getSubnaviInclude('imexport');
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:8,代码来源:import.php

示例7:

<?php

backend::addSubnavi(lang::get('overview'), url::backend('dashboard', ['subpage' => 'overview']));
include_once backend::getSubnaviInclude();
?>
		
开发者ID:pasterntt,项目名称:dynaoCMS,代码行数:5,代码来源:dashboard.php

示例8:

<?php

if (!dyn::get('user')->hasPerm('admin[user]')) {
    echo message::danger(lang::get('access_denied'));
    return;
}
$action = type::super('action', 'string');
$id = type::super('id', 'int', 0);
backend::addSubnavi(lang::get('overview'), url::backend('user', ['subpage' => 'overview']));
include_once backend::getSubnaviInclude();
开发者ID:pasterntt,项目名称:dynaoCMS,代码行数:10,代码来源:user.php

示例9: BackendShow

    protected static function BackendShow($name, $pagename)
    {
        $table = table::factory(['class' => ['js-sort']]);
        $table->setSql('SELECT * FROM ' . sql::table('metainfos') . ' WHERE `type` = "' . $name . '"');
        $table->addRow()->addCell()->addCell('Name')->addCell('Aktion');
        $table->addCollsLayout('25,*,110');
        $table->addSection('tbody');
        if ($table->numSql()) {
            while ($table->isNext()) {
                $edit = '';
                $delete = '';
                if (dyn::get('user')->hasPerm('metainfos[edit]')) {
                    $edit = '<a href="' . url::backend('meta', ['subpage' => $pagename, 'action' => 'edit', 'id' => $table->get('id')]) . '" class="btn btn-sm  btn-default fa fa-pencil-square-o"></a>';
                }
                if (dyn::get('user')->hasPerm('metainfos[delete]')) {
                    $delete = '<a href="' . url::backend('meta', ['subpage' => $pagename, 'action' => 'delete', 'id' => $table->get('id')]) . '" class="btn btn-sm btn-danger delete fa fa-trash-o"></a>';
                }
                $table->addRow(['data-id' => $table->get('id')])->addCell('<i class="fa fa-sort"></i>')->addCell($table->get('name'))->addCell('<span class="btn-group">' . $edit . $delete . '</span>');
                $table->next();
            }
        } else {
            $table->addRow()->addCell(lang::get('no_entries'), ['colspan' => 3]);
        }
        ?>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title pull-left"><?php 
        echo backend::getSubpageName();
        ?>
</h3>
                <?php 
        if (dyn::get('user')->hasPerm('metainfos[edit]')) {
            ?>
				<div class="btn-group pull-right">
					<a href="<?php 
            echo url::backend('meta', ['subpage' => $pagename, 'action' => 'add']);
            ?>
" class="btn btn-sm btn-default"><?php 
            echo lang::get('add');
            ?>
</a>
				</div>
                <?php 
        }
        ?>
				<div class="clearfix"></div>
			</div>
			<?php 
        echo $table->show();
        ?>
		</div>
	</div>
</div>
		<?php 
    }
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:57,代码来源:metainfosPage.php

示例10:

<?php

backend::addSubNavi(lang::get('faq'), url::backend('seo', ['subpage' => 'faq']));
backend::addSubNavi(lang::get('settings'), url::backend('seo', ['subpage' => 'settings']));
backend::addSubNavi(lang::get('setup'), url::backend('seo', ['subpage' => 'setup']));
$action = type::super('action', 'string', '');
include_once backend::getSubnaviInclude('seo');
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:7,代码来源:seo.php

示例11:

        ?>
	<div class="row">
		<div class="col-lg-12">
        	<div id="ajax-content"></div>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title pull-left"><?php 
        echo lang::get('pages');
        ?>
</h3>
                    <?php 
        if (dyn::get('user')->hasPerm('page[edit]')) {
            ?>
					<div class="btn-group pull-right">
						<a class="btn btn-sm btn-default" href="<?php 
            echo url::backend('structure', ['subpage' => 'pages', 'action' => 'add']);
            ?>
"><?php 
            echo lang::get('add');
            ?>
</a>
					</div>
                    <?php 
        }
        ?>
					<div class="clearfix"></div>
				</div>
				<div class="panel-body">
				<?php 
        echo pageMisc::getTreeStructurePage();
        ?>
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:31,代码来源:structure.pages.php

示例12: generateButton

 public static function generateButton($output, $structure_id)
 {
     // Bugfix UTF-8
     $output = mb_convert_encoding($output, 'HTML-ENTITIES', 'UTF-8');
     $dom = new DOMDocument();
     @$dom->loadHTML($output);
     $xpath = new DOMXpath($dom);
     $buttons = $xpath->query(".//div[@class='pull-right']")->item(0);
     // Neuen Button erstellen
     $seobutton = $dom->createElement('a', lang::get('seo'));
     $seobutton->setAttribute('class', 'btn btn-sm btn-default');
     $url = url::backend('structure', ['subpage' => 'pages', 'action' => 'seo', 'id' => $structure_id]);
     $seobutton->setAttribute('href', str_replace('&amp;', '&', $url));
     // Ihn vor den ersten Button einfügen (prependChild gibt's nicht in PHP)
     $firstButton = $buttons->getElementsByTagName('a')->item(0);
     $buttons->insertBefore($seobutton, $firstButton);
     $output = preg_replace('/^<!DOCTYPE.+?>/', '', str_replace(['<html>', '</html>', '<body>', '</body>'], '', $dom->saveHTML()));
     return $output;
 }
开发者ID:pasternt,项目名称:dynaoCMS,代码行数:19,代码来源:seoPage.php

示例13: function

<?php

userPerm::add('metainfos[edit]', lang::get('metainfos[edit]'));
userPerm::add('metainfos[delete]', lang::get('metainfos[delete]'));
if (dyn::get('user')->hasPerm('metainfos[edit]') || dyn::get('user')->hasPerm('metainfos[delete]')) {
    backend::addAddonNavi(lang::get('metainfos'), url::backend('meta'), 'code', -1, function () {
        return dir::addon('metainfos', 'page' . DIRECTORY_SEPARATOR . 'meta.php');
    });
}
$page = type::super('page', 'string');
$subpage = type::super('subpage', 'string');
$action = type::super('action', 'string');
$structure_id = type::super('structure_id', 'string');
if ($page == 'structure' && $subpage == 'pages' && is_null($structure_id) && $action == 'edit') {
    extension::add('FORM_BEFORE_ACTION', function ($form) {
        $form = metainfos::getMetaInfos($form, 'structure');
    });
}
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:18,代码来源:config.php

示例14: while

    $sql = sql::factory();
    $sql->setTable('community_user');
    $sql->setWhere('id=' . $id);
    $sql->delete();
}
if ($action == 'edit' || $action == 'add') {
    $form = form::factory('community_user', 'id=' . $id, 'index.php');
    $field = $form->addTextField('username', $form->get('username'));
    $field->fieldName('Username');
    $field = $form->addTextField('email', $form->get('email'));
    $field->fieldName('E-Mail');
    if (addonConfig::isActive('medienmanager')) {
        $field = $form->addTextField('avatar', $form->get('avatar'));
        $field->fieldName('Profilbild');
    }
    $field = $form->addCheckboxField('admin', $form->get('admin'));
    $field->add(1, 'Admin');
    $form->show();
}
if ($action == '') {
    $table = table::factory();
    $table->setSql('SELECT * FROM ' . sql::table('community_user'));
    $table->addRow()->addCell('Id')->addCell(lang::get('username'))->addCell(lang::get('action'));
    while ($table->isNext()) {
        $edit = '<a href="' . url::backend('community', ['subpage' => 'user', 'action' => 'edit', 'id' => $table->get('id')]) . '" class="btn btn-sm btn-default fa fa-pencil-square-o></a>';
        $delete = '<a href="' . url::backend('community', ['subpage' => 'user', 'action' => 'delete', 'id' => $table->get('id')]) . '" class="btn btn-sm btn-danger fa fa-trash-o"></a>';
        $table->addRow()->addCell($table->get('id'))->addCell($table->get('username'))->addCell('<span class="btn-group">' . $edit . $delete . '</span>');
        $table->next();
    }
    echo $table->show();
}
开发者ID:pasterntt,项目名称:dynao-CMS,代码行数:31,代码来源:community.user.php

示例15: while

        }
    }
    $button = '<a href="' . url::backend('user', ['subpage' => 'overview']) . '" class="btn btn-sm btn-default">' . lang::get('back') . '</a>';
    ?>
	<div class="row"><?php 
    echo bootstrap::panel($title, [$button], $form->show());
    ?>
</div>
    <?php 
}
if ($action == '') {
    $table = table::factory();
    $table->addCollsLayout('*, 250,110');
    $table->addRow()->addCell("Name")->addCell(lang::get('email'))->addCell(lang::get('action'));
    $table->addSection('tbody');
    $table->setSql('SELECT * FROM ' . sql::table('user'));
    while ($table->isNext()) {
        $id = $table->get('id');
        $edit = '<a href="' . url::backend('user', ['subpage' => 'overview', 'action' => 'edit', 'id' => $id]) . '" class="btn btn-sm  btn-default fa fa-pencil-square-o"></a>';
        $delete = dyn::get('user')->get('id') == $id ? '' : '<a href="' . url::backend('user', ['subpage' => 'overview', 'action' => 'delete', 'id' => $id]) . '" class="btn btn-sm btn-danger fa fa-trash-o delete"></a>';
        $table->addRow()->addCell($table->get('firstname') . " " . $table->get('name'))->addCell($table->get('email'))->addCell('<span class="btn-group">' . $edit . $delete . '</span>');
        $table->next();
    }
    $button = '<a href="' . url::backend('user', ['subpage' => 'overview', 'action' => 'add']) . '" class="btn btn-sm btn-default">' . lang::get('add') . '</a>';
    ?>
    <div class="row"><?php 
    echo bootstrap::panel(lang::get('user'), [$button], $table->show(), ['table' => true]);
    ?>
</div>
    <?php 
}
开发者ID:pasterntt,项目名称:dynaoCMS,代码行数:31,代码来源:user.overview.php


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