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


PHP common::AbsoluteUrl方法代码示例

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


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

示例1: Result

 function Result()
 {
     global $page;
     if ($this->from_page && $this->title) {
         if (!$this->show_popup) {
             $url = common::AbsoluteUrl($this->title, '', true, false);
             $page->ajaxReplace[] = array('eval', '', 'window.location="' . $url . '";');
         }
         return true;
     }
     return $this->show_popup;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:12,代码来源:Page_Layout.php

示例2: CopyPage

 /**
  * Perform a page copy
  *
  */
 function CopyPage()
 {
     global $gp_index, $gp_titles, $page, $langmessage;
     //existing page info
     $from_title = $_POST['from_title'];
     if (!isset($gp_index[$from_title])) {
         message($langmessage['OOPS_TITLE']);
         return false;
     }
     $from_index = $gp_index[$from_title];
     $info = $gp_titles[$from_index];
     //check the new title
     $title = $_POST['title'];
     $title = admin_tools::CheckPostedNewPage($title, $message);
     if ($title === false) {
         message($message);
         return false;
     }
     //get the existing content
     $from_file = gpFiles::PageFile($from_title);
     $contents = file_get_contents($from_file);
     //add to $gp_index first!
     $index = common::NewFileIndex();
     $gp_index[$title] = $index;
     $file = gpFiles::PageFile($title);
     if (!gpFiles::Save($file, $contents)) {
         message($langmessage['OOPS'] . ' (File not saved)');
         return false;
     }
     //add to gp_titles
     $new_titles = array();
     $new_titles[$index]['label'] = admin_tools::PostedLabel($_POST['title']);
     $new_titles[$index]['type'] = $info['type'];
     $gp_titles += $new_titles;
     if (!admin_tools::SavePagesPHP()) {
         message($langmessage['OOPS'] . ' (CP2)');
         return false;
     }
     message($langmessage['SAVED']);
     if (isset($_REQUEST['redir'])) {
         $url = common::AbsoluteUrl($title, '', true, false);
         $page->ajaxReplace[] = array('eval', '', 'window.setTimeout(function(){window.location="' . $url . '"},15000);');
         message(sprintf($langmessage['will_redirect'], common::Link_Page($title)));
     }
     return $index;
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:50,代码来源:admin_menu_new.php

示例3: IdUrl

 static function IdUrl($request_cmd = 'cv')
 {
     global $config, $dataDir, $gpLayouts;
     $path = addon_browse_path . '/Resources?';
     //command
     $args['cmd'] = $request_cmd;
     $_SERVER += array('SERVER_SOFTWARE' => '');
     //checkin
     //$args['uniq'] = $config['gpuniq'];
     $args['mdu'] = substr(md5($config['gpuniq']), 0, 20);
     $args['site'] = common::AbsoluteUrl('');
     //keep full path for backwards compat
     $args['gpv'] = gpversion;
     $args['php'] = phpversion();
     $args['se'] =& $_SERVER['SERVER_SOFTWARE'];
     $args['data'] = $dataDir;
     $args['zlib'] = (int) function_exists('gzcompress');
     if (defined('service_provider_id') && is_numeric(service_provider_id)) {
         $args['provider'] = service_provider_id;
     }
     //plugins
     $addon_ids = array();
     if (isset($config['addons']) && is_array($config['addons'])) {
         foreach ($config['addons'] as $addon => $addon_info) {
             if (!isset($addon_info['id'])) {
                 continue;
             }
             $addon_id = $addon_info['id'];
             if (isset($addon_info['order'])) {
                 $addon_id .= '.' . $addon_info['order'];
             }
             $addon_ids[] = $addon_id;
         }
     }
     //themes
     if (isset($config['themes']) && is_array($config['themes'])) {
         foreach ($config['themes'] as $addon => $addon_info) {
             if (!isset($addon_info['id'])) {
                 continue;
             }
             $addon_id = $addon_info['id'];
             if (isset($addon_info['order'])) {
                 $addon_id .= '.' . $addon_info['order'];
             }
             $addon_ids[] = $addon_id;
         }
     }
     //layouts
     if (is_array($gpLayouts)) {
         foreach ($gpLayouts as $layout_info) {
             if (!isset($layout_info['addon_id'])) {
                 continue;
             }
             $addon_ids[] = $layout_info['addon_id'];
         }
     }
     $addon_ids = array_unique($addon_ids);
     $args['as'] = implode('-', $addon_ids);
     return $path . http_build_query($args, '', '&');
 }
开发者ID:Knuzen,项目名称:gpEasy-CMS,代码行数:60,代码来源:common.php

示例4: TestResponse

 /**
  * Try to fetch a response using RemoteGet to see if we're getting a 500 error
  *
  * @access public
  * @static
  * @since 1.7
  *
  * @return boolean
  */
 static function TestResponse()
 {
     //get url, force gp_rewrite to $new_gp_rewrite
     $rewrite_before = $_SERVER['gp_rewrite'];
     $_SERVER['gp_rewrite'] = true;
     common::SetLinkPrefix();
     $abs_url = common::AbsoluteUrl('Site_Map', '', true, false);
     $_SERVER['gp_rewrite'] = $rewrite_before;
     common::SetLinkPrefix();
     $result = gpRemoteGet::Get_Successful($abs_url);
     if (!$result) {
         return false;
     }
     return true;
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:24,代码来源:admin_permalinks.php

示例5: IdUrl

 function IdUrl($request_cmd = 'cv')
 {
     global $config, $gpversion, $addonBrowsePath;
     $path = $addonBrowsePath . '/Special_Resources?';
     //command
     $args['cmd'] = $request_cmd;
     $_SERVER += array('SERVER_SOFTWARE' => '');
     //checkin
     //$args['uniq'] = $config['gpuniq'];
     $args['mdu'] = substr(md5($config['gpuniq']), 0, 20);
     $args['site'] = common::AbsoluteUrl('');
     //keep full path for backwards compat
     $args['gpv'] = $gpversion;
     $args['php'] = phpversion();
     $args['se'] =& $_SERVER['SERVER_SOFTWARE'];
     if (defined('service_provider_id') && is_numeric(service_provider_id)) {
         $args['provider'] = service_provider_id;
     }
     //plugins
     $addon_ids = array();
     if (isset($config['addons']) && is_array($config['addons'])) {
         foreach ($config['addons'] as $addon => $addon_info) {
             if (isset($addon_info['id'])) {
                 $addon_id = $addon_info['id'];
                 if (isset($addon_info['order'])) {
                     $addon_id .= '.' . $addon_info['order'];
                 }
                 $addon_ids[] = $addon_id;
             }
         }
     }
     //themes
     if (isset($config['themes']) && is_array($config['themes'])) {
         foreach ($config['themes'] as $addon => $addon_info) {
             if (isset($addon_info['id'])) {
                 $addon_id = $addon_info['id'];
                 if (isset($addon_info['order'])) {
                     $addon_id .= '.' . $addon_info['order'];
                 }
                 $addon_ids[] = $addon_id;
             }
         }
     }
     $args['as'] = implode('-', $addon_ids);
     return $path . http_build_query($args, '', '&');
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:46,代码来源:common.php

示例6: HiddenSaved

 /**
  * Message or redirect when file is saved
  *
  */
 public function HiddenSaved($new_index)
 {
     global $langmessage;
     msg($langmessage['SAVED']);
     $this->search_page = 0;
     //take user back to first page where the new page will be displayed
     if (isset($_REQUEST['redir'])) {
         $title = common::IndexToTitle($new_index);
         $url = common::AbsoluteUrl($title, '', true, false);
         $page->ajaxReplace[] = array('location', $url, 0);
     }
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:16,代码来源:admin_menu_new.php

示例7: TestResponse

 /**
  * Try to fetch a response using RemoteGet to see if we're getting a 500 error
  *
  * @access public
  * @static
  * @since 1.7
  *
  * @return boolean
  */
 public static function TestResponse($new_rewrite = true)
 {
     //get url, force gp_rewrite to $new_gp_rewrite
     $rewrite_before = $_SERVER['gp_rewrite'];
     $_SERVER['gp_rewrite'] = $new_rewrite;
     common::SetLinkPrefix();
     $abs_url = common::AbsoluteUrl('Site_Map', '', true, false);
     //can't be special_site_map, otherwise common::IndexToTitle() will be called during install
     $_SERVER['gp_rewrite'] = $rewrite_before;
     common::SetLinkPrefix();
     return self::ConfirmGet($abs_url, false);
 }
开发者ID:stegrams,项目名称:Typesetter,代码行数:21,代码来源:admin_permalinks.php


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