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

PHP getSiteUrl函数代码示例

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

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



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

示例1: showRecent

function showRecent()
{
    $numResults = 10;
    $urlLen = 60;
    $query = "select id, url from main order by creation desc limit {$numResults}";
    $status = mysql_query($query);
    $query = "select id, url, count from main order by count desc limit {$numResults}";
    $countresult = mysql_query($query);
    $query = "select id, url, count from main order by accessed desc limit {$numResults}";
    $accessresult = mysql_query($query);
    $query = "select id from main order by creation desc limit 1";
    $randresult = mysql_query($query);
    $numrows = mysql_num_rows($status);
    if ($numrows == 0) {
        print "no links yet!";
    } else {
        $siteurl = getSiteUrl();
        print "<br />";
        print "<b>random mooshu'd link:</b>";
        $randrow = mysql_fetch_array($randresult);
        $randurlid = rand(1, $randrow['id']);
        $shortenedID = shortenUrlID($randurlid);
        print "<br />";
        print "<ul>";
        print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b></li>";
        print "</ul>";
        print "<br />";
        print "<b>recently mooshu'd links:</b>";
        print "<ul>";
        while ($row = mysql_fetch_array($status)) {
            $shortenedID = shortenUrlID($row['id']);
            $url = $row['url'];
            $suburl = substr($row['url'], 0, $urlLen);
            print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b>: <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>";
        }
        print "</ul>";
        print "<br />";
        print "<b>most accessed mooshu'd links:</b>";
        print "<ul>";
        while ($row = mysql_fetch_array($countresult)) {
            $shortenedID = shortenUrlID($row['id']);
            $url = $row['url'];
            $suburl = substr($row['url'], 0, $urlLen);
            $count = $row['count'];
            print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b> ({$count}): <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>";
        }
        print "</ul>";
        print "<br />";
        print "<b>recently accessed mooshu'd links:</b>";
        print "<ul>";
        while ($row = mysql_fetch_array($accessresult)) {
            $shortenedID = shortenUrlID($row['id']);
            $url = $row['url'];
            $suburl = substr($row['url'], 0, $urlLen);
            $count = $row['count'];
            print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b> ({$count}): <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>";
        }
        print "</ul>";
    }
}
开发者ID:ultramookie,项目名称:mooshu,代码行数:60,代码来源:mooshulib.php


示例2: __construct

 /** 
  * The constructor of the RSS class. 
  * 
  * @param $title the title of the page that generates the rss.
  * @param $linkPath the link of the page that generates the rss.
  * @param $description the description of the page.
  * @param $atomLinkSelf the url that point to the RSS feed.
  */
 public function __construct($title, $linkPath, $description, $atomLinkSelf)
 {
     $this->title = $title;
     $this->link = getSiteUrl() . $linkPath;
     $this->description = $description;
     $this->atomLinkSelf = $atomLinkSelf;
 }
开发者ID:rochris,项目名称:hartapoliticii,代码行数:15,代码来源:rss_class.php


示例3: actionUpdate

 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     //        ma($model);
     if (isset($_POST['Productcategory'])) {
         $image = $model->image;
         $model->attributes = $_POST['Productcategory'];
         $uploadFile = CUploadedFile::getInstance($model, 'image');
         if ($uploadFile) {
             $model->image = getSiteUrl() . '/categoryimg/' . $uploadFile->name;
         } else {
             $model->image = $image;
         }
         $model->display_in_menu = $_POST['Productcategory']['display_in_menu'];
         //            ma($model);
         if ($model->save()) {
             if ($uploadFile) {
                 $PATH = Yii::getPathOfAlias("webroot.categoryimg") . '/' . $uploadFile->name;
                 $uploadFile->saveAs($PATH);
             }
             //                $this->redirect(array('view', 'id' => $model->id));
             $this->redirect(array('productcategory/admin'));
         }
     }
     $this->render('update', array('model' => $model));
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:33,代码来源:ProductcategoryController.php


