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


PHP url::common方法代码示例

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


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

示例1: header

 public static function header($page = array())
 {
     $page['js'] = array_merge(array('jquery' => url::common() . '/js/jquery.js', 'plugins' => url::common() . '/js/jquery.plugins.js', 'zotop' => url::common() . '/js/zotop.js'), (array) $page['js']);
     $page['css'] = array_merge(array('zotop' => url::theme() . '/css/zotop.css', 'global' => url::theme() . '/css/global.css'), (array) $page['css']);
     $page = self::settings($page);
     $html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
     $html[] = '<head>';
     $html[] = '	<title>' . $page['title'] . ' Powered by ' . zotop::config("zotop.title") . '</title>';
     $html[] = self::meta($page['meta']);
     $html[] = self::stylesheet($page['css']);
     $html[] = self::script($page['js']);
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
     $html[] = '	<script type="text/javascript">';
     $html[] = '		zotop.url.base = "' . url::base() . '";';
     $html[] = '		zotop.url.common = "' . url::common() . '";';
     $html[] = '		zotop.page.id = "' . page::id() . '";';
     $html[] = '		zotop.user.id =0;';
     $html[] = '		zotop.user.username = "";';
     $html[] = '	</script>';
     $html[] = '</head>';
     $html[] = '<body' . html::attributes($page['body']) . '>';
     $html[] = '<div id="wrapper">';
     $html[] = '';
     $str = implode("\n", $html);
     echo $str;
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:29,代码来源:page.php

示例2: header

 public static function header($form = array())
 {
     if (isset($form['template'])) {
         form::$template = arr::take('template', $form);
     }
     $attrs['class'] = isset($form['class']) ? $form['class'] : 'form';
     $attrs['method'] = isset($form['method']) ? $form['method'] : 'post';
     $attrs['action'] = isset($form['action']) ? $form['action'] : url::current();
     //加载表头
     $html[] = '';
     $html[] = '<form' . html::attributes($attrs) . '>';
     $html[] = field::hidden(array('name' => '_REFERER', 'value' => request::referer()));
     $html[] = field::hidden(array('name' => '_FORMHASH', 'value' => form::hash()));
     //加载常用js
     $html[] = html::script(url::common() . '/js/jquery.validate.js');
     $html[] = html::script(url::common() . '/js/jquery.validate.additional.js');
     $html[] = html::script(url::common() . '/js/jquery.form.js');
     //表单头部
     if (isset($form['title']) || isset($form['description'])) {
         $html[] = '<div class="form-header clearfix">';
         $html[] = isset($form['icon']) ? '		<div class="form-icon"></div>' : '';
         $html[] = isset($form['title']) ? '		<div class="form-title">' . $form['title'] . '</div>' : '';
         $html[] = isset($form['description']) ? '		<div class="form-description">' . $form['description'] . '</div>' : '';
         $html[] = '</div>';
     }
     //表单body部分开始
     $html[] = '<div class="form-body">';
     echo implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:29,代码来源:form.php

示例3: source

 public static function source($attrs)
 {
     $html = array();
     $html[] = '';
     $html[] = '<div style="height:460px;overflow:hidden;">';
     $html[] = '<div id="SourceEditorPannel">正在加载编辑器,请稍后……</div>';
     $html[] = html::script(url::common() . '/js/swfobject.js');
     $html[] = html::script(url::module() . '/admin/js/file.js');
     $html[] = field::textarea($attrs);
     $html[] = '</div>';
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:12,代码来源:file.php

示例4: header

 public static function header($header = array())
 {
     if (isset($header['template'])) {
         form::$template = arr::take('template', $header);
     }
     $attrs['class'] = isset($header['class']) ? $header['class'] : 'form';
     $attrs['method'] = isset($header['method']) ? $header['method'] : 'post';
     $attrs['action'] = isset($header['action']) ? $header['action'] : url::current();
     $html[] = '';
     $html[] = '<form' . html::attributes($attrs) . '>';
     $html[] = isset($header['title']) ? '<div class="form-title">' . $header['title'] . '</div>' : '';
     $html[] = isset($header['description']) ? '<div class="form-description">' . $header['description'] . '</div>' : '';
     $html[] = field::hidden(array('name' => '_REFERER', 'value' => request::referer()));
     $html[] = html::script(url::common() . '/js/jquery.validate.js');
     $html[] = html::script(url::common() . '/js/jquery.validate.additional.js');
     $html[] = html::script(url::common() . '/js/jquery.form.js');
     $html[] = html::script(url::common() . '/js/zotop.form.js');
     echo implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:19,代码来源:form.php

示例5: header

 public function header()
 {
     $javascript = (array) $this->js;
     $css = (array) $this->css;
     $metas = (array) $this->meta;
     $html[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
     $html[] = '<html xmlns="http://www.w3.org/1999/xhtml">';
     $html[] = '<head>';
     $html[] = '	<title>' . $this->title . ' ' . zotop::config("zotop.title") . '</title>';
     $html[] = '	' . html::meta('keywords', $this->keywords . ' ' . zotop::config("zotop.keywords"));
     $html[] = '	' . html::meta('description', $this->description . ' ' . zotop::config("zotop.description"));
     $html[] = '	' . html::meta('Content-Type', 'text/html;charset=utf-8');
     $html[] = '	' . html::meta('X-UA-Compatible', 'IE=EmulateIE7');
     foreach ($metas as $meta) {
         $html[] = '	' . html::meta($meta);
     }
     $html[] = '	' . html::stylesheet(url::theme() . '/css/zotop.css', array('id' => 'zotop'));
     $html[] = '	' . html::stylesheet(url::theme() . '/css/global.css', array('id' => 'global'));
     foreach ($css as $stylesheet) {
         $html[] = '	' . html::stylesheet($stylesheet);
     }
     $html[] = '	' . html::script(url::common() . '/js/jquery.js', array('id' => 'jquery'));
     $html[] = '	' . html::script(url::common() . '/js/jquery.plugins.js', array('id' => 'plugins'));
     $html[] = '	' . html::script(url::common() . '/js/zotop.js', array('id' => 'zotop'));
     $html[] = '	' . html::script(url::common() . '/js/global.js', array('id' => 'global'));
     foreach ($javascript as $js) {
         $html[] = '	' . html::script($js);
     }
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'shortcut icon', 'type' => 'image/x-icon'));
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'icon', 'type' => 'image/x-icon'));
     $html[] = '	' . html::link(url::theme() . '/image/fav.ico', array('rel' => 'bookmark', 'type' => 'image/x-icon'));
     $html[] = '</head>';
     $html[] = '<body' . html::attributes($this->body) . '>';
     $html[] = '<div id="wrapper">';
     $html[] = '<div id="page">';
     $html[] = '';
     echo implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:38,代码来源:page.php

示例6: image

 /**
  * 图片上传输入框
  *
  * @param $attrs array 控件参数
  * @return string 控件代码
  */
 public static function image($attrs)
 {
     $attrs['handle'] = empty($attrs['handle']) ? zotop::url('zotop/upload/image') : $attrs['handle'];
     $html[] = html::script(url::common() . '/js/zotop.upload.js');
     $html[] = '<div class="field-inner inline-block">';
     $html[] = '	' . field::text($attrs);
     $html[] = '	' . html::input(array('type' => 'button', 'class' => 'upload-image', 'title' => zotop::t('上传图片')));
     $html[] = '</div>';
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:16,代码来源:field.php

示例7: script

 public static function script($files)
 {
     $default['jquery'] = url::common() . '/js/jquery.js';
     $default['plugins'] = url::common() . '/js/jquery.plugins.js';
     $default['zotop'] = url::common() . '/js/zotop.js';
     //用户的meta
     $files = array_merge($default, (array) $files);
     foreach ($files as $file) {
         $html[] = '	' . html::script($file);
     }
     return implode("\n", $html);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:12,代码来源:page.php

示例8: decode

 public static function decode($url)
 {
     $url = strtr($url, array('$root' => url::root(), '$system' => url::system(), '$theme' => url::theme(), '$modules' => url::modules(), '$this' => url::controller(), '$common' => url::common()));
     return $url;
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:5,代码来源:url.php

示例9: header

 public static function header($header = array())
 {
     $header['js']['dialog'] = url::common() . '/js/zotop.dialog.js';
     $header['body']['class'] = 'dialog';
     parent::header($header);
 }
开发者ID:dalinhuang,项目名称:zotop,代码行数:6,代码来源:dialog.php


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