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


PHP web_url函数代码示例

本文整理汇总了PHP中web_url函数的典型用法代码示例。如果您正苦于以下问题:PHP web_url函数的具体用法?PHP web_url怎么用?PHP web_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: isLogin

 public function isLogin()
 {
     if (!Session::get("member_uid")) {
         message('请登录后操作', web_url('reg/login', [], 'uc'), 'error');
     }
     return TRUE;
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:7,代码来源:Member.php

示例2: doWebContent

 public function doWebContent()
 {
     $aid = q('get.aid', 0, 'intval');
     //文章
     $article = Db::table('web_article')->where('siteid', SITEID)->where('aid', $aid)->first();
     if (empty($article)) {
         message('文章不存在', 'back', 'error');
     }
     $article['url'] = web_url('entry/content', ['aid' => $article['aid'], 'cid' => $article['category_cid']], 'article');
     //栏目
     $category = Db::table('web_category')->where('cid', $article['category_cid'])->first();
     $category['url'] = empty($category['cat_linkurl']) ? web_url('entry/category', ['cid' => $category['cid']], 'article') : $category['cat_linkurl'];
     //模板风格
     $template_name = $article['template_name'] ?: $category['template_name'];
     if (empty($template_name)) {
         $template_name = Db::table('web')->where('id', $this->webid)->pluck('template_name');
         if (empty($template_name)) {
             $template_name = Db::table('template')->where('is_default', 1)->pluck('name');
         }
     }
     $path = "theme/{$template_name}/{$this->dir}";
     if (is_file($path . '/article.html')) {
         $tpl = $path . '/article.html';
         define('__TEMPLATE__', $path);
     } else {
         //模板不存在时使用默认模板
         $tpl = 'theme/default/' . $this->dir . '/article.html';
         define('__TEMPLATE__', "theme/default/{$this->dir}");
     }
     View::with('hdcms', $article);
     View::with('category', $category);
     return View::make($tpl);
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:33,代码来源:entry.php

示例3: upload_image

function upload_image($file)
{
    $file_name = time();
    $file_name .= rand();
    $ext = $file->getClientOriginalExtension();
    $file->move(public_path() . "/uploads", $file_name . "." . $ext);
    $local_url = web_url() . "/uploads/" . $file_name . "." . $ext;
    return $local_url;
}
开发者ID:batu89,项目名称:grubroll,代码行数:9,代码来源:helpers.php

示例4: doWebNotify

 public function doWebNotify()
 {
     if ($_GET['code'] == 'SUCCESS') {
         //模块业务处理
         Db::table('balance')->where('tid', $_GET['tid'])->update(['status' => 1]);
         message('支付成功,系统将跳转到会员中心', web_url('entry/home'), 'success');
     } else {
         message('支付成功,系统将跳转到会员中心', web_url('entry/home'), 'error');
     }
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:10,代码来源:pay.php

示例5: doWebSetting

 public function doWebSetting()
 {
     if (IS_POST) {
         $_POST['uid'] = Session::get('member.uid');
         if (m('Member')->save()) {
             Util::instance('member')->updateSession();
             message('修改成功', web_url('entry/home'), 'success');
         }
     }
     View::with('user', Session::get('member'));
     View::make($this->ucenter_template . '/change_user_info.html');
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:12,代码来源:info.php

示例6: wechat

 public function wechat()
 {
     $pay = Db::table('pay')->where('tid', Session::get('pay.tid'))->first();
     $data['total_fee'] = $pay['fee'] * 100;
     //支付金额单位分
     $data['body'] = $pay['body'];
     //商品描述
     $data['attach'] = $pay['attach'];
     //附加数据
     $data['out_trade_no'] = $pay['tid'];
     //会员定单号
     c('weixin.notify_url', __ROOT__ . '/index.php/wxnotifyurl/' . SITEID);
     c('weixin.back_url', web_url('pay/notify', Session::get('pay'), Session::get('pay.module')));
     Weixin::instance('pay')->jsapi($data);
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:15,代码来源:Pay.php

示例7: doWebPost

 public function doWebPost()
 {
     if (IS_POST) {
         //不存在默认地址时将此地址设置为默认
         if (!$this->db->getMemberDefaultAddress()) {
             $_POST['isdefault'] = 1;
         }
         $action = empty($_POST['id']) ? 'add' : 'save';
         if ($this->db->{$action}()) {
             message('保存地址成功', web_url('lists'), 'success');
         }
         message($this->db->getError(), 'back', 'error');
     }
     if ($id = q('get.id', 0, 'intval')) {
         View::with('field', $this->db->find($id));
     }
     View::make($this->ucenter_template . '/address_post.html');
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:18,代码来源:address.php

示例8: doWebChangeMobile

 public function doWebChangeMobile()
 {
     if (IS_POST) {
         Validate::make([['mobile', 'required|phone', '手机号输入错误', 3]]);
         if (Validate::fail()) {
             message(Validate::getError(), 'back', 'error');
         }
         if ($this->db->where('mobile', $_POST['mobile'])->where('uid', '<>', Session::get('member.uid'))->get()) {
             message('手机号已经被使用', 'back', 'error');
         }
         $_POST['uid'] = Session::get('member.uid');
         if ($d = $this->db->save()) {
             //更新用户session
             $this->db->updateUserSessionData();
             message('手机号更新成功', web_url('entry/home'), 'success');
         }
         message($this->db->getError(), 'back', 'error');
     }
     View::make($this->ucenter_template . '/change_mobile.html');
 }
开发者ID:houdunwang,项目名称:hdcms,代码行数:20,代码来源:mobile.php

示例9: web_url

										<a class="btn btn-xs btn-success" href="<?php 
            echo web_url('delete', array('name' => 'member', 'openid' => $v['openid'], 'status' => 1));
            ?>
" onclick="return confirm('确定要恢复该账户吗?');"><i class="icon-edit"></i>恢复账户</a>
										
									<?php 
        }
        ?>
										&nbsp;<a  class="btn btn-xs btn-info" href="<?php 
        echo web_url('detail', array('name' => 'member', 'openid' => $v['openid']));
        ?>
"><i class="icon-edit"></i>账户编辑</a>&nbsp;<br/><br/>
										<a class="btn btn-xs btn-info" href="<?php 
        echo web_url('recharge', array('name' => 'member', 'openid' => $v['openid'], 'op' => 'credit'));
        ?>
"><i class="icon-edit"></i>积分管理</a>&nbsp;
										<a class="btn btn-xs btn-info" href="<?php 
        echo web_url('recharge', array('name' => 'member', 'openid' => $v['openid'], 'op' => 'gold'));
        ?>
"><i class="icon-edit"></i>余额管理</a>	
									</td>
								</tr>
								<?php 
    }
}
?>
  </tbody>
    </table>
		<?php 
echo $pager;
include page('footer');
开发者ID:jasonhzy,项目名称:bjcms2.3,代码行数:31,代码来源:list.php

示例10: providerForgotPassword

 public function providerForgotPassword()
 {
     $email = Input::get('email');
     $walker = Walker::where('email', $email)->first();
     if ($walker) {
         $new_password = time();
         $new_password .= rand();
         $new_password = sha1($new_password);
         $new_password = substr($new_password, 0, 8);
         $walker->password = Hash::make($new_password);
         $walker->save();
         // send email
         /* $subject = "Your New Password";
            $email_data = array();
            $email_data['password'] = $new_password;
            send_email($walker->id, 'walker', $email_data, $subject, 'forgotpassword'); */
         $settings = Settings::where('key', 'admin_email_address')->first();
         $admin_email = $settings->value;
         $login_url = web_url() . "/provider/signin";
         $pattern = array('name' => ucwords($walker->first_name . " " . $walker->last_name), 'admin_eamil' => $admin_email, 'new_password' => $new_password, 'login_url' => $login_url);
         $subject = "Your New Password";
         email_notification($walker->id, 'walker', $pattern, $subject, 'forgot_password', 'imp');
         // echo $pattern;
         return Redirect::to('provider/signin')->with('success', 'password reseted successfully. Please check your inbox for new password.');
     } else {
         return Redirect::to('provider/signin')->with('error', 'This email ID is not registered with us');
     }
 }
开发者ID:felipemarques8,项目名称:goentregas,代码行数:28,代码来源:WebProviderController.php

示例11: array

<?php

$sidebardata = array(array('name' => '管理', 'style' => 'alert-info', 'data' => array(array('icon' => '', 'url' => web_url("/database/room"), 'text' => '房間管理'))));
echo sidebar($sidebardata, $active);
开发者ID:TuringTW,项目名称:dormsys,代码行数:4,代码来源:sidebar.php

示例12: web_url

									<img  src="<?php 
echo WEBSITE_ROOT;
?>
addons/addon10/pic/8.png">
					<span></span>
		
								</a>
			</div>
			<div class="item-bottom s-bg-fff" style="">
				<div class="tit">
					<h4 ><a href="<?php 
echo web_url('scene', array('op' => 'preview', 'theme' => 'hammer'));
?>
">锤子手机</a></h4>
					<p data-author=""><a href="javascript:void(0)"></a></p>
					<span class="css_sprite s-bg-qr_icon icon-qr"></span>
				</div>
				<div class="con">
				<strong class="f-tr" ><a href="<?php 
echo web_url('scene', array('op' => 'preview', 'theme' => 'hammer'));
?>
" style="color:green" >模板预览</a></strong>
				</div>
			</div>
		</div>
	</div>
</div>
	<div class="f-clear"></div>
	</div>
<?php 
include page('footer');
开发者ID:jasonhzy,项目名称:bjcms2.3,代码行数:31,代码来源:scene.php

示例13: array

<?php 
$sidebardata = array(array(	'name'=>'',
							'style'=>'alert-info',
							'data'=>array(
								// array('icon'=>'','url'=>web_url("/database/dorm"),'text'=>'宿舍管理'),	
								array('icon'=>'','url'=>web_url("/site/index"),'text'=>'據點清單'),	
								// array('icon'=>'','url'=>web_url("/database/room"),'text'=>'據點狀態'),	
								// array('icon'=>'','url'=>web_url("/database/electronum"),'text'=>'電表管理'),	
							)
						),
					
					);
echo sidebar($sidebardata, $active);

 ?>
开发者ID:TuringTW,项目名称:physcamp,代码行数:15,代码来源:sidebar.php

示例14: web_url

				<h2>列印</h2>
				<hr>
				<br>
				<h2>資料查看</h2>
				<hr>
				<div class="btn-group">
					<a class="btn btn-default" href="" id="href_contract">查看合約</a>

				</div>
			</div>
			<div class="col-md-8" >
				<div class="well" style="width:100%;">
					<h2>列印預覽</h2>
					<hr>
					<iframe id="printFrame" src="<?php 
echo web_url('/contract/pdf_gen');
?>
" style="width:100%;height:630px"></iframe>
				</div>
			</div>
		</div>
	</div>
</div>
<?php 
if (!is_null($keep)) {
    $keep_result[0][0] = (new DateTime($keep_result[0]['e_date']))->modify('+1 day')->format('Y-m-d');
    $keep_result[0][1] = (new DateTime($keep_result[0]['out_date']))->modify('+1 day')->format('Y-m-d');
}
?>
<a class="btn" id="keepbtn" onclick="
<?php 
开发者ID:TuringTW,项目名称:dormsys,代码行数:31,代码来源:newcontract.php

示例15: web_url

						baidu_map();
					<?php 
}
?>
				}
            });
         });

		 KindEditor.ready(function(K){
			var editor = KindEditor.editorObj || K.editor({
				themeType: 'simple',
				allowImageUpload:false,
				formatUploadUrl:false,
				allowFileManager: false,
				uploadJson : "<?php 
echo web_url('newkeupload');
?>
"
			});

			$('.select_img').click(function(e){
				editor.loadPlugin('image', function(){
					editor.plugin.imageDialog({
						imageUrl: $(e.target).parent().prev().val(),
						clickFn: function(url, title, width, height, border, align){
							var val = url;
							if(url.toLowerCase().indexOf("http://") == -1 && url.toLowerCase().indexOf("https://") == -1) {
								var filename = /images(.*)/.exec(url);
								if(filename && filename[0]) {
									val = filename[0];
								}
开发者ID:jasonhzy,项目名称:bjcms2.3,代码行数:31,代码来源:page.php


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