示例4: dispHomepageIndex

 /**
  * @brief 카페 메인 출력
  **/
 function dispHomepageIndex()
 {
     $oHomepageAdminModel =& getAdminModel('homepage');
     $oHomepageModel =& getModel('homepage');
     $oModuleModel =& getModel('module');
     $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     if (!is_dir($template_path) || !$this->module_info->skin) {
         $this->module_info->skin = 'xe_default';
         $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin);
     }
     $this->setTemplatePath($template_path);
     // 카페 목록을 구함
     $page = Context::get('page');
     $output = $oHomepageAdminModel->getHomepageList($page);
     if ($output->data && count($output->data)) {
         foreach ($output->data as $key => $val) {
             $banner_src = 'files/attach/cafe_banner/' . $val->site_srl . '.jpg';
             if (file_exists(_XE_PATH_ . $banner_src)) {
                 $output->data[$key]->cafe_banner = $banner_src . '?rnd=' . filemtime(_XE_PATH_ . $banner_src);
             }
             $url = getSiteUrl($val->domain, '');
             if (substr($url, 0, 1) == '/') {
                 $url = substr(Context::getRequestUri(), 0, -1) . $url;
             }
             $output->data[$key]->url = $url;
         }
     }
     Context::set('total_count', $output->total_count);
     Context::set('total_page', $output->total_page);
     Context::set('page', $output->page);
     Context::set('homepage_list', $output->data);
     Context::set('page_navigation', $output->page_navigation);
     // 카페 생성 권한 세팅
     if ($oHomepageModel->isCreationGranted()) {
         Context::set('isEnableCreateCafe', true);
         Context::addJsFilter($this->module_path . 'tpl/filter', 'cafe_creation.xml');
     }
     // 카페의 최신 글 추출
     $output = executeQueryArray('homepage.getNewestDocuments');
     Context::set('newest_documents', $output->data);
     // 카페의 최신 댓글 추출
     $output = executeQueryArray('homepage.getNewestComments');
     Context::set('newest_comments', $output->data);
     $logged_info = Context::get('logged_info');
     if ($logged_info->member_srl) {
         $myargs->member_srl = $logged_info->member_srl;
         $output = executeQueryArray('homepage.getMyCafes', $myargs);
         Context::set('my_cafes', $output->data);
     }
     $homepage_info = $oModuleModel->getModuleConfig('homepage');
     if ($homepage_info->use_rss == 'Y') {
         Context::set('rss_url', getUrl('', 'mid', $this->module_info->mid, 'act', 'rss'));
     }
     $this->setTemplateFile('index');
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:58,代码来源:homepage.view.php


示例5: actionUpdate

 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = $this->loadModel($id);
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Product'])) {
         $model->attributes = $_POST['Product'];
         $pos = strpos($model->pic, 'productimg/');
         if ($pos) {
             $model->pic = getSiteUrl() . $model->pic;
         }
         //            $imgName = str_replace("/productimg/", "", $model->pic);
         //            $model->pic = $imgName;
         if (count($model->per100g)) {
             $per100g = array();
             foreach ($model->per100g as $name => $value) {
                 if (!$value['label'] && !$value['value']) {
                     continue;
                 }
                 $per100g[$name] = $value;
             }
             if (count($per100g)) {
                 $model->per100g = json_encode($per100g);
             } else {
                 $model->per100g = '';
             }
         }
         if (count($model->allergies)) {
             $model->allergies = implode(',', $model->allergies);
         }
         if (count($model->ingredients)) {
             $model->ingredients = implode(',', $model->ingredients);
         }
         if ($model->save()) {
             $this->redirect(array('product/admin'));
         }
     }
     $this->render('update', array('model' => $model));
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:44,代码来源:ProductController.php


