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


PHP url::routes_area方法代码示例

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


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

示例1: add

 /**
  * Add a paper to a lightbox.
  *
  * @param int $paper_id Use the paper ID as the identifier, this page shoudl not really bew viewed by itself.
  */
 public function add($paper_id = NULL)
 {
     $this->breadcrumbs->add()->url(false)->title('Add Paper');
     // get the current user
     $current = Security::instance()->get_user();
     // sanity check
     if ($current && $current->loaded) {
         // make sure they sent something in -= GIGO check
         if ($paper_id != NULL) {
             // they found a paper, lets make sure it is a real one.
             $paper = ORM::factory('paper', $paper_id);
             if ($paper->loaded) {
                 $view = new view(url::routes_area() . 'add_modal');
                 $view->paper = $paper;
                 // get the users lightboxes
                 $view->lightboxes = ORM::factory('lightbox')->where('creator_id', $current->id)->find_all();
                 $this->ajax['view'] = $view;
             } else {
                 $this->notification->add($this->i18n['system.paper.invalid']);
             }
         } else {
             // user didnt send through a paper
             $this->notification->add($this->i18n['system.paper.invalid']);
         }
     } else {
         // user is not logged in, cant add a favourite if your not logged in
         $this->notification->add($this->i18n['system.user.invalid']);
         $view = new view('account/login_modal');
         $view->notifications = json_encode($this->notification->get());
         $this->ajax['view'] = $view;
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:37,代码来源:papers.php

示例2: index

 /**
  * This will provide a =tile list of each of the industrial products 
  * this is differnt to the paper/products
  */
 public function index()
 {
     $this->template->title = 'Industrial Products';
     $view = new View(url::location());
     $this->breadcrumbs->add()->url(url::routes_area())->title('Browse');
     $view->breadcrumbs = $this->breadcrumbs->cut();
     $view = new view(url::location());
     $view->industrials = orm::factory('industrial')->where('status', 'approved')->orderby('name', 'ASC')->find_all();
     $this->template->content = $view;
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:14,代码来源:industrials.php

示例3: add

 /**
  * add an industrial product, based up on the paper add. 
  */
 public function add()
 {
     if ($this->access->allowed('industrials', 'create')) {
         $this->template->title = 'Add Industrial Product';
         $view = new view(url::routes_area() . 'add');
         $view->styles = orm::factory('style')->find_all();
         $view->availablities = orm::factory('availablity')->find_all();
         $view->characteristics = orm::factory('characteristic')->find_all();
         $view->environmentals = ORM::factory('environmental')->find_all();
         $view->post = $this->post;
         $this->template->content = $view;
     } else {
         url::failed();
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:18,代码来源:industrials.php

示例4: view

 public function view($name)
 {
     $name = url::decode($name);
     // check it exists and is published
     $campaign = orm::factory('campaign')->where('name', $name)->where('status', 'approved')->find();
     if ($campaign->loaded) {
         $this->breadcrumbs->add()->url('campaigns')->title('Campaigns');
         $this->breadcrumbs->add()->url(false)->title($campaign->name);
         $this->template->title = 'Campaigns › ' . $campaign->name;
         $view = new view(url::location());
         $view->campaign = $campaign;
         $view->breadcrumbs = $this->breadcrumbs->cut();
         $this->template->content = $view;
     } else {
         $this->notification->add($this->i18n['system.campaign.invalid']);
         url::redirect(url::routes_area());
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:18,代码来源:campaigns.php

示例5: view

 /**
  * View a Paper
  */
 public function view($name)
 {
     $name = url::decode($name);
     // get the paper and populate the padded field, as we will be using to to display the gsm table.
     $paper = ORM::factory('paper')->where('name', $name)->where('status', 'approved')->find();
     //->populate_padded_gsm();
     if ($paper->loaded) {
         $view = new View('products/papers/view');
         $this->template->title = $paper->name;
         $this->breadcrumbs->add()->url(url::current())->title($paper->name);
         $view->breadcrumbs = $this->breadcrumbs->get();
         $view->finishes = $paper->finishes;
         $view->paper = $paper;
         $this->template->content = $view;
     } else {
         $this->notification->add($this->i18n['system.paper.error']);
         url::redirect(url::routes_area() . 'index');
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:22,代码来源:papers.php

示例6: confirm

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

示例7:

		<legend>Billboard Image</legend>
		
		<div class="notifications"></div>
		
		<ul class="block-list">
		
			<li id="image-upload" class="upload-single-file">
				<ul id="completed-image" class="upload-single-file-list"><li class="empty"><p>No files have been uploaded</p></li></ul>
				<div class="upload-single-file-uploader">
					<h4>Billboard (940 x 300 pixels)</h4>
					<input type="file" id="upload-image" class="uploadify" />
					<div id="image-cover-progress" class="upload-single-file-progress"></div>
				</div>
			</li>
			
		</ul>
	</fieldset>
	
	
	<div class="button-group">
		<button type="submit" name="post-action" value="<?php 
echo Router::$method;
?>
" ><span>Save</span></button>
		<a href="<?php 
echo url::routes_area() . 'index';
?>
" class="button"><span>Cancel</span></a>
	</div>
	
</form>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:add.php

示例8: ucwords

"><?php 
    echo $article->name;
    ?>
</a></td>
				<td><?php 
    echo ucwords($article->group);
    ?>
</td>
				<td class="align-center"><?php 
    echo $article->status == 'approved' ? '<span class="icon-approved">&#x2714;</span>' : '<span class="icon-pending">&#x2718;</span>';
    ?>
</td>
				<td><a class="text-edit" href="<?php 
    echo url::routes_area() . 'edit/' . $article->id;
    ?>
">Edit</a> <a class="text-delete" href="<?php 
    echo url::routes_area() . 'delete/' . $article->id;
    ?>
" onclick="return confirm('Do you really want to delete the article?');">Delete</a></td>
			</tr>
		<?php 
}
?>
		</tbody>
	</table>
	
	<?php 
echo $pagination;
?>
	
</div>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index.php

示例9: update

 public function update()
 {
     if ($this->access->allowed('faqs', 'update')) {
         // @todo - add the rest of the required vars
         $input = Validation::factory($this->input->post())->pre_filter('trim')->add_rules('id', 'required')->add_rules('name', 'required')->add_rules('description', 'required')->add_rules('status', 'required');
         if ($input->validate()) {
             $faq = ORM::factory('faq', $this->input->post('id'));
             if ($faq->loaded) {
                 // @todo look for an existing article with the same name as the one given, need to think about whether it needs to be by faq.
                 $faq->name = $this->input->post('name');
                 $faq->description = $this->input->post('description');
                 $faq->status = $this->input->post('status');
                 $faq->order = $this->input->post('order');
                 $faq->group = $this->input->post('group');
                 if ($faq->save()) {
                     $this->notification->add($this->i18n['system.faq.success'], $faq->name);
                     url::redirect(url::routes_area() . 'edit/' . $faq->id);
                 } else {
                     $this->notification->add($this->i18n['system.faq.error']);
                 }
             }
         } else {
             foreach ($input->errors() as $key => $value) {
                 $this->notification->add($this->i18n['filter.' . $key . '.' . $value]);
             }
         }
     } else {
         Kohana::log('debug', 'User failed method security check');
         url::failed();
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:faqs.php

示例10: edit

 public function edit($id = NULL)
 {
     if ($this->access->allowed('magazines', 'update')) {
         if ($id != NULL) {
             $magazine = orm::factory('magazine')->find($id);
             if ($magazine->loaded) {
                 $view = new view(url::location());
                 $view->magazine = orm::factory('magazine', $id);
                 $this->template->title = 'Stock Magazines';
                 $this->template->content = $view;
             } else {
                 $this->notification->add($this->i18n['system.magazine.failed']);
                 url::redirect(url::routes_area());
             }
         } else {
             $this->notification->add($this->i18n['system.magazine.failed']);
             url::redirect(url::routes_area());
         }
     } else {
         url::failed();
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:22,代码来源:magazines.php

示例11: confirm

	     			</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>
	        <?php 
    }
    ?>
		<?php 
} else {
    ?>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index_list.php

示例12: edit

 public function edit($id)
 {
     if ($this->access->allowed('campaigns', 'update')) {
         $campaign = orm::factory('campaign', $id);
         if ($campaign->loaded) {
             $this->template->title = 'Edit Campaign';
             $this->breadcrumbs->add()->url(false)->title($campaign->name);
             $view = new view(url::location());
             $view->campaign = $campaign;
             $this->template->content = $view;
         } else {
             $this->notification->add($this->i18n['system.campaign.invalid']);
             url::redirect(url::routes_area());
         }
     } else {
         url::failed();
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:18,代码来源:campaigns.php

示例13: foreach

</td>
								<?php 
                    foreach ($padded[$sheet->id] as $gsm => $value) {
                        ?>
									<td class="align-center"><?php 
                        echo $value === TRUE ? '<span class="tick">&bull;</span>' : '&nbsp;';
                        ?>
</td>
								<?php 
                    }
                    ?>
								<td><a class="text-edit" href="<?php 
                    echo url::routes_area() . 'edit/' . $sheet->id;
                    ?>
">Edit</a> <a class="text-delete" href="<?php 
                    echo url::routes_area() . 'delete/' . $sheet->id;
                    ?>
" onclick="return confirm('Do you really want to delete this sheet?');">Delete</a></td>
							</tr>
						<?php 
                }
                ?>
					<?php 
            } else {
                ?>
					<tr><td colspan="3">There are no sheets for this paper range.</td></tr>
					<?php 
            }
            ?>
				</tbody>
			</table>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:31,代码来源:index.php

示例14:

	</fieldset>
	
	<fieldset>
		<legend>News Article Image</legend>
		<ul class="block-list">
		
			<li id="news-image" class="upload-single-file">
				<ul id="completed-news-image" class="upload-single-file-list"><li class="empty"><p>No files have been uploaded</p></li></ul>
				<div class="upload-single-file-uploader">
					<h4>Cover</h4>
					<input type="file" id="upload-news-image" class="uploadify" />
					<div id="news-image-cover-progress" class="upload-single-file-progress"></div>
				</div>
			</li>
			
		</ul>
	</fieldset>
	
	<div class="button-group">
		<button type="submit" name="post-action" value="<?php 
echo Router::$method;
?>
" ><span>Save</span></button>
		<a href="<?php 
echo url::routes_area() . 'index/' . $news->group;
?>
" class="button"><span>Cancel</span></a>
	</div>
	
</form>
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:30,代码来源:edit.php

示例15: view_old

 /**
  * This method is used to display all of the papers with in an lightboxes
  *
  *57
  * @param $name the name of the lightboxes
  * @param $user the created of the lightboxes, we add this as a required, as a form of security through obsuritiy.
  * 				makes it alot harder to browse through lighboxes with out having the name and creator.
  */
 public function view_old($email, $name)
 {
     $redirect = true;
     // flag for redirecting on error.
     // readd any quotes it may have had
     $name = url::decode($name);
     if ($this->access->allowed('lightboxes', 'read')) {
         // get the user.
         $user = ORM::factory('user')->where('email', $email)->find();
         if ($user->loaded) {
             $lightbox = ORM::factory('lightbox')->where('creator_id', $user->id)->where('name', $name)->find();
             if ($lightbox->loaded) {
                 // only show if the lightboxes is public of if the owner is the person currently logged in.
                 if ($lightbox->status == 'approved' || $this->current && $this->current->id == $lightbox->creator_id) {
                     $view = new view(url::routes_area() . 'view');
                     // add one to the views for the lightbox.
                     $lightbox->views += 1;
                     $lightbox->save(false);
                     $view->lightbox = $lightbox;
                     if ($this->current && $this->current->id == $user->id) {
                         $view->is_owner = true;
                     }
                     $view->current_user = $this->current;
                     //$view->is_owner = ($this->current && $this->current->id == $user->id); // @todo :: add check against lightbox moderator priv.
                     $this->breadcrumbs->add()->url(url::current())->title($lightbox->name);
                     $view->breadcrumbs = $this->breadcrumbs->get();
                     $this->breadcrumbs->delete();
                     $this->template->content = $view;
                     $redirect = false;
                     // dont redirect as everythign worked.
                 } else {
                     $this->notification->add($this->i18n['system.lightbox.status']);
                 }
             } else {
                 $this->notification->add($this->i18n['system.lightbox.invalid']);
             }
         } else {
             $this->notification->add($this->i18n['system.user.invalid']);
         }
     } else {
         $this->notification->add($this->i18n['system.lightbox.login']);
     }
     // if there was an error, redirect away.
     if ($redirect) {
         url::redirect('account');
     }
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:55,代码来源:lightboxes.php


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