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


PHP html::anchor方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->template->tasks = array(array('admin/blog/create', __('New Post')), array('admin/blog/comments', __('All comments')), array('admin/blog/settings', __('Edit Settings')));
     $this->head->title->append('Blog');
     $this->template->title = html::anchor('admin/blog', 'Blog') . ' | ';
 }
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:7,代码来源:comments.php

示例2: add_photo

 public function add_photo($id)
 {
     $album = ORM::factory("item", $id);
     access::required("view", $album);
     access::required("add", $album);
     access::verify_csrf();
     $file_validation = new Validation($_FILES);
     $file_validation->add_rules("Filedata", "upload::valid", "upload::type[gif,jpg,png,flv,mp4]");
     if ($file_validation->validate()) {
         // SimpleUploader.swf does not yet call /start directly, so simulate it here for now.
         if (!batch::in_progress()) {
             batch::start();
         }
         $temp_filename = upload::save("Filedata");
         try {
             $name = substr(basename($temp_filename), 10);
             // Skip unique identifier Kohana adds
             $title = item::convert_filename_to_title($name);
             $path_info = pathinfo($temp_filename);
             if (array_key_exists("extension", $path_info) && in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {
                 $movie = movie::create($album, $temp_filename, $name, $title);
                 log::success("content", t("Added a movie"), html::anchor("movies/{$movie->id}", t("view movie")));
             } else {
                 $photo = photo::create($album, $temp_filename, $name, $title);
                 log::success("content", t("Added a photo"), html::anchor("photos/{$photo->id}", t("view photo")));
             }
         } catch (Exception $e) {
             unlink($temp_filename);
             throw $e;
         }
         unlink($temp_filename);
     }
     print "File Received";
 }
开发者ID:krgeek,项目名称:gallery3,代码行数:34,代码来源:simple_uploader.php

示例3: action_addFolder

 public function action_addFolder()
 {
     $properties = array();
     $properties["owner"] = Wi3::inst()->sitearea->auth->user;
     $properties["adminright"] = Wi3::inst()->sitearea->auth->user->username;
     $properties["title"] = "Nieuwe map";
     $properties["type"] = "folder";
     $properties["created"] = time();
     $properties["filename"] = $properties["created"];
     // needs to be unique
     $settings = array();
     if (isset($_POST["refid"]) and !empty($_POST["refid"]) and isset($_POST["location"]) and !empty($_POST["location"])) {
         $settings["under"] = (int) preg_replace("/[^0-9]/", "", $_POST["refid"]);
     }
     // Add it
     $folder = Wi3::inst()->sitearea->files->add($properties, $settings);
     if ($folder) {
         // Remove cache of everything, since we do not know how this change affects the site
         Wi3::inst()->cache->removeAll();
         $li = html::anchor($folder->id, $folder->title);
         if ($folder->lft == 1 and $folder->rgt == 2) {
             // The new folder is the only folder there is. For the javascript menu to work properly, we need to reload the page.
             echo json_encode(array("scriptsbefore" => array("reload" => "window.location.reload();")));
         } else {
             echo json_encode(array("alert" => "map is aangemaakt", "scriptsafter" => array("adminarea.currentTree().addNode('treeItem_" . $folder->id . "','" . addslashes($li) . "')")));
         }
     } else {
         echo json_encode(array("alert" => "map kon NIET aangemaakt worden"));
     }
 }
开发者ID:azuya,项目名称:Wi3,代码行数:30,代码来源:ajax.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     // Inicio de Session
     $this->session = Session::instance();
     // Si la variable cat no está definida, definirla
     if (!isset($_SESSION['cat'])) {
         $_SESSION['cat'] = 0;
     }
     if (!isset($_SESSION['localidad'])) {
         $_SESSION['localidad'] = 0;
     }
     $this->template->links = array('Acerca de IMGListados' => 'about', 'Datos' => 'datos', 'Rubros' => 'rubros', 'Exportar Listados' => 'listados');
     $this->template->footer = 'Copyright ' . $this->thiYear($this->y) . ' - ' . html::anchor('http://www.imgdigital.com.ar', 'IMG Digital', array('target' => '_blank')) . '- ' . html::anchor('http://www.imgdigital.com.ar/imglistados', 'IMGListados', array('target' => '_blank'));
     $this->template->login = new View('login');
     // Da acceso a todos los controladores la base de datos
     $this->db = Database::instance();
     //Listado de Categorías
     $this->categorias = ORM::factory('categoria')->select_list();
     //$this->template->cats =  $this->categorias;
     //Listado de Localidades
     $this->localidades = ORM::factory('localidad')->select_list();
     //$this->template->localidades = $this->localidades;
     //$this->profiler = new Profiler;
 }