示例6: getPhpCacheCode

 /**
  * @brief array로 정렬된 노드들을 php code로 변경하여 return
  * 메뉴에서 메뉴를 tpl에 사용시 xml데이터를 사용할 수도 있지만 별도의 javascript 사용이 필요하기에
  * php로 된 캐시파일을 만들어서 db이용없이 바로 메뉴 정보를 구할 수 있도록 한다
  * 이 캐시는 ModuleHandler::displayContent() 에서 include하여 Context::set() 한다
  **/
 function getPhpCacheCode($source_node, $tree, $site_srl, $domain)
 {
     $output = array("buff" => "", "url_list" => array());
     if (!$source_node) {
         return $output;
     }
     $oMenuAdminModel =& getAdminModel('menu');
     foreach ($source_node as $menu_item_srl => $node) {
         // 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴
         if ($menu_item_srl && $tree[$menu_item_srl]) {
             $child_output = $this->getPhpCacheCode($tree[$menu_item_srl], $tree, $site_srl, $domain);
         } else {
             $child_output = array("buff" => "", "url_list" => array());
         }
         // 변수 정리
         $names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl);
         foreach ($names as $key => $val) {
             $name_arr_str .= sprintf('"%s"=>"%s",', $key, str_replace('\\', '\\\\', htmlspecialchars($val)));
         }
         $name_str = sprintf('$_menu_names[%d] = array(%s); %s', $node->menu_item_srl, $name_arr_str, $child_output['name']);
         // 현재 노드의 url값이 공란이 아니라면 url_list 배열값에 입력
         if ($node->url) {
             $child_output['url_list'][] = $node->url;
         }
         $output['url_list'] = array_merge($output['url_list'], $child_output['url_list']);
         // node->group_srls값이 있으면
         if ($node->group_srls) {
             $group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s)))))', $node->group_srls);
         } else {
             $group_check_code = "true";
         }
         // 변수 정리
         $href = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $node->href);
         $url = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $node->url);
         if (preg_match('/^([0-9a-zA-Z\\_\\-]+)$/i', $node->url)) {
             $href = getSiteUrl($domain, '', 'mid', $node->url);
             $pos = strpos($href, $_SERVER['HTTP_HOST']);
             if ($pos !== false) {
                 $href = substr($href, $pos + strlen($_SERVER['HTTP_HOST']));
             }
         } else {
             $href = $url;
         }
         $open_window = $node->open_window;
         $normal_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $node->normal_btn);
         $hover_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $node->hover_btn);
         $active_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $node->active_btn);
         $selected = '"' . implode('","', $child_output['url_list']) . '"';
         $child_buff = $child_output['buff'];
         $expand = $node->expand;
         $normal_btn = $node->normal_btn;
         if ($normal_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $normal_btn)) {
             $normal_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $normal_btn);
         } else {
             $normal_btn = '';
         }
         $hover_btn = $node->hover_btn;
         if ($hover_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $hover_btn)) {
             $hover_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $hover_btn);
         } else {
             $hover_btn = '';
         }
         $active_btn = $node->active_btn;
         if ($active_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $active_btn)) {
             $active_btn = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $active_btn);
         } else {
             $active_btn = '';
         }
         $group_srls = $node->group_srls;
         if ($normal_btn) {
             if (preg_match('/\\.png$/', $normal_btn)) {
                 $classname = 'class=\\"iePngFix\\"';
             } else {
                 $classname = '';
             }
             if ($hover_btn) {
                 $hover_str = sprintf('onmouseover=\\"this.src=\'%s\'\\"', $hover_btn);
             } else {
                 $hover_str = '';
             }
             if ($active_btn) {
                 $active_str = sprintf('onmousedown=\\"this.src=\'%s\'\\"', $active_btn);
             } else {
                 $active_str = '';
             }
             $link = sprintf('"<img src=\\"%s\\" onmouseout=\\"this.src=\'%s\'\\" alt=\\"".$_menu_names[%d][$lang_type]."\\" %s %s %s />"', $normal_btn, $normal_btn, $node->menu_item_srl, $hover_str, $active_str, $classname);
             if ($active_btn) {
                 $link_active = sprintf('"<img src=\\"%s\\" alt=\\"".$_menu_names[%d][$lang_type]."\\" %s />"', $active_btn, $node->menu_item_srl, $classname);
             } else {
                 $link_active = $link;
             }
         } else {
             $link_active = $link = sprintf('$_menu_names[%d][$lang_type]', $node->menu_item_srl);
         }
//.........这里部分代码省略.........
开发者ID:hottaro,项目名称:xpressengine,代码行数:101,代码来源:menu.admin.controller.php


示例7: getSiteUrl

<?php

if (!defined("__XE__")) {
    exit;
}
?>
<div class="bd_bc fl">
	<a href="<?php 
echo getSiteUrl();
?>
"><strong>Home</strong></a>
	<?php 
if ($__Context->main_menu->list && count($__Context->main_menu->list)) {
    foreach ($__Context->main_menu->list as $__Context->key1 => $__Context->val1) {
        if ($__Context->val1['selected']) {
            ?>
	<span>&rsaquo;</span><a href="<?php 
            echo $__Context->val1['href'];
            ?>
"><?php 
            if (!$__Context->val1['list']) {
                ?>
<em><?php 
                echo $__Context->val1['text'];
                ?>
</em><?php 
            } else {
                echo $__Context->val1['text'];
            }
            ?>
</a>
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:2073a59487bb38a18c0775d990f0863e.compiled.php


示例8: _compile

 function _compile($args, $content_items)
 {
     $oTemplate =& TemplateHandler::getInstance();
     // 위젯에 넘기기 위한 변수 설정
     $widget_info->modules_info = $args->modules_info;
     $widget_info->option_view_arr = $args->option_view_arr;
     $widget_info->list_count = $args->list_count;
     $widget_info->page_count = $args->page_count;
     $widget_info->subject_cut_size = $args->subject_cut_size;
     $widget_info->content_cut_size = $args->content_cut_size;
     $widget_info->duration_new = $duration_new * 60 * 60;
     $widget_info->thumbnail_type = $args->thumbnail_type;
     $widget_info->thumbnail_width = $args->thumbnail_width;
     $widget_info->thumbnail_height = $args->thumbnail_height;
     $widget_info->cols_list_count = $args->cols_list_count;
     $widget_info->mid_lists = $args->mid_lists;
     $widget_info->show_browser_title = $args->show_browser_title;
     $widget_info->show_category = $args->show_category;
     $widget_info->show_comment_count = $args->show_comment_count;
     $widget_info->show_trackback_count = $args->show_trackback_count;
     $widget_info->show_icon = $args->show_icon;
     $widget_info->list_type = $args->list_type;
     $widget_info->tab_type = $args->tab_type;
     $widget_info->markup_type = $args->markup_type;
     // 탭형태일경우 탭에 대한 정보를 정리하고 module_srl로 되어 있는 key값을 index로 변경
     if ($args->tab_type != 'none' && $args->tab_type) {
         $tab = array();
         foreach ($args->mid_lists as $module_srl => $mid) {
             if (!is_array($content_items[$module_srl]) || !count($content_items[$module_srl])) {
                 continue;
             }
             unset($tab_item);
             $tab_item->title = $content_items[$module_srl][0]->getBrowserTitle();
             $tab_item->content_items = $content_items[$module_srl];
             $tab_item->domain = $content_items[$module_srl][0]->getDomain();
             $tab_item->url = $content_items[$module_srl][0]->getContentsLink();
             if (!$tab_item->url) {
                 $tab_item->url = getSiteUrl($tab_item->domain, '', 'mid', $mid);
             }
             $tab[] = $tab_item;
         }
         $widget_info->tab = $tab;
     } else {
         $widget_info->content_items = $content_items;
     }
     unset($args->option_view_arr);
     unset($args->modules_info);
     Context::set('colorset', $args->colorset);
     Context::set('widget_info', $widget_info);
     $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
     return $oTemplate->compile($tpl_path, "content");
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:52,代码来源:content.class.php


示例9: dispMultiPostTextyle


//.........这里部分代码省略.........
             Context::set('_comment_list', $_comment_list);
         }
         Context::set('document_list', $document_list);
     } else {
         $mode = $this->textyle->getPostStyle();
         // Check if the search is within a specific tag
         $search_target = Context::get('search_target');
         if ($search_target == 'tags') {
             $args->tag = Context::get('search_keyword');
         }
         // Get the category
         $args->category_srl = urldecode($category);
         if ($args->category_srl && !is_numeric($args->category_srl)) {
             $arguments->category_title = $args->category_srl;
             $arguments->module_srl = $this->module_srl;
             $output = executeQuery('textyle.getCategorySrl', $arguments);
             if ($output->data) {
                 $args->category_srl = $output->data->category_srl;
                 $args->categories[] = $args->category_srl;
                 if ($category_list[$args->category_srl]->child_count) {
                     foreach ($category_list[$args->category_srl]->childs as $child) {
                         $args->categories[] = $child;
                     }
                 }
                 $tags = $category_list[$args->category_srl]->title;
                 // set the browser title for this category
                 Context::setBrowserTitle($tags . ' | ' . $this->textyle->get('browser_title'));
             }
         } else {
             $args->category_srl = Context::get('category_srl');
         }
         // If there is such a category
         if ($args->category_srl) {
             Context::set('selected_category', $category_list[$args->category_srl]->title);
         } elseif ($page == 1 && !isset($args->tag)) {
             $args->module_srl = $this->module_srl;
             $args->start_date = date('YmdHis', strtotime("-1 month"));
             $args->end_date = date('YmdHis');
             $args->sort_index = 'readed_count';
             $args->page = 1;
             $args->list_count = 3;
             $mostPopularBlogs = $this->getDocumentItems('textyle.getTopViewDocumentsInDateRange', $args);
             foreach ($mostPopularBlogs->data as $popularBlog) {
                 $popularBlog->variables['relative_date'] = $this->zdateRelative($popularBlog->getRegdateTime());
                 if ($popularBlog->get('alias_title')) {
                     $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $popularBlog->get('alias_title');
                 } else {
                     $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $popularBlog->get('document_srl');
                 }
             }
             Context::set('mostPopularBlogs', $mostPopularBlogs->data);
             unset($args->start_date);
             unset($args->end_date);
             $args->list_count = 5;
             $args->page = $page;
             $allPopularBlogs = $this->getDocumentItems('textyle.getAllTimeTopViewDocuments', $args);
             foreach ($allPopularBlogs->data as $popularBlog) {
                 $popularBlog->variables['relative_date'] = $this->zdateRelative($popularBlog->getRegdateTime());
                 if ($popularBlog->get('alias_title')) {
                     $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $popularBlog->get('alias_title');
                 } else {
                     $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $popularBlog->get('document_srl');
                 }
             }
             Context::set('allPopularBlogs', $allPopularBlogs->data);
         }
         // Get a list of latest posts
         $args->module_srl = $this->module_srl;
         $args->list_count = $this->textyle->getPostListCount();
         $args->sort_index = 'list_order';
         $args->page = $page;
         $args->page_count = 10;
         $latestBlogs = $this->getDocumentItems('textyle.getPosts', $args);
         Context::set('latestBlogs', $latestBlogs->data);
         Context::set('page_navigation', $latestBlogs->page_navigation);
         if (isset($latestBlogs->data)) {
             foreach ($latestBlogs->data as $document) {
                 $docTags = $document->get('tag_list');
                 if (isset($docTags)) {
                     foreach ($docTags as $tag) {
                         $recentTags[$tag]++;
                     }
                 }
                 $document->variables['relative_date'] = $this->zdateRelative($document->getRegdateTime());
                 if ($document->get('alias_title')) {
                     $document->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $document->get('alias_title');
                 } else {
                     $document->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $document->get('document_srl');
                 }
             }
         }
         arsort($recentTags);
         $tags .= ',' . implode(',', array_keys($recentTags));
     }
     Context::addHtmlHeader(sprintf('<meta name="keywords" content="%s" />', $tags));
     Context::addJsFilter($this->module_path . 'skins/' . $this->module_info->skin . '/filter', 'insert_comment.xml');
     Context::set('textyle_mode', $mode);
     Context::set('recentTags', $recentTags);
     Context::set('module_path', $this->module_path);
 }
开发者ID:google-code-backups,项目名称:xe-textyle,代码行数:101,代码来源:textyle.view.php


示例10: define

define("REQ_URL_QRY", "http://payment-test.chinapay.com/QueryWeb/processQuery.jsp");
//查询请求地址(生产)
//define("REQ_URL_QRY","http://console.chinapay.com/QueryWeb/processQuery.jsp");
//退款请求地址(测试)
define("REQ_URL_REF", "http://payment-test.chinapay.com/refund/SingleRefund.jsp");
//退款请求地址(生产)
//define("REQ_URL_REF","https://bak.chinapay.com/refund/SingleRefund.jsp");
function getcwdOL()
{
    $total = $_SERVER[PHP_SELF];
    $file = explode("/", $total);
    $file = $file[sizeof($file) - 1];
    return substr($total, 0, strlen($total) - strlen($file) - 1);
}
function getSiteUrl()
{
    $host = $_SERVER[SERVER_NAME];
    $port = $_SERVER[SERVER_PORT] == "80" ? "" : ":{$_SERVER['SERVER_PORT']}";
    return "http://" . $host . $port . getcwdOL();
}
function traceLog($file, $log)
{
    $f = fopen($file, 'a');
    if ($f) {
        fwrite($f, date('Y-m-d H:i:s') . " => {$log}\n");
        fclose($f);
    }
}
//取得本示例安装位置
$site_url = getSiteUrl();
开发者ID:kevins1022,项目名称:YunGouCMS,代码行数:30,代码来源:netpayclient_config.php


示例11: getSiteUrl

                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        <?php 
        }
        ?>
                    <?php 
    }
    ?>
                <?php 
}
?>
            </table>
            <?php 
echo "<img src='" . getSiteUrl() . "/images/Line.jpg' style='height:2px;width:550px'>";
?>
            <table>
                <tr>
                    <td>
                        <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px">Thank You</div>
                        <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px">Speak to you soon</div>
                        <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px"><?php 
echo $namee1;
?>
</div>
                    </td> 
                </tr>
            </table>
        </div>
    </div>
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:31,代码来源:pdf_no_h_f_b.php


示例12: getSiteUrl

                                    <p class="opttext">
                                        <?php 
        echo $model->desc9;
        ?>
                                    </p>
                                </div>
                            </div>
                        <?php 
    }
    ?>
                        <?php 
    if ($model->image10) {
        ?>
                            <div>
                                <img u=image src="<?php 
        echo getSiteUrl() . $model->image10;
        ?>
" />
                                <div u="thumb">
                                    <h4 class="opthead">Thank You Ten</h4>
                                    <p class="opttext">
                                        <?php 
        echo $model->order10;
        ?>
                                    </p>
                                    <p class="opttext">
                                        <?php 
        echo $model->desc10;
        ?>
                                    </p>
                                </div>
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:31,代码来源:optionviews.php


示例13: proc

 /**
  * @brief 위젯의 실행 부분
  *
  * ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다
  * 결과를 만든후 print가 아니라 return 해주어야 한다
  **/
 function proc($args)
 {
     // 대상 모듈 (mid_list는 기존 위젯의 호환을 위해서 처리하는 루틴을 유지. module_srls로 위젯에서 변경)
     $oModuleModel =& getModel('module');
     if ($args->mid_list) {
         $mid_list = explode(",", $args->mid_list);
         if (count($mid_list)) {
             $module_srls = $oModuleModel->getModuleSrlByMid($mid_list);
             if (count($module_srls)) {
                 $args->module_srls = implode(',', $module_srls);
             } else {
                 $args->module_srls = null;
             }
         }
     }
     // 제목
     $title = $args->title;
     // 정렬 대상
     $order_target = $args->order_target;
     if (!in_array($order_target, array('list_order', 'update_order'))) {
         $order_target = 'list_order';
     }
     // 정렬 순서
     $order_type = $args->order_type;
     if (!in_array($order_type, array('asc', 'desc'))) {
         $order_type = 'asc';
     }
     // 출력된 목록 수
     $list_count = (int) $args->list_count;
     if (!$list_count) {
         $list_count = 5;
     }
     // 제목 길이 자르기
     $subject_cut_size = $args->subject_cut_size;
     if (!$subject_cut_size) {
         $subject_cut_size = 0;
     }
     // 최근 글 표시 시간
     $duration_new = $args->duration_new;
     if (!$duration_new) {
         $duration_new = 12;
     }
     // 대상 모듈이 선택되어 있지 않으면 해당 사이트의 전체 모듈을 대상으로 함
     $site_module_info = Context::get('site_module_info');
     if ($args->module_srls) {
         $obj->module_srl = $args->module_srls;
     } else {
         if ($site_module_info) {
             $obj->site_srl = (int) $site_module_info->site_srl;
         }
     }
     // newest_document 위젯에서 정의한 query문을 직접 사용
     $obj->sort_index = 'documents.' . $order_target;
     $obj->order_type = $order_type == "desc" ? "asc" : "desc";
     $obj->list_count = $list_count;
     $output = executeQueryArray('widgets.newest_document.getNewestDocuments', $obj);
     // document 모듈의 model 객체를 받아서 결과를 객체화 시킴
     $oDocumentModel =& getModel('document');
     // 오류가 생기면 그냥 무시
     if (!$output->toBool()) {
         return;
     }
     // 결과가 있으면 각 문서 객체화를 시킴
     $modules = array();
     if (count($output->data)) {
         foreach ($output->data as $key => $attribute) {
             $modules[$attribute->module_srl]->mid = $attribute->mid;
             $modules[$attribute->module_srl]->site_srl = $attribute->site_srl;
             $document_srl = $attribute->document_srl;
             $oDocument = null;
             $oDocument = new documentItem();
             $oDocument->setAttribute($attribute, false);
             $GLOBALS['XE_DOCUMENT_LIST'][$oDocument->document_srl] = $oDocument;
             $document_list[$key] = $oDocument;
         }
         $oDocumentModel->setToAllDocumentExtraVars();
     } else {
         $document_list = array();
     }
     // 모듈이 하나만 선택되었을 경우 대상 모듈 이름과 링크를 생성
     if (count($modules) == 1) {
         $info = array_shift($modules);
         if ($info) {
             $widget_info->mid = $info->mid;
             if ($info->site_srl) {
                 $site_info = $oModuleModel->getSiteInfo($info->site_srl);
                 if ($site_info->domain) {
                     $widget_info->more_link = getSiteUrl('http://' . $site_info->domain, '', 'mid', $widget_info->mid);
                 }
             } else {
                 $widget_info->more_link = getUrl('', 'mid', $info->mid);
                 $widget_info->module_name = $info->mid;
             }
         }
//.........这里部分代码省略.........
开发者ID:hottaro,项目名称:xpressengine,代码行数:101,代码来源:newest_document.class.php


示例14: getSiteUrl

if (!defined("__XE__")) {
    exit;
}
?>
<div class="x_page-header">
	<h1>
		<?php 
echo $__Context->lang->ncart;
?>
		<?php 
if ($__Context->module_info->mid) {
    ?>
<span class="path">
			&gt; <a href="<?php 
    echo getSiteUrl($__Context->module_info->domain, '', 'mid', $__Context->module_info->mid);
    ?>
"<?php 
    if ($__Context->module == 'admin') {
        ?>
 target="_blank"<?php 
    }
    ?>
><?php 
    echo $__Context->module_info->mid;
    if ($__Context->module_info->is_default == 'Y') {
        ?>
(<?php 
        echo $__Context->lang->is_default;
        ?>
)<?php 
开发者ID:umjinsun12,项目名称:dngshin,代码行数:30,代码来源:fff943e4cbedf5ca342b11c6fc7fe818.compiled.php


示例15: array

                                 </td>
                                 <?php 
     if (Yii::app()->user->isUser()) {
         ?>
                                     <td>
                                         <div class="flike">
                                             <?php 
         if (Yii::app()->user->isUser()) {
             //                                    echo CHtml::image(getSiteUrl() . '/images/like.png', 'like', array('onClick' => 'js:setVal1(like' . $key . ')'));
             //                                    echo CHtml::hiddenField("selproduct[like$key]", $selproductsComment[$key]['like'], array('id' => 'like' . $key));
             //                                    e($selproductsComment);
             if ($selproductsComment[$key]['like']) {
                 echo CHtml::image(getSiteUrl() . '/images/like1.png', 'like', array('onClick' => 'js:setVal1("selprod",' . $key . ')'));
                 echo CHtml::hiddenField("selprod[{$key}][like]", '1');
             } else {
                 echo CHtml::image(getSiteUrl() . '/images/like.png', 'like', array('onClick' => 'js:setVal1("selprod",' . $key . ')'));
                 echo CHtml::hiddenField("selprod[{$key}][like]", '0');
             }
             echo "<div class='com'>";
             $this->renderPartial('//decorators/selprod', array('selprod' => $selproductsComment, 'admin' => $admin, 'type' => 'selproduct' . $key, 'key' => $key, 'id' => $selproductsComment[$key]['id']));
             echo "</div>";
         }
         ?>
                                         </div>
                                     </td>
                                 <?php 
     }
     ?>
                             </tr>
                         <?php 
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:31,代码来源:adminsolns_wrong.php


示例16: getStatusIcon

 /**
  * @return string the associated database table name
  */
 public static function getStatusIcon($id, $customerId)
 {
     $model = Status::model()->findByAttributes(array('status' => $id));
     //        echo CHtml::image(getSiteUrl() . '/images/status/' . $model->image, $model->title, array('title' => $model->title,'data-toggle' => 'popover','title' => 'Status','class' => "popover-top",'customer-id' => $customerId,'style' => 'width:15px'));
     echo CHtml::image(getSiteUrl() . '/images/status/' . $model->image, $model->title, array('title' => $model->title, 'data-toggle' => 'popover', 'title' => 'Status', 'class' => "", 'customer-id' => $customerId, 'style' => 'width:15px'));
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:9,代码来源:Status.php


示例17: createUrl

                        </a>
                        <a href="<?php 
echo createUrl('site/index');
?>
">
                            <button class="btn btn-primary btm pull-left" onclick="location.href='<?php 
echo $url2;
?>
'">Back</button>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="col-md-11 col-md-offset-1">
                <div class="">
                    <?php 
$img = isset($bannerImg->image) ? $bannerImg->image : "";
?>
                    <img width="100%" class="img-responsive" src="<?php 
echo getSiteUrl() . '/productimg/' . $img;
?>
" />
                </div>
            </div>
        </div>
    </div>
</div>

开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:29,代码来源:getStarted.php


示例18: proc


//.........这里部分代码省略.........
     // 썸네일 세로 크기
     $widget_info->thumbnail_height = (int) $args->thumbnail_height;
     if (!$widget_info->thumbnail_height) {
         $widget_info->thumbnail_height = 100;
     }
     // 세로 이미지 수
     $widget_info->rows_list_count = (int) $args->rows_list_count;
     if (!$widget_info->rows_list_count) {
         $widget_info->rows_list_count = 1;
     }
     // 가로 이미지 수
     $widget_info->cols_list_count = (int) $args->cols_list_count;
     if (!$widget_info->cols_list_count) {
         $widget_info->cols_list_count = 5;
     }
     // 노출 여부 체크
     if ($args->display_author != 'Y') {
         $widget_info->display_author = 'N';
     } else {
         $widget_info->display_author = 'Y';
     }
     if ($args->display_regdate != 'Y') {
         $widget_info->display_regdate = 'N';
     } else {
         $widget_info->display_regdate = 'Y';
     }
     if ($args->display_readed_count != 'Y') {
         $widget_info->display_readed_count = 'N';
     } else {
         $widget_info->display_readed_count = 'Y';
     }
     if ($args->display_voted_count != 'Y') {
         $widget_info->display_voted_count = 'N';
     } else {
         $widget_info->display_voted_count = 'Y';
     }
     // 제목
     $widget_info->title = $args->title;
     $oModuleModel =& getModel('module');
     // 대상 모듈이 선택되어 있지 않으면 해당 사이트의 전체 모듈을 대상으로 함
     $site_module_info = Context::get('site_module_info');
     if ($args->module_srls) 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getSize函数代码示例发布时间:2022-05-15
下一篇:
PHP getSiteURL函数代码示例发布时间: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