• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP spUrl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: step4

 public function step4()
 {
     $this->front_page = host_url(spUrl('welcome', 'index'));
     $this->admin_page = host_url(spUrl('admin', 'login'));
     fopen('data/install.lock', 'w');
     $this->display("install/step4.php");
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:7,代码来源:install.php


示例2: deleteselect

 function deleteselect()
 {
     $i_order = spClass("i_pay");
     $param = $this->spArgs();
     if (sizeof($param['chk_list']) > 0) {
         foreach ($param['chk_list'] as $id) {
             $i_order->deleteByPk($id);
         }
     }
     $this->results = spUrl("i_pay_action", "index");
     $this->display("ok.htm");
     // 显示模板
 }
开发者ID:wateronface,项目名称:php,代码行数:13,代码来源:i_pay_action.php


示例3: buy

 public function buy()
 {
     $item_id = $this->spArgs("mid");
     if ($item_id && is_numeric($item_id)) {
         $ptx_item = spClass('ptx_item');
         $item = $ptx_item->get_item_by_id($item_id, ' ptx_item.promotion_url ');
         if ($item['promotion_url']) {
             $this->jump(str_ireplace('+', '%2B', $item['promotion_url']));
             return;
         }
     }
     $this->jump(spUrl('welcome', 'index'), 2, T('page_404_redirecting'));
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:13,代码来源:share.php


示例4: __template_spUrl

 public function __template_spUrl($params)
 {
     $geturl = basename(__FILE__);
     $controller = $GLOBALS['G_DY']["default_controller"];
     $action = $GLOBALS['G_DY']["default_action"];
     $args = array();
     $anchor = null;
     foreach ($params as $key => $param) {
         if ($key == $GLOBALS['G_DY']["url_controller"]) {
             $controller = $param;
         } elseif ($key == $GLOBALS['G_DY']["url_action"]) {
             $action = $param;
         } elseif ($key == 'anchor') {
             $anchor = $param;
         } else {
             $args[$key] = $param;
         }
     }
     return spUrl($geturl, $controller, $action, $args, $anchor);
 }
开发者ID:kxjteam,项目名称:kxjcms,代码行数:20,代码来源:syView.php


示例5: make

 /**
  * 生成单个静态页面
  * 
  * @param spurl spUrl的参数
  * @param alias_url 生成HTML文件的名称,如果不设置alias_url,将使用年月日生成目录及随机数为文件名的形式生成HTML文件。
  * @param update_mode    更新模式,默认2为同时更新列表及文件
  * 0是仅更新列表
  * 1是仅更新文件
  */
 public function make($spurl, $alias_url = null, $update_mode = 2)
 {
     if (1 == spAccess('r', 'sp_html_making')) {
         $this->spurls[] = array($spurl, $alias_url);
         return;
     }
     @(list($controller, $action, $args, $anchor) = $spurl);
     if ($url_item = spHtml::getUrl($controller, $action, $args, $anchor, TRUE)) {
         @(list($baseuri, $realfile) = $url_item);
         $update_mode = 1;
     } else {
         $file_root_name = '' == $GLOBALS['G_SP']['html']['file_root_name'] ? '' : $GLOBALS['G_SP']['html']['file_root_name'] . '/';
         if (null == $alias_url) {
             $filedir = $file_root_name . date('Y/n/d') . '/';
             $filename = substr(time(), 3, 10) . substr(mt_rand(100000, substr(time(), 3, 10)), 4) . ".html";
         } else {
             $filedir = $file_root_name . dirname($alias_url) . '/';
             $filename = basename($alias_url);
         }
         $baseuri = rtrim(dirname($GLOBALS['G_SP']['url']["url_path_base"]), '/\\') . "/" . $filedir . $filename;
         $realfile = APP_PATH . "/" . $filedir . $filename;
     }
     if (0 == $update_mode or 2 == $update_mode) {
         spHtml::setUrl($spurl, $baseuri, $realfile);
     }
     if (1 == $update_mode or 2 == $update_mode) {
         $remoteurl = 'http://' . $_SERVER["SERVER_NAME"] . ':' . $_SERVER['SERVER_PORT'] . '/' . ltrim(spUrl($controller, $action, $args, $anchor, TRUE), '/\\');
         $cachedata = file_get_contents($remoteurl);
         if (FALSE === $cachedata) {
             $cachedata = $this->curl_get_file_contents($remoteurl);
             if (FALSE === $cachedata) {
                 spError("无法从网络获取页面数据,请检查:<br />1. spUrl生成地址是否正确!<a href='{$remoteurl}' target='_blank'>点击这里测试</a>。<br />2. 设置php.ini的allow_url_fopen为On。<br />3. 检查是否防火墙阻止了APACHE/PHP访问网络。<br />4. 建议安装CURL函数库。");
             }
         }
         __mkdirs(dirname($realfile));
         file_put_contents($realfile, $cachedata);
     }
 }
开发者ID:eon-hong,项目名称:anypay,代码行数:47,代码来源:spView.php


示例6: updatesave

 function updatesave()
 {
     //更新o_order表
     $o_order = spClass("o_order");
     $row = $this->spArgs();
     $order_id = $row['id'];
     $orderTime = $row['orderTime'];
     $row["username"] = $_SESSION["username"];
     $conditions = array('id' => $row['id']);
     $o_order->update($conditions, $row);
     //		echo $o_order->dumpSql();
     //删除o_order_detail表中的有关$order_id记录
     $o_order_detail = spClass("o_order_detail");
     $o_order_detail->delete(array('orderId' => $order_id));
     //插入o_order_detail表
     $o_order_detail = spClass("o_order_detail");
     if (strlen(trim($row['detail'])) > 0) {
         $records = explode("@@@", $row['detail']);
         for ($i = 0; $i < sizeOf($records); $i++) {
             $single = $records[$i];
             $arr = explode("___", $single);
             $conditions = array("orderId" => $order_id, "productId" => $arr[0], "price" => $arr[1], "amount" => $arr[2]);
             $o_order_detail->create($conditions);
         }
     }
     $this->results = spUrl("o_order_action", "index");
     $this->display("ok.htm");
     // 显示模板
 }
开发者ID:wateronface,项目名称:php,代码行数:29,代码来源:o_order_action.php


示例7: check_channel_item

 public function check_channel_item()
 {
     if ($this->check_admin()) {
         $act = $this->spArgs("act");
         $channel_name = $this->spArgs("channel", 'taobao');
         $channel = spClass("Channel");
         $number = 50;
         $page = $this->spArgs("page", 1);
         $ptx_item = spClass('ptx_item');
         $condition['reference_channel'] = 'taobao';
         $items = $ptx_item->search(null, $page, $number, " ptx_item.reference_itemid,ptx_item.promotion_url,ptx_item.item_id ", NULL);
         $pid = $this->settings['api_setting']['Taobao']['PID'];
         foreach ($items as $item) {
             if (!strpos($item['promotion_url'], $pid) && $item['reference_itemid']) {
                 $promotion = $channel->get_promotion_url($channel_name, $item['reference_itemid']);
                 sleep(1);
                 if ($promotion) {
                     $scon['item_id'] = $item['item_id'];
                     $ptx_item->updateField($scon, 'promotion_url', $promotion['promotion_url']);
                 }
             }
         }
         if (array_length($items) > 0) {
             $start = ($page - 1) * $number;
             $end = $start + $number;
             $str = T('processing_data') . "{$start}----{$end}";
             $url = spUrl('admin', 'check_channel_item', array('page' => $page + 1));
             admin_show_message($str, $this, $url, 1500);
             return;
         } else {
             $str = T('processing_data_success');
             $url = spUrl('admin', 'update_cache');
             admin_show_message($str, $this, $url, 1500);
         }
     }
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:36,代码来源:admin.php


示例8: logout

 /**
  * logout page
  */
 public function logout()
 {
     unset($_SESSION['codeBuilder_admin']);
     $this->jump(spUrl('CodeBuilder', 'login'));
 }
开发者ID:laiello,项目名称:code-builder-for-speedphp,代码行数:8,代码来源:CodeBuilder.php


示例9: foreach

		  		<?php 
            foreach ($comments as $comment) {
                ?>
				<div class="comment">
					<div class="shareface"><a class="trans07" href="<?php 
                echo spUrl('pub', 'index', array('uid' => $comment['user_id']));
                ?>
" data-user-id="<?php 
                echo $comment['user_id'];
                ?>
" data-user-profile="1"><img src="<?php 
                echo useravatar($comment['user_id'], 'middle');
                ?>
" class="avatar" width="30" height="30"></a></div>
					<div class="shareinfo"><a href="<?php 
                echo spUrl('pub', 'index', array('uid' => $comment['user_id']));
                ?>
" data-user-id="<?php 
                echo $comment['user_id'];
                ?>
" data-user-profile="1"><?php 
                echo $comment['nickname'];
                ?>
</a><p><?php 
                echo parse_message(sysSubStr($comment['comment_txt'], 50, true));
                ?>
</p></div>
				</div>
				<?php 
            }
            ?>
开发者ID:httvncoder,项目名称:151722441,代码行数:31,代码来源:pin.php


示例10: spUrl

<script id="tags_pop_tpl" type="text/template">
	<b class="arrow_t"><i class="arrow_inner_t"></i></b>
	{{#data}}
    <div class="tag_title">
	<a href="<?php 
echo spUrl("pin", "tgroup", array('tg' => '{{tag_id}}'));
?>
"><strong>{{tag_group_name_en}}</strong></a></div>
		<ul class="taglist">
		{{#tags}}
		<li><a href="<?php 
echo spUrl("pin", "index", array("tag" => '{{.}}'));
?>
">{{.}}</a></li>
		{{/tags}}
		</ul>
	{{/data}}
    <b class="arrow_b"><i class="arrow_inner_b"></i></b>
</script>
开发者ID:httvncoder,项目名称:151722441,代码行数:19,代码来源:tags_pop_tpl.php


示例11: bind

 public function bind()
 {
     $ptx_connector = spClass("ptx_connector");
     $ptx_user = spClass("ptx_user");
     if ($this->social_info) {
         $social_user_info = $this->social_info;
     } else {
         $social_user_info = $this->session->get_data('social_info');
     }
     $vendor = $social_user_info['vendor'];
     if (!$vendor) {
         $this->error(T('your_social_info_invalid'), spUrl('pin', 'index'));
     }
     if ($nickname = $this->spArgs("nickname")) {
         if ($this->check_nickname($nickname)) {
             $data['email'] = md5(random_string('alnum', 5)) . '@' . T('domain.com');
             $data['nickname'] = $nickname;
             $data['avatar_remote'] = $social_user_info['avatar'];
             $data['gender'] = $social_user_info['gender'];
             $data['location'] = $social_user_info['location'];
             $data['bio'] = $social_user_info['description'];
             $data['passwd'] = md5(random_string('alnum', 8));
             $data['create_time'] = time();
             $data['is_active'] = 1;
             $data['is_social'] = 1;
             $uid = $ptx_user->add_one($data);
             $connector_data['user_id'] = $uid;
             $connector_data['social_userid'] = $social_user_info['uid'];
             $connector_data['vendor'] = $vendor;
             $connector_data['vendor_info'] = serialize($this->session->get_data('social_' . $vendor . '_info'));
             $connector_data['username'] = $social_user_info['screen_name'];
             $connector_data['name'] = $social_user_info['name'];
             $connector_data['description'] = $social_user_info['description'];
             $connector_data['homepage'] = $social_user_info['url'];
             $connector_data['avatar'] = $social_user_info['avatar'];
             $connector_data['email'] = $social_user_info['email'];
             $connector_data['gender'] = $social_user_info['gender'];
             $connector_data['location'] = $social_user_info['location'];
             $ptx_connector->create($connector_data);
             $this->save_remote_avatar($social_user_info['avatar'], $uid);
             $user = $ptx_user->getuser_byid($uid);
             $this->user_lib->set_session($user);
             $this->clear_socialinfo($vendor);
             $this->ajax_success_response(null, T('login_succeed'));
             return;
         } else {
             $this->ajax_failed_response(T('nick_already_existed'));
         }
     } else {
         $social_connector = $ptx_connector->get_bind_by_vendor_and_suid($vendor, $social_user_info['uid']);
         if ($social_connector) {
             if ($this->current_user['user_id'] && $social_connector['user_id'] != $this->current_user['user_id']) {
                 $this->error(T('social_account_already_bind'), spUrl('pin', 'index'));
             } else {
                 $update_connect_data['avatar'] = $social_user_info['avatar'];
                 //$update_local_data['avatar_remote'] = $social_user_info['avatar'];
                 //need update remote avatar
                 $ptx_connector->update(array('connect_id' => $social_connector['connect_id']), $update_connect_data);
                 //$this->user_model->edit_user($social_connector['user_id'],$update_local_data);
                 $local_user = $ptx_user->getuser_byid($social_connector['user_id']);
                 $this->user_lib->set_session($local_user);
                 $this->clear_socialinfo($vendor);
                 $this->jump(spUrl('pin', 'index'));
             }
         } else {
             if ($this->current_user['user_id']) {
                 $connector_data['user_id'] = $this->current_user['user_id'];
                 $connector_data['social_userid'] = $social_user_info['uid'];
                 $connector_data['vendor'] = $vendor;
                 $connector_data['vendor_info'] = serialize($this->session->get_data('social_' . $vendor . '_info'));
                 $connector_data['username'] = $social_user_info['screen_name'];
                 $connector_data['name'] = $social_user_info['name'];
                 $connector_data['description'] = $social_user_info['description'];
                 $connector_data['homepage'] = $social_user_info['url'];
                 $connector_data['avatar'] = $social_user_info['avatar'];
                 $connector_data['email'] = $social_user_info['email'];
                 $connector_data['gender'] = $social_user_info['gender'];
                 $connector_data['location'] = $social_user_info['location'];
                 $ptx_connector->create($connector_data);
                 $this->jump(spUrl('pin', 'index'));
             } else {
                 $this->social_user_info = $social_user_info;
                 $this->output("social/index");
             }
         }
     }
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:87,代码来源:social.php


示例12: updatesave

 function updatesave()
 {
     $model = spClass("user");
     $param = $this->spArgs();
     $conditions = array('id' => $param['id']);
     $model->update($conditions, $param);
     //		echo($model->dumpSql());
     $this->results = spUrl("user_action", "index");
     $this->display("ok.htm");
     // 显示模板
 }
开发者ID:wateronface,项目名称:php,代码行数:11,代码来源:user_action.php


示例13: def_prompt

 /**
  * 默认的无权限提示跳转
  */
 public function def_prompt()
 {
     $url = spUrl();
     // 跳转到首页,在强制权限的情况下,请将该页面设置成可以进入。
     echo "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><script>function sptips(){alert(\"Access Failed!\");location.href=\"{$url}\";}</script></head><body onload=\"sptips()\"></body></html>";
     exit;
 }
开发者ID:Geoge-Henry,项目名称:travelnote,代码行数:10,代码来源:spAcl.php


示例14: base_url

if ($permission['other_permission']['allow_video']) {
    ?>
	          <li><a href="#website_fetch" data-toggle="tab" class="video_share" data-action="switchPublish" data-params="video_share"><img alt="{lang video_share}" class="fig" src="<?php 
    echo base_url("assets/img/publish-video.png");
    ?>
">{lang video_share}</a></li>
			  <?php 
}
?>
	          <li><a href="#article_share" data-toggle="tab" class="article_share" data-action="switchPublish" data-params="article_share"><img alt="{lang article_share}" class="fig" src="<?php 
echo base_url("assets/img/publish-text.png");
?>
">{lang article_share}</a></li>
	        </ul>
	        <form id="save_share_form" data-url="" next-url="<?php 
echo spUrl('pin', 'index');
?>
" method="post">
	        	<input type="hidden" name="cover_filename" id="cover_filename">
				<input type="hidden" name="item_id" id="item_id">
				<input type="hidden" name="channel" id="channel">
				<input type="hidden" name="share_type" id="share_type">
				<input type="hidden" name="reference_url" id="reference_url">
				<input type="hidden" name="all_files" id="all_files">
				<input type="hidden" name="flv" id="flv">
				<input type="hidden" name="groupid" id="groupid">
				<input type="hidden" name="topicid" id="topicid">
		        <div class="tab-content" id="category_select_div">
			        <div class="well form-inline tab-pane" id="website_fetch">
				    	<div class="input-prepend tab-pane">
					    	<span class="add-on"><i class="icon-globe"></i></span><input type="text" name="remote_url" class="input-medium" id="remote_url" placeholder="{lang type_address_fetch}"/>
开发者ID:httvncoder,项目名称:151722441,代码行数:31,代码来源:publish_tpl.php


示例15: foreach

			        </div>
			    </fieldset>
		    </form>
	    </div>
		<div class="span2 ml0">
			<ul class="unstyled">
				<li><strong>{lang already_register}?<a href="javascript:void(0);" data-action="openLoginDialog">{lang direct_login}</a></strong></li>
	        	<?php 
foreach ($vendors as $vendor) {
    $lowerkey = strtolower($vendor);
    ?>
				<?php 
    if ($settings['api_setting'][$vendor]['OPEN']) {
        ?>
				<li><a href="<?php 
        echo spUrl('social', 'go', array('vendor' => $vendor));
        ?>
"><i class="loginico-<?php 
        echo $lowerkey;
        ?>
"></i></a></li>
				<?php 
    }
    ?>
				<?php 
}
?>
			</ul>
		</div>
	</div>
</div>
开发者ID:httvncoder,项目名称:151722441,代码行数:31,代码来源:register_box_tpl.php


示例16: explode

"><strong><?php 
        echo $group['tag_group_name_en'];
        ?>
</strong></a></div>
				<ul class="taglist">
				<?php 
        $tags = explode(',', $group['tags']);
        ?>
				<?php 
        foreach ($tags as $tag) {
            ?>
				<?php 
            if ($tag) {
                ?>
				<li><a href="<?php 
                echo spUrl("pin", "index", array("tag" => trim($tag)));
                ?>
"><?php 
                echo trim($tag);
                ?>
</a></li>
				<?php 
            }
            ?>
				<?php 
        }
        ?>
				</ul>
				<?php 
    }
    ?>
开发者ID:httvncoder,项目名称:151722441,代码行数:31,代码来源:index.php


示例17: output_pin

 private function output_pin($action, $order, $conditions = array())
 {
     $num_per_page = $this->settings['ui_layout']['pin_pagenum'];
     $num_per_page = $num_per_page ? $num_per_page : 15;
     $ptx_share = spClass('ptx_share');
     $wf = $this->spArgs("wf");
     if ($this->page == 1) {
         $guide['show'] = true;
         if ($this->category_id) {
             $ptx_tag = spClass('ptx_tag');
             $guide['tag_group'] = $ptx_tag->get_tag_group(" ptx_tag.category_id = '" . $this->category_id . "'");
         }
         $this->guide = $guide;
     }
     $args = array();
     if ($conditions['color']) {
         $args['idx'] = $conditions['color'];
     }
     $args['page'] = '2';
     $args['wf'] = '1';
     if ($this->category_id) {
         $conditions['category_id'] = $this->category_id;
         $args['cat'] = $this->category_id;
     }
     if ($this->settings['ui_layout']['orgin_post']) {
         $conditions['orgin_post'] = 1;
     }
     $this->nextpage_url = spUrl("pin", $action, $args);
     $shares = $ptx_share->search($conditions, $this->page, $num_per_page, null, $order);
     $this->pages = createTPages($ptx_share->spPager()->getPager(), 'pin', $action, $conditions);
     $shares = $this->add_ads($shares);
     $this->waterfallView($shares, 'pin');
     $need_header_footer = $wf == '1' ? false : true;
     $this->output("pin/index", $need_header_footer);
 }
开发者ID:httvncoder,项目名称:151722441,代码行数:35,代码来源:pin.php


示例18: logout

 function logout()
 {
     unset($_SESSION['userInfo']);
     $this->jump(spUrl('main', 'index', array('act' => 'logout')));
 }
开发者ID:AccountingPlatform,项目名称:easy-note-account,代码行数:5,代码来源:main.php


示例19: changeIdentity

 function changeIdentity()
 {
     if ($_SESSION['user']['type'] == 0) {
         $_SESSION['user']['type'] = 1;
         $this->jump(spUrl('sub', 'sitemanage'));
         // 跳转到首页
     } else {
         $_SESSION['user']['type'] = 0;
         $this->jump(spUrl('sub', 'product'));
         // 跳转到首页
     }
     //$this->jump($_SERVER['HTTP_REFERER']);跳转到之前的页面
 }
开发者ID:admarket,项目名称:Lambda,代码行数:13,代码来源:user.php


示例20: delete

 function delete()
 {
     $type = $this->spArgs('type');
     $id = $this->spArgs('id');
     $res = false;
     switch ($type) {
         case 'messages':
             $res = spClass('messages')->delete($id);
             if ($res) {
                 $this->success('删除成功!', spUrl('admin', 'talk'));
             } else {
                 $this->success('操作异常!', spUrl('admin', 'talk'));
             }
             return;
             break;
         case 'news':
             $res = spClass('news')->delete($id);
             break;
         case 'hirings':
             $res = spClass('hirings')->delete($id);
             break;
         case 'projects':
             $res = spClass('projects')->delete($id);
             break;
         case 'products':
             $res = spClass('products')->delete($id);
             break;
     }
     if ($res) {
         $this->success("删除成功!", "/index.php?c=admin&a=manager_content&type={$type}");
     } else {
         $this->success('操作异常!');
     }
 }
开发者ID:hfutxqd,项目名称:keding_website,代码行数:34,代码来源:admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sp_ColumnEnd函数代码示例发布时间:2022-05-23
下一篇:
PHP spError函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap