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

PHP get_url函数代码示例

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

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



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

示例1: process_code

function process_code($code)
{
    $url = null;
    if (empty($code)) {
        return -1;
    }
    $url = get_url($code);
    if (empty($url)) {
        return -1;
    }
    $response = verify_url($url);
    if ($response != null) {
        if ($response == 404) {
            return 2;
        }
    } else {
        return -1;
    }
    if (lookup_url_is_spam($url)) {
        return 1;
    }
    if (check4spam($url)) {
        add_bad_url_to_db($url);
        return 1;
    }
    return 0;
}
开发者ID:robertalks,项目名称:buh.bz,代码行数:27,代码来源:core.php


示例2: process_postback

 function process_postback($vars)
 {
     global $db;
     $this->log_debug($vars);
     $vars1 = $vars;
     $vars1['tipo'] = 'CP';
     $vars1['Comando'] = 'validar';
     $vars1['Token'] = $this->config['token'];
     $vars1['email_cobranca'] = $this->config['merchant_email'];
     foreach ($vars1 as $kk => $vv) {
         $v = urlencode($vv);
         $k = urlencode($kk);
         $vars2[] = "{$k}={$v}";
     }
     $vars2 = join('&', $vars2);
     $res = get_url("https://pagseguro.uol.com.br/Security/NPI/Default.aspx", $vars2);
     if ($res != "VERIFICADO") {
         $this->postback_error($res, $vars1);
         return false;
     }
     // process payment
     if (strtoupper($vars['StatusTransacao']) == 'APROVADO') {
         $err = $db->finish_waiting_payment($vars['ProdID_1'], "pagseguro", $vars['TransacaoID'], str_replace('.', '', $vars['ProdValor_1']), $vars);
         if ($err) {
             $this->postback_error("finish_waiting_payment error: {$err}", $vars);
         }
     }
 }
开发者ID:subashemphasize,项目名称:test_site,代码行数:28,代码来源:pagseguro.inc.php


示例3: _save

 /**
  * Saves the settings.
  */
 private final function _save()
 {
     $data = $_POST['setting'];
     // CSRF checks
     if (isset($_POST['csrf_token'])) {
         $csrf_token = $_POST['csrf_token'];
         if (!SecureToken::validateToken($csrf_token, BASE_URL . 'setting')) {
             Flash::set('error', __('Invalid CSRF token found!'));
             Observer::notify('csrf_token_invalid', AuthUser::getUserName());
             redirect(get_url('setting'));
         }
     } else {
         Flash::set('error', __('No CSRF token found!'));
         Observer::notify('csrf_token_not_found', AuthUser::getUserName());
         redirect(get_url('setting'));
     }
     if (!isset($data['allow_html_title'])) {
         $data['allow_html_title'] = 'off';
     }
     use_helper('Kses');
     $allowed = array('img' => array('src' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'b' => array(), 'blockquote' => array('cite' => array()), 'br' => array(), 'code' => array(), 'em' => array(), 'i' => array(), 'p' => array(), 'strike' => array(), 'strong' => array());
     $data['admin_title'] = kses(trim($data['admin_title']), $allowed);
     Setting::saveFromData($data);
     Flash::set('success', __('Settings have been saved!'));
     redirect(get_url('setting'));
 }
开发者ID:sindotnet,项目名称:cona,代码行数:29,代码来源:SettingController.php


示例4: get_widget

 /**
  * Render the widget in frontend
  *
  * @param array $args
  * @param array $instance
  * @return string
  */
 function get_widget($args, $instance)
 {
     extract(wp_parse_args($instance, array('align' => '', 'animation' => '', 'class' => '', 'style' => '', 'size' => '')));
     if (is_admin()) {
         return "<center><i class='icon-picture  icon-4x'></i></center>";
     }
     if (!empty($image['url'])) {
         if ($animation != "no-animation") {
             $class = "image animated_image animate_when_visible " . $animation;
         }
         $link = get_url($link);
         if ($image['id'] > 0 && $size != '') {
             $img = wp_get_attachment_image_src($image['id'], $size);
             $use_image = " src='{$img[0]}' width='{$img[1]}' height='{$img[2]}' ";
         } else {
             $img = $image['url'];
             $use_image = " src='{$img}' ";
         }
         if ($link) {
             $output = "<a href='" . $link . "' ><img class='img-responsive {$align} {$class} {$style}'  data-animation='" . esc_attr($animation) . "' {$use_image} alt='' /></a>";
         } else {
             $output = "<img class='img-responsive {$align} {$class} {$style}' ' data-animation='" . esc_attr($animation) . "' alt='' {$use_image} />";
         }
     }
     return $output;
 }
开发者ID:tharindulucky,项目名称:premium-demo,代码行数:33,代码来源:image.php


示例5: get_markers

function get_markers()
{
    global $vbulletin, $cfg;
    $rows = mysql_query("\nSELECT\n  `c`.`id`                     AS `id`,\n  `a`.`id`                     AS `ad_id`,\n  `c`.`companyname`            AS `name`,\n  `c`.`department`             AS `department`,\n  `c`.`pri_address`            AS `street`,\n  `c`.`pri_address_city`       AS `city`,\n  `c`.`pri_address_state`      AS `state`,\n  `c`.`pri_address_zip`        AS `zip`,\n  `countries`.`printable_name` AS `country_name`,\n  `c`.`tel_work`               AS `tel1`,\n  `c`.`tel_other`              AS `tel2`,\n  `c`.`pri_address_lat`        AS `lat`,\n  `c`.`pri_address_long`       AS `lng`,\n  `c`.`pri_address_mapurl`     AS `mapurl`,\n  `c`.`webpage`                AS `url`,\n  `a`.`ad_copy`                AS `ad_copy`,\n  FIND_IN_SET('sponsor',`c`.`nb_tags`) AS `sponsor`,\n  FIND_IN_SET('premium',`c`.`nb_tags`) AS `premium`,\n  FIND_IN_SET('premium',`c`.`nb_tags`) > 0 AS `premium_first`\nFROM (`contacts` `c`\n   LEFT JOIN `countries`\n     ON ((`countries`.`iso` = `c`.`pri_address_country`))\n   LEFT JOIN `nb_ads` `a`\n     ON ((`a`.`contact_id` = `c`.`id`)))\nWHERE (((FIND_IN_SET('hospital',`c`.`nb_tags`) || FIND_IN_SET('other_company',nb_tags)))\n       && FIND_IN_SET('publish',`c`.`nb_tags`) && pri_address_lat <> 0)\n    ") or die("Failed Query");
    $markers = array();
    $is_admin = $vbulletin->userinfo['permissions']['adminpermissions'];
    while ($row = mysql_fetch_assoc($rows)) {
        $url = get_url($row);
        $html = '';
        if ($is_sponsor = $row['sponsor'] && $row['ad_id']) {
            $img_file = $cfg['dir.forum'] . 'ads/' . $row['ad_id'] . '.png';
            list($width, $height, $type, $attr) = getimagesize($img_file);
            $html .= "<img src=\"{$img_file}\" width={$width} height={$height} /><br />";
        }
        if ($is_admin || in_array($vbulletin->userinfo['userid'], array(1, 0, 5650))) {
            $html .= '<a href="' . $cfg['dir.xchg'] . '/contacts/' . $row['id'] . '/edit">*</a> ';
        }
        /*
        if ($is_sponsor){
            $html    .= '<a href="' . $cfg['dir.home'] . 'our_sponsors/">Sponsor</a> ';
        }
        */
        $html .= '<a href="' . $url . '">' . htmlspecialchars($row['name']) . '</a>';
        $html .= '<br />' . htmlspecialchars(trim($row['city'] . ' ' . $row['state'] . ' ' . $row['country_name']));
        $html .= '<br />' . htmlspecialchars($row['tel1']);
        $markers[] = array('lat' => $row['lat'], 'lng' => $row['lng'], 'html' => $html);
    }
    return $markers;
}
开发者ID:holandacz,项目名称:nb4,代码行数:29,代码来源:map.php


示例6: index

 function index()
 {
     $this->title("客户在线留言 - " . $GLOBALS['LANG']['site_name']);
     $this->meta("title", "客户在线留言");
     $type = "default";
     $rt = $this->Cache->read(3600);
     if (is_null($rt)) {
         //获取当前位置
         $rt['hear'] = array();
         $rt['hear'][] = '<a href="' . SITE_URL . '">首页</a>&nbsp;&gt;&nbsp;';
         $rt['hear'][] = '<a href="feedback.php">客户留言</a>';
         //所有分类
         $rt['all_cate'] = $this->action('category', 'get_cate_tree', 0, 'default');
         //当前文章的分类的所有文章
         $order = "ORDER BY tb1.vieworder ASC, tb1.article_id DESC";
         $sql = "SELECT tb1.article_title,tb1.cat_id, tb1.article_id,tb2.cat_name FROM `{$this->App->prefix()}article` AS tb1";
         $sql .= " LEFT JOIN `{$this->App->prefix()}article_cate` AS tb2";
         $sql .= " ON tb1.cat_id = tb2.cat_id";
         $sql .= " WHERE tb2.type='{$type}'  {$order}";
         $article_list = $this->App->find($sql);
         $rt['article_list'] = array();
         if (!empty($article_list)) {
             foreach ($article_list as $k => $row) {
                 $rt['article_list'][$row['cat_id']][$k] = $row;
                 $rt['article_list'][$row['cat_id']][$k]['url'] = get_url($row['article_title'], $row['article_id'], $type . '.php?id=' . $row['article_id'], 'article', array($type, 'article', $row['article_id']));
             }
             unset($article_list);
         }
         //商品分类列表
         $rt['menu'] = $this->action('catalog', 'get_goods_cate_tree');
         $this->Cache->write($rt);
     }
     $this->set('rt', $rt);
     $this->template('feedback');
 }
开发者ID:zhaoshengloveqingqing,项目名称:fenxiao,代码行数:35,代码来源:controller.php


示例7: update_event

 public function update_event()
 {
     if (!isset($_POST['save'])) {
         Flash::set('error', __('Could not update this event!'));
     } else {
         use_helper('Kses');
         /* Prepare the data */
         $data = $_POST['event'];
         if (isset($data['id'])) {
             $data['id'] = kses(trim($data['id']), array());
         }
         $event = new CalendarEvent();
         if (isset($data['id'])) {
             $event->id = $data['id'];
             $event->created_by_id = $data['created_by_id'];
         }
         $event->title = $data['title'];
         $event->date_from = $data['date_from'];
         $event->date_to = $data['date_to'];
         $event->description = $data['description'];
         /* Check data and, if correct, save to DB */
         if ($event->checkData() && $event->save()) {
             if (isset($data['id'])) {
                 Flash::set('success', __('The event has been updated.'));
             } else {
                 Flash::set('success', __('A new event has been created.'));
             }
             redirect(get_url('plugin/calendar/events'));
         } else {
             Flash::setNow('error', __('There are errors in the form.'));
             $this->display(CALENDAR_VIEWS . '/update', array('event' => $event));
         }
     }
 }
开发者ID:hoglaeser,项目名称:wolfcms-calendar-plugin,代码行数:34,代码来源:CalendarController.php


示例8: wiki_replace_link_callback

function wiki_replace_link_callback($matches)
{
    if (count($matches) < 2) {
        return null;
    }
    if ($matches[1] == 'wiki') {
        $rev = Revisions::instance()->getTableName(true);
        $page = Wiki::instance()->getTableName(true);
        $where1 = 'WHERE page_id = ' . $matches[2] . ' AND project_id = ' . active_project()->getId();
        $where2 = 'WHERE id = ' . $matches[2] . ' AND project_id = ' . active_project()->getId();
        $sql = "SELECT page_id, name FROM {$rev} {$where1} ";
        $sql .= "AND revision = ( select revision from {$page} {$where2} )";
        //echo $sql;
        $row = DB::executeOne($sql);
        if (!count($row)) {
            return null;
        }
        $url = get_url($matches[1], 'view', array('id' => $matches[2]));
        $url = str_replace('&amp;', '&', $url);
        return '"' . $row['name'] . '(' . $row['page_id'] . ')":' . $url;
    }
    $user = Users::instance()->getTableName(true);
    $where1 = 'WHERE id = ' . $matches[2];
    $sql = "SELECT id, display_name FROM {$user} {$where1} ";
    echo $sql;
    $row = DB::executeOne($sql);
    if (!count($row)) {
        return null;
    }
    $url = get_url($matches[1], 'card', array('id' => $matches[2]));
    $url = str_replace('&amp;', '&', $url);
    return '"' . $row['display_name'] . '(' . $row['id'] . ')":' . $url;
}
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:33,代码来源:wiki.php


示例9: common

 public function common($params)
 {
     $Register = Register::getInstance();
     $output = '';
     if (!strpos($params, '{{ users_rating }}')) {
         return $params;
     }
     $Cache = new Cache();
     $Cache->lifeTime = 600;
     if ($Cache->check('pl_users_rating')) {
         $users = $Cache->read('pl_users_rating');
         $users = json_decode($users, true);
     } else {
         $users = $this->DB->select('users', DB_ALL, array('order' => '`rating` DESC', 'limit' => $this->limit));
         //$users = $this->DB->query($sql);
         $Cache->write(json_encode($users), 'pl_users_rating', array());
     }
     if (!empty($users)) {
         foreach ($users as $key => $user) {
             $link = get_link($user['name'], getProfileUrl($user['id']));
             $ava = file_exists(ROOT . '/sys/avatars/' . $user['id'] . '.jpg') ? get_url('/sys/avatars/' . $user['id'] . '.jpg') : get_url('/sys/img/noavatar.png');
             $output .= sprintf($this->wrap, $ava, $link, $user['rating'], $user['posts']);
         }
     }
     $output .= '<div class="etopu">' . get_link('Весь рейтинг', '/users/index?order=rating') . '</div>';
     return str_replace('{{ users_rating }}', $output, $params);
 }
开发者ID:VictorSproot,项目名称:AtomXCMS-2,代码行数:27,代码来源:index.php


示例10: run

 public function run($formData, $step, &$state)
 {
     $response = parent::run($formData, $step, $state);
     if (!$response->isSuccessful()) {
         return $response;
     }
     $stepsData = [];
     foreach ($state['steps'] as $aStep) {
         if ($stepData = $aStep->getData()) {
             $stepsData = array_merge($stepsData, $stepData);
         }
     }
     unset($stepsData['languages']);
     unset($_SESSION['install_locale']);
     InstallerUtils::createConfig($stepsData, BASE_PATH . '/api');
     InstallerUtils::createTables(BASE_PATH);
     InstallerUtils::addDefaultSettings($stepsData, BASE_PATH);
     $stepsData = InstallerUtils::addDefaultUser($stepsData);
     InstallerUtils::installSchema($stepsData['db_schema'], BASE_PATH);
     $data = ['user' => ['email' => $stepsData['directus_email'], 'token' => $stepsData['user_token'], 'password' => $stepsData['directus_password']], 'project' => ['name' => $stepsData['directus_name'], 'version' => DIRECTUS_VERSION, 'url' => get_url()], 'database' => ['host' => $stepsData['db_host'], 'name' => $stepsData['db_name'], 'user' => $stepsData['db_user'], 'password' => $stepsData['db_password']]];
     if ($response->getData('send_config_email')) {
         Mail::send('mail/new-install.twig.html', $data, function ($message) use($data) {
             $message->setSubject(__t('your_new_directus_instance_x', ['name' => $data['project']['name']]));
             $message->setTo($data['user']['email']);
         });
     }
     return $response;
 }
开发者ID:YounessTayer,项目名称:directus,代码行数:28,代码来源:ConfirmStep.php


示例11: __construct

 function __construct()
 {
     AuthUser::load();
     if (!AuthUser::isLoggedIn()) {
         redirect(get_url('login'));
     }
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:7,代码来源:PluginController.php


示例12: check_member

 /**
  * 检测用户是否已经登陆 
  */
 public final function check_member()
 {
     if (GROUP_NAME == 'Member' && MODULE_NAME == 'Index' && in_array(ACTION_NAME, array('login', 'register', 'logout', 'connectregister'))) {
         return true;
     } else {
         if (AppframeAction::$Cache['uid']) {
             //禁止访问会员组
             if (AppframeAction::$Cache['User']['groupid'] == 1) {
                 service("Passport")->logoutLocal();
                 $this->error("您的会员组为禁止访问!", CONFIG_SITEURL);
             } else {
                 if (AppframeAction::$Cache['User']['groupid'] == 7) {
                     //邮箱认证
                     service("Passport")->logoutLocal();
                     $this->error("您还没有进行邮箱认证!", CONFIG_SITEURL);
                 }
             }
             //锁定用户
             if (AppframeAction::$Cache['User']['islock'] == 1) {
                 service("Passport")->logoutLocal();
                 $this->error("您的帐号已经被锁定!", CONFIG_SITEURL);
             }
         } else {
             service("Passport")->logoutLocal();
             $forward = isset($_REQUEST['forward']) ? $_REQUEST['forward'] : get_url();
             cookie("forward", $forward);
             $this->error("您的会话已过期,请重新登录。!", U("Member/Index/login"));
         }
     }
 }
开发者ID:BGCX262,项目名称:ztoa-svn-to-git,代码行数:33,代码来源:MemberbaseAction.class.php


示例13: get_widget

 /**
  * Render the widget in frontend
  *
  * @param array $args
  * @param array $instance
  * @return string
  */
 function get_widget($args, $instance)
 {
     extract(wp_parse_args($instance, array('align' => '', 'animation' => '', 'class' => '', 'style' => '', 'size' => '', 'image' => array(), 'name' => '', 'subtitle' => '', '_content' => '', 'output' => '')));
     if (is_admin()) {
         return "<center><i class='icon-picture  icon-4x'></i></center>";
     }
     if (isset($image['id']) && !empty($image['id'])) {
         $img = wp_get_attachment_image_src($image['id'], 'medium');
         $use_image = " src='{$img[0]}' width='{$img[1]}' height='{$img[2]}' ";
         //button link
         if (is_array($link) && count($link) > 0) {
             $link = get_url($link);
         } else {
             $link = '#';
         }
         $target = $link_target == '_blank' ? 'target="_blank"' : '';
         $class = $color . " " . $size . " " . $style;
         if ($icon_select == '1') {
             $font_icon = '<i class="' . $icon . '"></i> ';
             $class = $class . " btn-with-icon";
         }
         $link = '<a href="' . $link . '" class="btn ' . $class . '" ' . $target . '>' . $font_icon . $label . '</a>';
         $output = "\n            <div class='shape'>\n                <a href='#' class='team-overlay hexagon'></a>\n                <div class='details'>\n                    <span class='heading'>{$name}</span>\n\n                    <p>\n                        {$subtitle} <br />\n                        {$_content}\n                    </p> \n                    <br />       \n                    {$link}      \n                </div>\n                <div class='bg'></div>\n                <div class='base'>\n                    <img class='img-responsive' {$use_image} alt='' />\n                </div>\n            </div>\n            ";
     }
     return $output;
 }
开发者ID:tharindulucky,项目名称:premium-demo,代码行数:33,代码来源:team.php


示例14: update_category

 /**
  * Show and process config category form
  *
  * @param void
  * @return null
  */
 function update_category()
 {
     $category = ConfigCategories::findById(get_id());
     if (!$category instanceof ConfigCategory) {
         flash_error(lang('config category dnx'));
         $this->redirectToReferer(get_url('administration'));
     }
     // if
     if ($category->isEmpty()) {
         flash_error(lang('config category is empty'));
         $this->redirectToReferer(get_url('administration'));
     }
     // if
     $options = $category->getOptions(false);
     $categories = ConfigCategories::getAll(false);
     tpl_assign('category', $category);
     tpl_assign('options', $options);
     tpl_assign('config_categories', $categories);
     $submitted_values = array_var($_POST, 'options');
     if (is_array($submitted_values)) {
         foreach ($options as $option) {
             $new_value = array_var($submitted_values, $option->getName());
             if (is_null($new_value) || $new_value == $option->getValue()) {
                 continue;
             }
             $option->setValue($new_value);
             $option->save();
         }
         // foreach
         flash_success(lang('success update config category', $category->getDisplayName()));
         $this->redirectTo('administration', 'configuration');
     }
     // if
     $this->setSidebar(get_template_path('update_category_sidebar', 'config'));
 }
开发者ID:469306621,项目名称:Languages,代码行数:41,代码来源:ConfigController.class.php


示例15: loadPanels

 private function loadPanels($options)
 {
     if (!$this->panels) {
         $contact_pg_ids = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId(), false);
         $this->panels = array();
         $sql = "\r\n\t\t\t\tSELECT * FROM " . TABLE_PREFIX . "tab_panels \r\n\t\t\t\tWHERE \r\n\t\t\t\t\tenabled = 1 AND\t\t\t\t\t\r\n\t\t\t\t\t( \t\r\n\t\t\t\t\t\tplugin_id IS NULL OR plugin_id=0 OR\r\n\t\t\t\t\t\tplugin_id IN (SELECT id FROM " . TABLE_PREFIX . "plugins WHERE is_installed = 1 AND is_activated = 1) \r\n\t\t\t\t\t)\r\n\t\t\t\t\tAND id IN (SELECT tab_panel_id FROM " . TABLE_PREFIX . "tab_panel_permissions WHERE permission_group_id IN ({$contact_pg_ids}))\r\n\t\t\t\tORDER BY ordering ASC ";
         $res = DB::execute($sql);
         while ($row = $res->fetchRow()) {
             $object = array("title" => lang($row['title']), "id" => $row['id'], "quickAddTitle" => lang($row['default_controller']), "refreshOnWorkspaceChange" => (bool) $row['refresh_on_context_change'], "defaultController" => $row['default_controller'], "defaultContent" => array("type" => "url", "data" => get_url($row['default_controller'], $row['default_action'])), "enabled" => $row['enabled'], "type" => $row['type'], "tabTip" => lang($row['title']));
             if (config_option('show_tab_icons')) {
                 $object["iconCls"] = $row['icon_cls'];
             }
             if ($row['initial_controller'] && $row['initial_action']) {
                 $object["initialContent"] = array("type" => "url", "data" => get_url($row['initial_controller'], $row['initial_action']));
             }
             if ($row['id'] == 'more-panel' && config_option('getting_started_step') >= 99) {
                 $object['closable'] = true;
                 if (!user_config_option('settings_closed')) {
                     $this->panels[] = $object;
                 }
             } else {
                 $this->panels[] = $object;
             }
         }
     }
     return $this->panels;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:27,代码来源:PanelController.class.php


示例16: index

 public function index()
 {
     $url = get_url();
     //获取当前页面的URL地址
     $memb = M('Member');
     if (IS_POST) {
         $idarr = I('post.idarr');
         $where = array('vip_id' => array('in', $idarr));
         $res = $memb->where($where)->delete();
         if ($res) {
             echo "<script>window.location.href=" . $url . ";</script>";
         } else {
             echo "<script>alert('删除失败');window.history.go(-1);</script>";
         }
     }
     $current = I('get.page', 1);
     $limit = 20;
     $art = ($current - 1) * $limit;
     $fir = strpos($url, 'page');
     if ($fir) {
         $purl = mb_substr($url, 0, $fir - 1);
     } else {
         $purl = $url;
     }
     $count = $memb->count();
     $show = list_page($current, $limit, $count, $purl);
     $vip = $memb->order('vip_addtime DESC')->limit($art, $limit)->select();
     $data = array('vip' => $vip, 'show' => $show);
     $this->assign($data);
     $this->display();
 }
开发者ID:994724435,项目名称:Ride,代码行数:31,代码来源:MemberController.class.php


示例17: manage_links

 function manage_links($links)
 {
     global $base_url, $login_uid, $page_uid;
     $cnt = count($links);
     if ($cnt == 0) {
         return $links;
     }
     $result = array();
     for ($i = 0; $i < $cnt; $i++) {
         $result[$i]['comment_id'] = $links[$i]['comment_id'];
         $result[$i]['user_id'] = $links[$i]['user_id'];
         $result[$i]['comment'] = $links[$i]['comment'];
         $result[$i]['created'] = $links[$i]['created'];
         $usr = new User();
         $usr->load((int) $links[$i]['user_id']);
         $result[$i]['user_name'] = $usr->login_name;
         $result[$i]['picture'] = $usr->picture;
         $result[$i]['first_name'] = $usr->first_name;
         $result[$i]['last_name'] = $usr->last_name;
         $temp_array = array($links[$i]['parent_id'], $links[$i]['user_id']);
         if (in_array($login_uid, $temp_array)) {
             $result[$i]['delete_link'] = $base_url . '/deletecomment.php?comment_id=' . $links[$i]['comment_id'];
         }
         $login = User::get_login_name_from_id($links[$i]['user_id']);
         $current_url = $base_url . '/' . FILE_USER_BLOG . '?uid=' . $links[$i]['user_id'];
         $url_perms = array('current_url' => $current_url, 'login' => $login);
         $url = get_url(FILE_USER_BLOG, $url_perms);
         $result[$i]['hyper_link'] = $url;
     }
     return $result;
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:31,代码来源:ShowUserCommentModule.php


示例18: msgbox

function msgbox($msg = '', $event = 'BACK', $die = 1)
{
    global $PHP_SELF;
    $script = $msg ? 'alert("' . $msg . '");' : NULL;
    switch ($event) {
        case 'BACK':
            $script .= 'history.back(-1);';
            break;
        case 'NOT':
            break;
        case 'CLOSE':
            $script .= 'window.opener=null; window.open("","_self"); window.close();';
            break;
        case 'CURRENT':
            $script .= 'location = "' . $PHP_SELF . '";';
            break;
        case 'CURRENTS':
            $script .= 'location = "' . get_url() . '";';
            break;
        default:
            $script .= 'location = "' . $event . '";';
            break;
    }
    if (!empty($script)) {
        echo '<script type="text/javascript">' . $script . '</script> ';
    }
    $die && exit;
}
开发者ID:dalinhuang,项目名称:water-svn,代码行数:28,代码来源:common.php


示例19: tuijian_goods

 function tuijian_goods($list = 8)
 {
     $w = "(g.is_best='1' OR g.is_new='1' OR g.is_hot='1' OR g.is_promote='1')";
     $sql = "SELECT g.goods_id,g.goods_sn,g.goods_bianhao,g.goods_name,g.market_price,g.shop_price,g.promote_price,g.goods_thumb,g.goods_img,g.promote_price, g.promote_start_date, g.promote_end_date,g.is_promote,g.sale_count,b.brand_name FROM `{$this->App->prefix()}goods` AS g LEFT JOIN `{$this->App->prefix()}brand` AS b ON g.brand_id=b.brand_id WHERE g.is_on_sale='1' AND g.is_alone_sale='1' AND {$w} ORDER BY RAND() DESC LIMIT {$list}";
     $rt = $this->App->find($sql);
     $rts = array();
     if (!empty($rt)) {
         foreach ($rt as $k => $row) {
             $rts[$k] = $row;
             $rts[$k]['goods_thumb'] = SITE_URL . $row['goods_thumb'];
             $rts[$k]['goods_img'] = SITE_URL . $row['goods_img'];
             $rts[$k]['url'] = get_url($row['goods_name'], $row['goods_id'], SITE_URL . 'product.php?id=' . $row['goods_id'], 'goods', array('product', 'index', $row['goods_id']));
             if ($row['is_promote'] == '1') {
                 //促销 价格
                 if ($row['promote_start_date'] < mktime() && $row['promote_end_date'] > mktime()) {
                     $row['promote_price'] = format_price($row['promote_price']);
                 } else {
                     $row['promote_price'] = "0.00";
                 }
             } else {
                 $row['promote_price'] = "0.00";
             }
             $rts[$k]['promote_price'] = $row['promote_price'];
         }
         unset($rt);
     }
     return $rts;
 }
开发者ID:zhaoshengloveqingqing,项目名称:fenxiao,代码行数:28,代码来源:controller.php


示例20: oauth

		public function oauth() {
			pc_base::load_plugin_class('weibooauth','',0);
			$setting = getcache('weibo_var','plugins');			
			if(!isset($_REQUEST['oauth_verifier']) || $_REQUEST['oauth_verifier'] == '') {
				if($this->auth_db->get_one(array('source'=>'sina'))) {
					$txt = '授权成功,<a href="?m=zl_admin&c=plugin&a=config&pluginid='.$this->pluginid.'&module=removeauth&pc_hash='.$_SESSION['pc_hash'].'">解除绑定</a>';
				} else {
					$o = new WeiboOAuth( $setting['wb_akey'] , $setting['wb_skey']);
					$keys = $o->getRequestToken();
					print_r($keys);
					$aurl = $o->getAuthorizeURL( $keys['oauth_token'] ,false , get_url());
					$_SESSION['keys'] = $keys;
					$txt = '<a href="'.$aurl.'">点击进行授权</a>';
				}
				
			} else {
				$o = new WeiboOAuth( $setting['wb_akey'] , $setting['wb_skey'] , $_SESSION['keys']['oauth_token'] , $_SESSION['keys']['oauth_token_secret']  );
				$last_key = $o->getAccessToken(  $_REQUEST['oauth_verifier'] ) ;				
				$c = new WeiboClient( $setting['wb_akey'] , $setting['wb_skey'] , $last_key['oauth_token'] , $last_key['oauth_token_secret']  );
				$ms  = $c->home_timeline(); // done
				$me = $c->verify_credentials();	
				$this->auth_db->insert(array('uid'=>$me['id'],'token'=>$last_key['oauth_token'],'tsecret'=>$last_key['oauth_token_secret'],'source'=>'sina'));
				$txt = '授权成功,'.$me['name'].'<a href="?m=zl_admin&c=plugin&a=config&pluginid='.$this->pluginid.'&module=removeauth&pc_hash='.$_SESSION['pc_hash'].'">解除绑定</a>';
			}
			include $this->op->plugin_tpl('oauth',PLUGIN_ID);
		}
开发者ID:panhongsheng,项目名称:zl_cms,代码行数:26,代码来源:plugin_admin.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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