本文整理汇总了PHP中web_url函数的典型用法代码示例。如果您正苦于以下问题:PHP web_url函数的具体用法?PHP web_url怎么用?PHP web_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了web_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
}
?>
<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> <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>
<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
示例16: setInterval
?>
/website/js/bootstrap.min.js"></script>
<script>
$(document).ready(function () {
var datas;
setInterval(function () {
var url = $("#trackURL").attr("href");
;
var formdata = '';
$.ajax(url, {
data: formdata,
type: "GET",
success: function (response) {
var at = "<?php
echo web_url();
?>
";
if (response.success)
{
$("#tit").html(response.titl);
$("#log").attr("src", at + response.logo);
initialize(response.cur_lat, response.cur_lon, response.prev_lat, response.prev_lon);
}
else
{
console.log("Something went wrong!!");
}
google.maps.event.addDomListener(window, 'load', initialize);
}
});
开发者ID:felipemarques8,项目名称:goentregas,代码行数:31,代码来源:track_ride.blade.php
示例17: web_url
<tr>
<td width="260" align="right"><strong>登录帐号:</strong></td>
<td><input name="adminname" type="text" id="adminname" class="textipt" value="admin" style="width:150px" /></td>
</tr>
<tr>
<td align="right"><strong>登录密码:</strong></td>
<td><input name="adminpwd" type="text" class="textipt" value="" style="width:150px" /></td>
</tr>
<tr>
<td colspan="2" align="right">
<div class="butbox boxcenter">
<input name="doact" type="hidden" value="install" />
<input type="button" class="backbut" value="" onclick="window.location.href='<?php
echo web_url("install", array("name" => "public", "op" => "setp2"));
?>
';" style="margin-right:20px" />
<input name="submit" type="submit" class="setupbut" value="" />
</div></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>
开发者ID:jaydom,项目名称:weishang,代码行数:30,代码来源:install.php
示例18: array
<?php
if (checksubmit("submit")) {
$insert = array('title' => $_GP['title'], 'amount' => intval($_GP['amount']), 'endtime' => strtotime($_GP['endtime']), 'price' => $_GP['price'], 'gold' => $_GP['gold'], 'awardtype' => intval($_GP['awardtype']), 'credit_cost' => intval($_GP['credit_cost']), 'createtime' => time(), "deleted" => 0, 'content' => htmlspecialchars_decode($_GP['content']));
if (!empty($_FILES['logo']['tmp_name'])) {
$upload = file_upload($_FILES['logo']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$logo = $upload['path'];
}
if (!empty($logo)) {
$insert['logo'] = $logo;
}
mysqld_insert('addon7_award', $insert);
message('保存成功', web_url('awardlist'), 'success');
}
include addons_page('award');
开发者ID:jaydom,项目名称:weishang,代码行数:18,代码来源:addaward.php
示例19: update_list
public function update_list()
{
$list_id = Request::segment(3);
$list = Lists::find($list_id);
$list->name = Input::get('name');
$list->description = Input::get('description');
$list->direction = Input::get('direction');
$image = Input::file('background_image');
$validator = Validator::make(array('ima' => $image), array('ima' => 'required|mimes:jpeg,bmp,png,jpg'));
if ($validator->fails()) {
$error_messages = $validator->messages();
$response_array = array('success' => false, 'error' => 'Invalid Input', 'error_code' => 401);
$response_code = 200;
$message = "Invalid Input File";
$type = "failed";
return Redirect::to('/list/edit/' . $list_id)->with('type', $type)->with('message', $message);
} else {
if (Input::hasFile('background_image')) {
$extension = Input::file('background_image')->getClientOriginalExtension();
$fileName = time() . "." . $extension;
$destinationPath = public_path() . "/uploads/";
Input::file('background_image')->move($destinationPath, $fileName);
$list->background_image_url = web_url() . "/uploads/" . $fileName;
}
$list->save();
$products = Input::get('products');
ListProduct::where('list_id', $list_id)->delete();
if ($products) {
foreach ($products as $key => $value) {
$list_product = new ListProduct();
$list_product->list_id = $list_id;
$list_product->product_id = $key;
$product_temp = Product::find($key);
if ($product_temp) {
$list_product->store_id = $product_temp->store_id;
} else {
$list_product->store_id = 0;
}
$list_product->quantity = $value;
$list_product->sort_order = 0;
$list_product->save();
}
}
// Redirect
return Redirect::to('/list/edit/' . $list_id);
}
}
开发者ID:sohelrana820,项目名称:mario-gomez,代码行数:47,代码来源:StoreController.php
示例20: js_section
//.........这里部分代码省略.........
function checknotoverlap(){
var s_date = $('#datepickerStart').val();
var e_date = $('#datepickerEnd').val();
var room_id = $('#room_select').val();
var status = 1;
if (s_date == ''||typeof s_date=='undefined') {
status = 0;
errormsg('開始日期未填');
}else if (e_date == ''||typeof e_date=='undefined') {
status = 0;
errormsg('結束日期未填');
}
if (room_id!==''&&room_id!==null&&room_id!==0&&status==1) {
var data = 's_date='+s_date+'&e_date='+e_date+'&room_id='+room_id;
post('/contract/check_not_over_lap', data, callback, 0);
function callback(data){
if (data.state ===true) {
submitreservation();
}else if(data.state ===false){
$('#over_lap_dorm').html(data.result[0].dname);
$('#over_lap_room').html(data.result[0].rname);
$('#over_lap_list').html('');
for (var i = 0;i < data.result.length; i++) {
datum = data.result[i];
$('#over_lap_list').append('<tr><td>'+(i+1)+'</td><td>'+((datum.source=='res')?'預定單':((datum.source=='con')?'合約':''))+'</td><td>'+datum.sname+'</td><td>'+datum.mobile+'</td><td>'+datum.s_date+'</td><td>'+datum.e_date+'</td><td>'+datum.in_date+'</td><td>'+datum.out_date+'</td></tr>')
};
$('#overlapModal').modal('toggle');
recheck();
}else if(data.state ===-1){
errormsg('房間日期資料輸入不完整或格式錯誤');
recheck();
}
}
}else{
errormsg('房號、遷入、遷出日期請填寫完整');
}
}
function checkOK(){
$('#btncheck').html('送出');
$('#btncheck').attr('class','btn btn-success btn-lg');
$('#InOutcheck').attr('class', 'glyphicon glyphicon-ok-circle');
$('#final_id').html($('#datepickerIn').val());
$('#final_od').html($('#datepickerOut').val());
$('#checkInOutval').val(1);
$('#btncheck').attr('disabled', true);
}
function recheck(){
$('#btncheck').attr('disabled', false);
$('#btncheck').html('送出');
$('#btncheck').attr('class','btn btn-primary btn-lg');
$('#InOutcheck').attr('class', '');
$('#final_id').html('檢查未通過');
$('#final_od').html('檢查未通過');
$('#checkInOutval').val(0);
}
// final check
function final_check(r_id){
$('#tab_print').attr('data-toggle','tab');
$('#tab_print').attr('onclick','');
$('#tab_print').trigger('click');
$('#printFrame').attr('src', '<?php
echo web_url("/reservation/pdf_gen");
?>
?r_id='+r_id);
}
$( '#datepickerStart' ).datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
onClose: function( selectedDate ) {
$( "#datepickerEnd" ).datepicker( "option", "minDate", selectedDate );
}});
$( '#datepickerEnd' ).datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
onClose: function( selectedDate ) {
$( "#datepickStart" ).datepicker( "option", "maxDate", selectedDate );
}});
$( '#datepickerIn' ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true,changeYear: true,
onClose: function( selectedDate ) {
$( "#datepickerOut" ).datepicker( "option", "minDate", selectedDate );
}});
$( '#datepickerOut' ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true,changeYear: true,
onClose: function( selectedDate ) {
$( "#datepickerIn" ).datepicker( "option", "maxDate", selectedDate );
}});
$( '#new_rent_date' ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true,changeYear: true});
$( '#d_date' ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true,changeYear: true});
</script>
<?php
}
开发者ID:TuringTW,项目名称:dormsys,代码行数:101,代码来源:js_section.php
注:本文中的web_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论