开发者ID:bicho44,项目名称:imglistados,代码行数:25,代码来源:website.php

示例5: index

 public function index()
 {
     $subview = new View('generic/grid');
     $subview->tab = 'main';
     $subview->section = 'general';
     // What are we working with here?
     $base = $this->getBaseModelObject();
     // Setup the base grid object
     $grid = jgrid::grid('Location', array('caption' => 'Locations'));
     // If there is a base model that contains an account_id,
     // then we want to show locations only that relate to this account
     $base = $this->getBaseModelObject();
     if ($base and !empty($base['account_id'])) {
         // Set a where clause, if we're playing plug-in to someone else
         $grid->where('account_id = ', $base['account_id']);
     }
     // Add the base model columns to the grid
     $grid->add('location_id', 'ID', array('hidden' => TRUE, 'key' => TRUE));
     $grid->add('name', 'Name');
     $grid->add('domain', 'Domain');
     // Add the actions to the grid
     $grid->addAction('locationmanager/edit', 'Edit', array('arguments' => 'location_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     $grid->addAction('locationmanager/delete', 'Delete', array('arguments' => 'location_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     // Produces the grid markup or JSON
     $subview->grid = $grid->produce();
     $subview->gridMenu = html::anchor('/locationmanager/create', '<span>Add New Location</span>', array('class' => 'qtipAjaxForm'));
     // Add our view to the main application
     $this->views[] = $subview;
 }
开发者ID:swk,项目名称:bluebox,代码行数:29,代码来源:locationmanager.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->template->tasks = array(array('admin/user/create', __('New User')));
     $this->head->title->append(__('User'));
     $this->template->title = html::anchor('admin/user', __('User')) . ' | ';
 }
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:7,代码来源:user.php

示例7: action_index

 public function action_index()
 {
     $calendar = new Calendar(Arr::get($_GET, 'month', date('m')), Arr::get($_GET, 'year', date('Y')));
     $calendar->attach($calendar->event()->condition('timestamp', time())->output(html::anchor('http://google.de', 'google')));
     $data = array('content' => $calendar->render());
     $this->request->response = new View('index', $data);
 }
开发者ID:antpaw,项目名称:kohana_calendar,代码行数:7,代码来源:usage-example.php

示例8: index

 /**
  * ****************************************************
  * HOME
  * ****************************************************
  */
 function index()
 {
     $vars = array();
     $img = array();
     $vars['img'] =& $img;
     $img['up'] = 'images/icons/up.png';
     $img['down'] = 'images/icons/down.png';
     $img['edit'] = 'images/icons/edit.png';
     $img['delete'] = 'images/icons/delete.png';
     // action & id
     $action = $this->validate->get->getRaw('action');
     $action_list = array();
     if (in_array($action, $action_list)) {
         $this->{$action}();
     }
     $vars['nagavitor'] = $this->forum->get_nagavitor();
     $vars['board_move_data'] = $this->forum->get_redirect_data();
     $cats = $this->forum->get_category();
     $vars['cats'] = array();
     foreach ($cats as $key => $cat) {
         $newcat = array();
         $newcat['up'] = $newcat['down'] = '';
         if ($key - 1 >= 0) {
             $newcat['up'] = html::anchor('forum.php?c=admin&amp;m=movecat&amp;cat1=' . $cat['cat_id'] . '&amp;order1=' . $cat['cat_order'] . '&amp;cat2=' . $cats[$key - 1]['cat_order'] . '&amp;order2=' . $cats[$key - 1]['cat_order'], html::img($img['up']));
         }
         if ($key + 2 <= count($cats)) {
             $newcat['down'] = html::anchor('forum.php?c=admin&amp;m=movecat&amp;cat1=' . $cat['cat_id'] . '&amp;order1=' . $cat['cat_order'] . '&amp;cat2=' . $cats[$key + 1]['cat_id'] . '&amp;order2=' . $cats[$key + 1]['cat_order'], html::img($img['down']));
         }
         $newcat['id'] = $cat['cat_id'];
         $newcat['name'] = $cat['name'];
         $vars['cats'][$key] = $newcat;
         unset($newcat);
         $vars['cats'][$key]['boards'] = array();
         $catkey = $key;
         // get the board data
         $boards = array();
         $this->forum->get_board_list2($cat['cat_id'], 0, $boards);
         foreach ($boards as $key => $board) {
             $newboard = array();
             $newboard['up'] = $newboard['down'] = '';
             $min_order = $this->forum->get_board_min_order($cat['cat_id'], $board['child_level'], $board['parent_id']);
             $max_order = $this->forum->get_board_max_order($cat['cat_id'], $board['child_level'], $board['parent_id']);
             if ($board['board_order'] > $min_order) {
                 $newboard['up'] = html::anchor('forum.php?c=admin&amp;m=moveboard&amp;board1=' . $board['board_id'] . '&amp;order1=' . $board['board_order'] . '&amp;board2=' . $boards[$key - 1]['board_id'] . '&amp;order2=' . $boards[$key - 1]['board_order'], html::img($img['up']));
             }
             if ($board['board_order'] < $max_order) {
                 $newboard['down'] = html::anchor('forum.php?c=admin&amp;m=moveboard&amp;board1=' . $board['board_id'] . '&amp;order1=' . $board['board_order'] . '&amp;board2=' . $boards[$key + 1]['board_id'] . '&amp;order2=' . $boards[$key + 1]['board_order'], html::img($img['down']));
             }
             $newboard['level'] = $board['child_level'];
             $newboard['id'] = $board['board_id'];
             $newboard['name'] = $board['name'];
             $newboard['child_level'] = $board['name'];
             $newboard['parent'] = $board['parent_id'];
             $vars['cats'][$catkey]['boards'][] = $newboard;
             unset($newboard);
         }
     }
     $this->view->render('admin/index', $vars);
 }
开发者ID:phill104,项目名称:branches,代码行数:64,代码来源:admin.php

示例9: load

 public function load()
 {
     $view = new View('report/view');
     $this->template->title = 'Report Output';
     $this->template->content = $view;
     $this->page_breadcrumbs[] = html::anchor('report_viewer', 'Report Browser');
     $this->page_breadcrumbs[] = $this->template->title;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:8,代码来源:report_viewer.php

示例10: testButtonLinkCreation

 /**
  * Test button link creation
  */
 function testButtonLinkCreation()
 {
     $SUT = new Grid_Link('button');
     $SUT->action('controller/method')->text('someText');
     $link = $SUT->render();
     $expected = html::anchor('controller/method', '<button type="button">someText</button>');
     $this->assertEquals($expected, $link);
 }
开发者ID:vimofthevine,项目名称:grid,代码行数:11,代码来源:UnitTest.php

示例11: provideHelpLink

 public function provideHelpLink()
 {
     $session = Session::instance();
     $flashMessage =& Event::$data;
     $hash = 'message_' . time();
     $session->set($hash, $flashMessage);
     $flashMessage .= html::anchor('errorreporter/inform/' . $hash, 'Help!', array('class' => 'support_help qtipAjaxForm', 'style' => 'float:right;'));
 }
开发者ID:swk,项目名称:bluebox,代码行数:8,代码来源:ErrorReporter.php

示例12: getlastnews

 public static function getlastnews()
 {
     $orm = new fpp_news_Model();
     $orm = $orm->db2cls();
     $q = $orm->limit(0, 5)->fetch_all('id_news', 'DESC');
     $pages = html::anchor(url::base() . 'webserv/listnews/', "Ver mas");
     return View::factory("extras/news/lastnews")->set("news", $q)->set("pages", $pages)->render();
 }
开发者ID:brojasmeneses,项目名称:floreriarosabel,代码行数:8,代码来源:News.php

示例13: index

 public function index()
 {
     $user = user::active();
     user::logout();
     log::info("user", t("User %name logged out", array("name" => $user->name)), html::anchor("user/{$user->id}", $user->name));
     if ($this->input->get("continue")) {
         url::redirect($this->input->get("continue"));
     }
 }
开发者ID:xafr,项目名称:gallery3,代码行数:9,代码来源:logout.php

示例14: _user_info

 private function _user_info()
 {
     if ($user = $this->a2->get_user()) {
         $s = '<b>' . $user->username . ' <i>(' . $user->role . ')</i></b> ' . html::anchor('a2demo/logout', 'Logout');
     } else {
         $s = '<b>Guest</b> ' . html::anchor('a2demo/login', 'Login') . ' - ' . html::anchor('a2demo/create', 'Create account');
     }
     return '<div style="width:100%;padding:5px;background-color:#AFB6FF;">' . $s . '</div>';
 }
开发者ID:BlakeLucchesi,项目名称:kohanamodules2.3.2,代码行数:9,代码来源:a2demo.php

示例15: nagavitor

 function nagavitor($nagavitor, $seperator = '::')
 {
     $sets = array();
     foreach ($nagavitor as $k => $v) {
         $sets[] = html::anchor($v[0], $v[1]);
     }
     $sets = array_reverse($sets);
     return implode(' ' . $seperator . ' ', $sets);
 }
开发者ID:phill104,项目名称:branches,代码行数:9,代码来源:forum_helper.php


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