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


PHP url::encode方法代码示例

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


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

示例1: add

 /**
  * This will call the parentxontent controller to populate the view, while sending throught he type of content that it is 
  * as well as the paper_id, which will be used to autocomplete the paper combo box withg the correct result. 
  * @see Content_Controller::add()
  */
 public function add($paper_id = NULL)
 {
     $paper = orm::factory('paper', $paper_id);
     // load the paper so that we can get all the details required to populate the breadrumbs
     if ($paper->loaded) {
         $this->breadcrumbs->add()->url('products/papers/edit/' . url::encode($paper->name))->title(url::decode($paper->name));
         $this->breadcrumbs->add()->url('products/papers/technicals/index/' . $paper->id)->title('Technicals');
         $this->breadcrumbs->add()->url(false)->title('Add');
     }
     parent::add('technical', $paper->id);
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:16,代码来源:technicals.php

示例2: view

 /** 
  * This page will display a page much like the page for the paper products. 
  * 
  * the expcetion will be it will have multiple images and missing some of the relationships that 
  * the papers have.
  * 
  * 
  * @param unknown_type $name
  */
 public function view($name)
 {
     // clean the input, remove and opf the escape characters
     $name = url::encode($name);
     $industrial = orm::factory('industrial')->where('name', $name)->find_all();
     //if ($industrial->loaded)
     //{
     $view = new view(url::location());
     $view->industrial = $industrial[0];
     $this->template->title = ucwords($name);
     $this->template->content = $view;
     //}
     //else
     //{
     // unable to find the industrial item
     //}
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:26,代码来源:industrials.php

示例3: actionLicense

 public function actionLicense($path)
 {
     $module = zotop::model('zotop.module');
     $modules = $module->getUnInstalled();
     if (empty($path) || !dir::exists($path)) {
         msg::error(array('content' => zotop::t('模块不存在,请确认是否已经上传该模块?'), 'description' => zotop::t("路径:{$path}")));
     }
     $licenseFile = $path . DS . 'license.txt';
     if (!file::exists($licenseFile)) {
         zotop::redirect('zotop/module/install', array('path' => url::encode($path)));
         exit;
     }
     $license = file::read($licenseFile);
     $page = new dialog();
     $page->set('title', '许可协议');
     $page->set('license', html::decode($license));
     $page->set('next', zotop::url('zotop/module/install', array('path' => url::encode($path))));
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:19,代码来源:module.php

示例4: actionUpload

 public function actionUpload($globalid, $field, $image = '')
 {
     $file = zotop::model('zotop.image');
     if (form::isPostBack()) {
         $file->globalid = $globalid;
         $file->field = $field;
         $file->description = request::post('description');
         $files = $file->upload();
         if (!$file->error() && isset($files[0]['path'])) {
             msg::success('图片上传成功', zotop::url('zotop/image/preview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($files[0]['path']))));
         }
         msg::error($file->msg());
     }
     $page = new dialog();
     $page->set('title', '本地上传');
     $page->set('navbar', $this->navbar($globalid, $field, $image));
     $page->set('alowexts', $file->upload->alowexts);
     $page->set('maxsize', $file->upload->maxsize);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:20,代码来源:image.php

示例5: actionImageFromLocal

 public function actionImageFromLocal($globalid, $field, $image)
 {
     $upload = zotop::model('zotop.upload');
     $upload->alowexts = array('jpg', 'jpeg', 'gif', 'png', 'bmp');
     if (form::isPostBack()) {
         $upload->bind('globalid', request::post('globalid'));
         $upload->bind('field', request::post('field'));
         $upload->bind('description', request::post('description'));
         $files = $upload->save();
         $image = $files[0];
         if ($upload->error() == 0 && $image) {
             msg::success($upload->msg(), zotop::url('zotop/upload/imagePreview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($image['path']))));
         }
         msg::error($upload->msg());
     }
     $page = new dialog();
     $page->set('title', '本地上传');
     $page->set('navbar', $this->navbar($globalid, $field, $image));
     $page->set('alowexts', $upload->alowexts);
     $page->set('maxsize', $upload->maxsize);
     $page->display();
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:22,代码来源:upload.php

示例6: confirm

        ?>
</strong><br/>
	     				<i><?php 
        echo $paper->style->name;
        ?>
</i>
	     			</td>
		     		<td class="align-center"><?php 
        echo $paper->status == 'approved' ? '<span class="icon-approved">&#x2714;</span>' : '<span class="icon-pending">&#x2718;</span>';
        ?>
</td>
		     		<td><a href="<?php 
        echo url::routes_area();
        ?>
edit/<?php 
        echo url::encode($paper->name);
        ?>
" title="Edit <?php 
        echo $paper->name;
        ?>
" class="text-edit"><span>Edit</span></a> <a href="<?php 
        echo url::routes_area() . 'delete/' . $paper->id;
        ?>
" class="text-delete" title="Delete <?php 
        echo $paper->name;
        ?>
" onclick="return confirm('Do you really want to delete the paper item <?php 
        echo $paper->name;
        ?>
?');"><span>Delete</span></a></td>
		     	</tr>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index_list.php

示例7: foreach

"><span>Overview</span></a>
		</li>
		<li>
			<a href="javascript:void(null);" class="current"><span>Sheets</span></a>
		</li>
		<li>
			<a href="products/papers/technicals/index/<?php 
echo $paper->id;
?>
" ><span>Technical</span></a>
		</li>
	</ul><!--/sub-navigation -->
	
	<div class="navigation">
		<a href="<?php 
echo url::routes_area() . 'add/' . url::encode($paper->name);
?>
" class="button"><span>Add New Sheet</span></a>
	</div>
</div>

<?php 
if (count($paper->collections)) {
    ?>
	<?php 
    foreach ($paper->collections as $collection) {
        ?>
		<?php 
        foreach ($collection->pigments as $pigment) {
            ?>
			<?php 
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index.php

示例8: array

	});
</script>
<div id="header">
	<h2 style="text-align:left;"><?php 
echo $title;
?>
</h2>
	<h3>
		<a href="<?php 
echo zotop::config('site.index');
?>
">网站首页</a>
		<b>|</b>
		<a href="javascript:void(0);" class="addFavorite">加入收藏夹</a>
		<b>|</b>
		<a href="<?php 
echo zotop::url('zotop/login/shortcut', array('title' => url::encode($title . ' ' . zotop::config('site.name')), 'url' => url::encode(url::location())));
?>
">设为桌面图标</a>		
	</h3>
</div>

<?php 
block::header(array('title' => $title, 'icon' => 'user', 'action' => ''));
form::header(array('title' => '', 'description' => ' 请输入您的帐户和密码登录', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('帐 户(U)'), 'name' => 'username', 'value' => zotop::cookie('admin.username'), 'valid' => 'required:true'));
form::field(array('type' => 'password', 'label' => zotop::t('密 码(P)'), 'name' => 'password', 'value' => '', 'valid' => 'required:true'));
form::buttons(array('type' => 'submit', 'value' => '登录'), array('type' => 'button', 'name' => 'options', 'value' => '选项'));
form::footer();
block::footer();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:login.php

示例9: array

    ?>
"><?php 
    echo html::image($img['path']);
    ?>
<span class="zotop-icon zotop-icon-ok"></span></div>
			<div class="title">
				<a href="<?php 
    echo zotop::url('zotop/image/preview', array('globalid' => $globalid, 'field' => $field, 'image' => url::encode($img['path'])));
    ?>
">预览</a>
				<a href="<?php 
    echo zotop::url('zotop/image/edit', array('image' => url::encode($img['path'])));
    ?>
" class="dialog">编辑</a>
				<a href="<?php 
    echo zotop::url('zotop/image/delete', array('image' => url::encode($img['path']), 'referer' => url::encode(url::location())));
    ?>
" class="confirm">删除</a>
			</div>
		</li>
	<?php 
}
?>
	</ul>
</div>
<div class="clearfix"><?php 
echo $pagination;
?>
</div>
<div class="buttons">
	<?php 
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:library.php

示例10: array

		$('button[name=options]').click(function(){
			location.href = "<?php 
echo zotop::url('site://');
?>
";
		});
	});
</script>
<div id="topbar">
	<a href="<?php 
echo zotop::url('site://');
?>
">网站首页</a>
	<b>|</b>
	<a href="javascript:void(0);" class="addFavorite">加入收藏夹</a>
	<b>|</b>
	<a href="<?php 
echo zotop::url('zotop/login/shortcut', array('title' => url::encode($title), 'url' => url::encode(url::location())));
?>
">设为桌面图标</a>		
</div>

<?php 
box::header(array('title' => $title, 'icon' => 'user', 'action' => ''));
form::header(array('title' => '', 'description' => '请输入您的帐户和密码登录', 'class' => 'small'));
form::field(array('type' => 'text', 'label' => zotop::t('帐 户'), 'name' => 'username', 'value' => zotop::cookie('username'), 'valid' => 'required:true'));
form::field(array('type' => 'password', 'label' => zotop::t('密 码'), 'name' => 'password', 'value' => '', 'valid' => 'required:true'));
form::buttons(array('type' => 'submit', 'value' => '登录'), array('type' => 'button', 'name' => 'options', 'value' => '取消'));
form::footer();
box::footer();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:index.php

示例11: array

	//图片预览
	$(function(){
		$('#image-preview').zoomImage(500,300,true);
	});

</script>
<?php 
$this->navbar();
?>
<div style="text-align:right;padding:3px;">
	<span class="zotop-icon zotop-icon-delete"></span><a href="<?php 
echo zotop::url('zotop/image/delete', array('image' => url::encode($image['path']), 'referer' => url::encode(url::location())));
?>
" class="confirm">删除图片</a>
	<span class="zotop-icon zotop-icon-edit"></span><a href="<?php 
echo zotop::url('zotop/image/edit', array('image' => url::encode($image['path'])));
?>
" class="dialog">编辑图片</a>
</div>

<div id="image-preview" style="margin:10px;text-align:center;height:300px;overflow:hidden;">
<?php 
echo html::image($image['path'], array('width' => '100%'));
?>
</div>
<div style="text-align:center;padding:3px;">
	<span>名称:<?php 
echo $image['name'];
?>
 大小:<?php 
echo format::byte($image['size']);
开发者ID:dalinhuang,项目名称:zotop,代码行数:31,代码来源:preview.php

示例12: update

 public function update()
 {
     if ($this->access->allowed('papers', 'update')) {
         // check the inputs
         $input = Validation::factory($this->input->post())->pre_filter('trim')->add_rules('name', 'required')->add_rules('id', 'required');
         if ($input->validate()) {
             $paper = ORM::factory('paper')->find($this->input->post('id'));
             if ($paper->loaded) {
                 if ($this->input->post('name') != $paper->name) {
                     // check to make sure that the paper they are adding is unique
                     $existing = ORM::factory('paper')->where('name', $this->input->post('name'))->find();
                     if ($existing->loaded) {
                         $this->notification->add($this->i18n['system.paper.exists'], $this->input->post('name'));
                         url::redirect(url::area() . 'edit/' . $paper->name);
                         // redirect back to the edit page
                     }
                 }
                 $paper->colors = $this->input->post('colors') ? $this->input->post('colors') : array();
                 $paper->applications = $this->input->post('applications') ? $this->input->post('applications') : array();
                 $paper->characteristics = $this->input->post('characteristics') ? $this->input->post('characteristics') : array();
                 $paper->environmentals = $this->input->post('environmentals') ? $this->input->post('environmentals') : array();
                 $paper->status = $this->input->post('status');
                 $paper->name = $this->input->post('name');
                 $paper->description = $this->input->post('description');
                 $paper->brief = $this->input->post('brief');
                 $paper->availablity_id = $this->input->post('availablity_id');
                 $paper->price_site = $this->input->post('price_site');
                 $paper->price_style = $this->input->post('price_style');
                 $paper->type = $this->input->post('type');
                 $paper->popular = $this->input->post('popular') == 'true' ? true : false;
                 $paper->style_id = $this->input->post('style_id');
                 $ids = array();
                 if (is_array($this->input->post('features'))) {
                     // loop thorugh each of the features which were added and add them to the paper
                     foreach ($this->input->post('features') as $feature_name) {
                         $feature = orm::factory('feature');
                         $feature = $feature->set($feature_name);
                         $ids[] = $feature->id;
                     }
                 }
                 $ids = array_unique($ids);
                 // delete all the entreis for that paper/feature, then readd them.
                 ORM::factory('features_paper')->where('paper_id', $paper->id)->delete_all();
                 foreach ($ids as $key => $feature_id) {
                     $features_paper = ORM::factory('features_paper');
                     $features_paper->feature_id = $feature_id;
                     $features_paper->paper_id = $paper->id;
                     $features_paper->order = $key;
                     $features_paper->save();
                 }
                 $ids = array();
                 if (is_array($this->input->post('tips'))) {
                     // loop thorugh each of the features which were added and add them to the paper
                     foreach ($this->input->post('tips') as $tip_name) {
                         $tip = orm::factory('tip');
                         $tip = $tip->set($tip_name);
                         $ids[] = $tip->id;
                     }
                 }
                 $ids = array_unique($ids);
                 // delete all the entreis for that paper/feature, then readd them.
                 ORM::factory('papers_tip')->where('paper_id', $paper->id)->delete_all();
                 foreach ($ids as $key => $tip_id) {
                     $papers_tip = ORM::factory('papers_tip');
                     $papers_tip->tip_id = $tip_id;
                     $papers_tip->paper_id = $paper->id;
                     $papers_tip->order = $key;
                     $papers_tip->save();
                 }
                 $images = $this->input->post('images');
                 // check to see if we need to update the images (any of them)
                 if (count($images)) {
                     // make sure that the file location exists, if not create it
                     $cms = DOCROOT . 'application/' . SITE . '/media/cms/products/papers/' . $paper->id;
                     if (file::tree($cms)) {
                         foreach ($images as $type => $location) {
                             $paper->{$type} = $location;
                             if (file_exists(DOCROOT . 'upload/' . $location)) {
                                 //@todo change this so that the uploads folder is not part of the info sent in
                                 if (rename(DOCROOT . 'upload/' . $location, $cms . '/' . $location)) {
                                     $this->notification->add($this->i18n['cms.image.success'], $type);
                                 } else {
                                     $this->notification->add($this->i18n['cms.image.error'], $type);
                                 }
                             } else {
                                 $this->notification->add($this->i18n['cms.image.error'], $type);
                             }
                         }
                     } else {
                         $this->notification->add($this->i18n['cms.folder.error']);
                     }
                 }
                 if ($paper->save()) {
                     $this->notification->add($this->i18n['system.paper.success'], $paper->name);
                 } else {
                     $this->notification->add($this->i18n['system.paper.error'], $paper->name);
                 }
                 url::redirect(url::area() . 'edit/' . url::encode($paper->name));
             } else {
                 $this->notification->add($this->i18n['system.paper.error'], $this->input->post('name'));
//.........这里部分代码省略.........
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:101,代码来源:papers.php

示例13: delete

 public function delete($id = NULL)
 {
     if ($this->access->allowed('sheets', 'delete')) {
         if ($id) {
             $sheet = ORM::factory('sheet')->find($id);
             $paper_name = $sheet->pigment->collection->paper->name;
             if ($sheet->loaded) {
                 if ($sheet->delete()) {
                     $this->notification->add($this->i18n['system.sheet.success']);
                 } else {
                     $this->notification->add($this->i18n['system.sheet.error']);
                 }
             } else {
                 $this->notification->add($this->i18n['system.sheet.failed']);
             }
         } else {
             $this->notification->add($this->i18n['system.sheet.failed']);
         }
     } else {
         url::failed();
     }
     if (!request::is_ajax()) {
         url::redirect(url::routes_area() . 'index/' . url::encode($paper_name));
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:25,代码来源:sheets.php

示例14: date

"><?php 
        echo date('j F Y', $lightbox->created);
        ?>
</div>
	     			</td>
	     			<td width="20%"><?php 
        echo count($lightbox->papers);
        ?>
 item<?php 
        echo count($lightbox->papers) == 1 ? '' : 's';
        ?>
</td>
	     			<td width="30%">
	     				<a href="#todo" class="button style-account"><span>Email</span></a>
	     				<a href="<?php 
        echo url::routes_area() . 'view/' . $lightbox->creator->email . '/' . url::encode($lightbox->name);
        ?>
" class="button style-account"><span>Permalink</span></a>
	     			</td>
		     		<td width="20%" class="align-right"><a href="<?php 
        echo url::routes_area() . 'view/' . $lightbox->creator->email . '/' . rawurlencode($lightbox->name);
        ?>
" class="button button-account"><span>Edit</span></a> <a href="<?php 
        echo url::routes_area() . 'delete/' . $lightbox->id;
        ?>
" class="button button-account icon-remove" onclick="return confirm('Do you really want to delete this lightbox?');"><span>Delete</span></a></td>
		     	</tr>
	        <?php 
    }
    ?>
		<?php 
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index_list.php

示例15: array

<?php 
echo html::msg(zotop::t('<h2>如何安装新模块?</h2><div>1,安装模块前,请确认将该模块文件夹上传至服务器上的模块目录下面目录下面({$modules})</div><div>2,上传完成后,<a class="zotop-reload" href="javascript:location.reload();">刷新本页面</a>,模块将会出现在下面的待安装模块列表中,点击模块后面的 <a>安装</a>,根据系统提示完成模块安装</div>', array('modules' => ZOTOP_URL_MODULES)));
block::header('待安装模块');
if (empty($modules)) {
    echo '<div class="zotop-empty"><span>暂时没有待安装模块</span></div>';
} else {
    $column = array();
    $column['logo w40 center'] = '标识';
    $column['name'] = '名称';
    $column['version w50 center'] = '版本号';
    $column['manage edit'] = '安装';
    $column['manage delete'] = '删除';
    table::header('list', $column);
    foreach ($modules as $module) {
        $column = array();
        $column['logo center'] = html::image(empty($module['icon']) ? '$theme/image/skin/none.png' : $module['icon'], array('width' => '32px'));
        $column['name'] = '<a><b>' . $module['name'] . ' ( ' . $module['id'] . ' )</b></a><h5>' . $module['description'] . '</h5>';
        $column['version center'] = $module['version'];
        $column['manage edit'] = html::a(zotop::url('zotop/module/uninstalled', array('path' => url::encode($module['path']))), '安装', array('class' => 'dialog'));
        $column['manage delete'] = html::a(zotop::url('zotop/module/delete', array('path' => url::encode($module['path']))), '删除', array('class' => 'confirm'));
        table::row($column);
    }
    table::footer();
}
block::footer();
?>

<?php 
$this->bottom();
$this->footer();
开发者ID:dalinhuang,项目名称:zotop,代码行数:30,代码来源:uninstalled.php


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