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

PHP mw_includes_path函数代码示例

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

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



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

示例1: installTemplateContent

 private function installTemplateContent($template_name)
 {
     $default_content_folder = mw_includes_path() . 'install' . DIRECTORY_SEPARATOR;
     $default_content_file = $default_content_folder . 'mw_default_content.zip';
     if ($template_name) {
         if (function_exists('templates_path')) {
             $template_dir = templates_path() . DS . $template_name;
             $template_dir = normalize_path($template_dir, true);
             if (is_dir($template_dir)) {
                 $template_default_content = $template_dir . 'mw_default_content.zip';
                 if (is_file($template_default_content) and is_readable($template_default_content)) {
                     $default_content_file = $template_default_content;
                     $default_content_folder = $template_dir;
                 }
             }
         }
     }
     if (is_file($default_content_file)) {
         $restore = new \Microweber\Utils\Backup();
         $restore->backups_folder = $default_content_folder;
         $restore->backup_file = 'mw_default_content.zip';
         ob_start();
         try {
             $rest = $restore->exec_restore();
         } catch (Exception $e) {
             return false;
         }
         ob_get_clean();
         return true;
     } else {
         return false;
     }
 }
开发者ID:Git-Host,项目名称:microweber,代码行数:33,代码来源:TemplateInstaller.php


示例2: debug_info

 function debug_info()
 {
     //if (c('debug_mode')) {
     return include mw_includes_path() . 'debug.php';
     // }
 }
开发者ID:Git-Host,项目名称:microweber,代码行数:6,代码来源:ContentManager.php


示例3: editor_tools

 public function editor_tools()
 {
     if (!defined('IN_ADMIN') and is_admin()) {
         define('IN_ADMIN', true);
     }
     if (!defined('IN_EDITOR_TOOLS')) {
         define('IN_EDITOR_TOOLS', true);
     }
     if (mw_is_installed() == true) {
         //event_trigger('mw_db_init');
         //  event_trigger('mw_cron');
     }
     $tool = $this->app->url_manager->segment(1);
     if ($tool) {
     } else {
         $tool = 'index';
     }
     $page = false;
     if (isset($_REQUEST['content_id'])) {
         if (intval($_REQUEST['content_id']) == 0) {
             $this->create_new_page = true;
             $custom_content_data_req = $_REQUEST;
             $custom_content_data = array();
             if (isset($custom_content_data_req['content_type'])) {
                 //    $custom_content_data['content_type'] = $custom_content_data_req['content_type'];
             }
             if (isset($custom_content_data_req['content_type'])) {
                 $custom_content_data['content_type'] = $custom_content_data_req['content_type'];
             }
             if (isset($custom_content_data_req['subtype'])) {
                 $custom_content_data['subtype'] = $custom_content_data_req['subtype'];
             }
             if (isset($custom_content_data_req['parent_page']) and is_numeric($custom_content_data_req['parent_page'])) {
                 $custom_content_data['parent'] = intval($custom_content_data_req['parent_page']);
             }
             if (isset($custom_content_data_req['preview_layout'])) {
                 //  $custom_content_data['preview_layout'] =($custom_content_data_req['preview_layout']);
             }
             if (!empty($custom_content_data)) {
                 $custom_content_data['id'] = 0;
                 $this->content_data = $custom_content_data;
             }
             $this->return_data = 1;
             $page = $this->frontend();
         } else {
             $page = $this->app->content_manager->get_by_id($_REQUEST['content_id']);
         }
     } elseif (isset($_SERVER['HTTP_REFERER'])) {
         $url = $_SERVER['HTTP_REFERER'];
         $url = explode('?', $url);
         $url = $url[0];
         if (trim($url) == '' or trim($url) == $this->app->url_manager->site()) {
             //$page = $this->app->content_manager->get_by_url($url);
             $page = $this->app->content_manager->homepage();
         } else {
             $page = $this->app->content_manager->get_by_url($url);
         }
     } else {
         $url = $this->app->url_manager->string();
     }
     if (!isset($page['active_site_template'])) {
         $page['active_site_template'] = 'default';
     }
     if (isset($_GET['preview_template'])) {
         $page['active_site_template'] = $_GET['preview_template'];
     }
     if (isset($_GET['content_type'])) {
         $page['content_type'] = $_GET['content_type'];
     }
     if (isset($_GET['preview_layout']) and $_GET['preview_layout'] != 'inherit') {
         $page['layout_file'] = $_GET['preview_layout'];
     }
     $this->app->content_manager->define_constants($page);
     $page['render_file'] = $this->app->template->get_layout($page);
     if (defined('TEMPLATE_DIR')) {
         $load_template_functions = TEMPLATE_DIR . 'functions.php';
         if (is_file($load_template_functions)) {
             include_once $load_template_functions;
         }
     }
     $params = $_REQUEST;
     $tool = str_replace('..', '', $tool);
     $p_index = mw_includes_path() . 'toolbar/editor_tools/index.php';
     $p_index = normalize_path($p_index, false);
     $standalone_edit = true;
     $p = mw_includes_path() . 'toolbar/editor_tools/' . $tool . '/index.php';
     $standalone_edit = false;
     if ($tool == 'plupload') {
         $standalone_edit = true;
     }
     if ($tool == 'plupload') {
         $standalone_edit = true;
     }
     if ($tool == 'imageeditor') {
         $standalone_edit = true;
     }
     if ($tool == 'rte_image_editor') {
         $standalone_edit = true;
     }
     if ($tool == 'editor_toolbar') {
//.........这里部分代码省略.........
开发者ID:microweber,项目名称:microweber,代码行数:101,代码来源:DefaultController.php


示例4: render

 public function render($params = array())
 {
     $roit1 = rand(1, 6);
     $font = dirname(__FILE__) . DS . 'catcha_fonts' . DS . 'font' . $roit1 . '.ttf';
     $font = normalize_path($font, 0);
     if (function_exists('imagettftext')) {
         $text1 = mt_rand(100, 4500);
     } else {
         $text1 = mt_rand(100, 999);
     }
     $text2 = mt_rand(2, 9);
     $roit = mt_rand(1, 5);
     $text = "{$text1}";
     $answ = $text1;
     $x = 100;
     $y = 20;
     $image = @imagecreate($x, 20) or die('Unable to render a CAPTCHA picture!');
     $tcol1z = rand(1, 150);
     $ttcol1z1 = rand(0, 150);
     $tcol1z11 = rand(0, 150);
     $bgcolor = imagecolorallocate($image, 255, 255, 255);
     $gray = imagecolorallocate($image, 240, 240, 240);
     // $black = imagecolorallocate($image, $tcol1z, $ttcol1z1, $tcol1z11);
     $black = imagecolorallocate($image, 0, 0, 0);
     $captcha_sid = 'captcha';
     if (isset($params['id'])) {
         $captcha_sid = 'captcha_' . $params['id'];
     } elseif (isset($_GET['id'])) {
         $captcha_sid = 'captcha_' . $_GET['id'];
     }
     $old = mw()->user_manager->session_get('captcha');
     if ($old != false) {
         $old_array = mw()->user_manager->session_get('captcha_recent');
         if (!is_array($old_array)) {
             $old_array = array();
         }
         array_unshift($old_array, $old);
         array_slice($old_array, 20);
         mw()->user_manager->session_set('captcha_recent', $old_array);
     }
     $sess = mw()->user_manager->session_set($captcha_sid, $answ);
     $col1z = rand(200, 242);
     $col1z1 = rand(150, 242);
     $col1z11 = rand(150, 242);
     $color1 = imagecolorallocate($image, $col1z, $col1z1, $tcol1z11);
     $color2 = imagecolorallocate($image, $tcol1z - 1, $ttcol1z1 - 1, $tcol1z11 - 2);
     // imagefill($image, 0, 0, $color1);
     for ($i = 0; $i < $x; ++$i) {
         for ($j = 0; $j < $y; ++$j) {
             if (mt_rand(0, 20) < 10) {
                 //$coords = array(mt_rand(0, 10), mt_rand(0, 10), mt_rand(0, 10), mt_rand(0, 10), 5, 6);
                 $y21 = mt_rand(5, 20);
                 $this->captcha_vector($image, $x - mt_rand(0, 10), mt_rand(0, 10), mt_rand(0, 180), 200, $bgcolor);
                 //  imagesetpixel($image, $i, $j, $color2);
             }
         }
     }
     $x1 = mt_rand(0, 5);
     $y1 = mt_rand(20, 22);
     $tsize = rand(13, 15);
     $pad = 2;
     // extra char spacing for text
     if (function_exists('imagettftext')) {
         imagettftext($image, $tsize, $roit, $x1, $y1, $black, $font, $text);
     } else {
         if (function_exists('imagestring')) {
             $font = mw_includes_path() . DS . 'admin' . DS . 'catcha_fonts' . DS . 'font' . $roit1 . '.gdf';
             $font = normalize_path($font, 0);
             $font = imageloadfont($font);
             imagestring($image, $font, 0, 0, $text, $black);
         } else {
         }
     }
     $s = 180;
     $e = 360;
     if (function_exists('imagefilter')) {
         $filter_img = rand(1, 6);
         switch ($filter_img) {
             case 1:
                 $gaussian = array(array(1.0, 2.0, 1.0), array(2.0, 4.0, 2.0), array(1.0, 2.0, 1.0));
                 imageconvolution($image, $gaussian, 16, 0);
                 break;
                 // break;
             // break;
             case 3:
                 imagefilter($image, IMG_FILTER_PIXELATE, 1);
                 break;
             default:
                 break;
         }
     }
     $y21 = mt_rand(5, 20);
     $this->captcha_vector($image, $x, $y21 / 2, 180, 200, $bgcolor);
     $y21 = mt_rand(5, 20);
     $this->captcha_vector($image, $x, $y21 / 2, $col1z11, 200, $bgcolor);
     $y21 = mt_rand(5, 20);
     $this->captcha_vector($image, $x / 3, $y21 / 3, $col1z11, 200, $bgcolor);
     if (function_exists('imagestring')) {
         $this->captcha_vector($image, $x / 3, $y21 / 3, $col1z11, 200, $gray);
         imagestring($image, 0, $y21, 2, $text, $gray);
//.........这里部分代码省略.........
开发者ID:microweber,项目名称:microweber,代码行数:101,代码来源:Captcha.php


示例5: event_trigger

                mw.toolbar.ComponentsShow(h);
            });

            $(mwd.querySelectorAll('.edit')).each(function(){
              mw.linkTip.init(this);
            })
        });





    </script>
<?php 
    event_trigger('live_edit_toolbar_end');
    include mw_includes_path() . 'toolbar' . DS . "design.php";
} else {
    ?>
<script>
        previewHTML = function (html, index) {
            mw.$('.edit').eq(index).html(html);
        }
        window.onload = function () {
            if (window.opener !== null) {
                window.opener.mw.$('.edit').each(function (i) {
                    var html = $(this).html();
                    self.previewHTML(html, i);
                });
            }
        }
开发者ID:minhkiller,项目名称:microweber,代码行数:30,代码来源:toolbar.php


示例6: mw_includes_path

            print $data['admin_password'];
            ?>
" <?php 
        }
        ?>
 />
                </div>
            </div>
                </div>
                </div>
            </div>



            <?php 
        $default_content_file = mw_includes_path() . 'install' . DIRECTORY_SEPARATOR . 'mw_default_content.zip';
        ?>
            <?php 
        if (is_file($default_content_file)) {
            ?>
                <div class="mw-ui-field-holder pull-left">
                    <label class="mw-ui-check">
                        <input name="with_default_content" type="checkbox" checked="checked" value="1">
                        <span></span>&nbsp;
                        <?php 
            _e("Install default content");
            ?>
                        <span data-help="<?php 
            _e("If checked, some default content will be added.");
            ?>
"><span class="mw-icon-help-outline mwahi tip"></span></span>
开发者ID:newaltcoin,项目名称:microweber,代码行数:31,代码来源:index.php


示例7: mw_error

function mw_error($e, $f = false, $l = false)
{
    $f = mw_includes_path() . 'error.php';
    $v = new \Microweber\View($f);
    $v->e = $e;
    $v->f = $f;
    $v->l = $l;
    die($v);
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:9,代码来源:other.php


示例8: make

 /**
  * make_field.
  *
  * @desc        make_field
  *
  * @category    forms
  *
  * @author      Microweber
  *
  * @link        http://microweber.com
  *
  * @param string $field_type
  * @param string $field_id
  * @param array  $settings
  */
 public function make($field_id = 0, $field_type = 'text', $settings = false)
 {
     if (is_array($field_id)) {
         if (!empty($field_id)) {
             $data = $field_id;
         }
     } else {
         if ($field_id != 0) {
             $data = $this->get_by_id($id = $field_id);
         }
     }
     if (isset($data['settings']) or isset($_REQUEST['settings']) and trim($_REQUEST['settings']) == 'y') {
         $settings = true;
     }
     if (isset($data['copy_from'])) {
         $copy_from = intval($data['copy_from']);
         if (is_admin() == true) {
             $table_custom_field = $this->table;
             $form_data = $this->app->database_manager->get_by_id($table_custom_field, $id = $copy_from);
             if (is_array($form_data)) {
                 $field_type = $form_data['type'];
                 $data['id'] = 0;
                 if (isset($data['save_on_copy'])) {
                     $cp = $form_data;
                     $cp['id'] = 0;
                     $cp['copy_of_field'] = $copy_from;
                     if (isset($data['rel_type'])) {
                         $cp['rel_type'] = $data['rel_type'];
                     }
                     if (isset($data['rel_id'])) {
                         $cp['rel_id'] = $data['rel_id'];
                     }
                     $this->save($cp);
                     $data = $cp;
                 } else {
                     $data = $form_data;
                 }
             }
         }
     } elseif (isset($data['field_id'])) {
         $data = $this->get_by_id($id = $data['field_id']);
     }
     if (isset($data['type'])) {
         $field_type = $data['type'];
     }
     if (!isset($data['custom_field_required'])) {
         $data['custom_field_required'] = 'n';
     }
     if (isset($data['type'])) {
         $field_type = $data['type'];
     }
     if (isset($data['field_type'])) {
         $field_type = $data['field_type'];
     }
     if (isset($data['field_values']) and !isset($data['value'])) {
         $data['values'] = $data['field_values'];
     }
     $data['type'] = $field_type;
     if (isset($data['options']) and is_string($data['options'])) {
         $data['options'] = $this->_decode_options($data['options']);
     }
     $data = $this->app->url_manager->replace_site_url_back($data);
     $dir = mw_includes_path();
     $dir = $dir . DS . 'custom_fields' . DS;
     $field_type = str_replace('..', '', $field_type);
     $load_from_theme = false;
     if (defined('ACTIVE_TEMPLATE_DIR')) {
         $custom_fields_from_theme = ACTIVE_TEMPLATE_DIR . 'modules' . DS . 'custom_fields' . DS;
         if (is_dir($custom_fields_from_theme)) {
             if ($settings == true or isset($data['settings'])) {
                 $file = $custom_fields_from_theme . $field_type . '_settings.php';
             } else {
                 $file = $custom_fields_from_theme . $field_type . '.php';
             }
             if (is_file($file)) {
                 $load_from_theme = true;
             }
         }
     }
     if ($load_from_theme == false) {
         if ($settings == true or isset($data['settings'])) {
             $file = $dir . $field_type . '_settings.php';
         } else {
             $file = $dir . $field_type . '.php';
         }
//.........这里部分代码省略.........
开发者ID:microweber,项目名称:microweber,代码行数:101,代码来源:FieldsManager.php


示例9: show_help

/**
 * Shows a section of the help file.
 *
 * @internal its used on the help in the admin
 */
function show_help($section = 'main')
{
    $lang = current_lang();
    $lang = str_replace('..', '', $lang);
    if (trim($lang) == '') {
        $lang = 'en';
    }
    $lang_file = mw_includes_path() . 'help' . DIRECTORY_SEPARATOR . $lang . '.php';
    $lang_file_en = mw_includes_path() . 'help' . DIRECTORY_SEPARATOR . $lang . '.php';
    $lang_file = normalize_path($lang_file, false);
    if (is_file($lang_file)) {
        include $lang_file;
    } elseif (is_file($lang_file_en)) {
        return $lang_file_en;
    }
}
开发者ID:microweber,项目名称:microweber,代码行数:21,代码来源:lang.php


示例10: uniqid

<script  type="text/javascript">
  mw.require('forms.js', true);
  mw.require('url.js', true);
</script>
<?php 
if (!isset($rand)) {
    $rand = uniqid();
}
?>
<script type="text/javascript">



<?php 
include mw_includes_path() . 'api/treerenderer.php';
?>


  mw.menu_add_new = function(){
      var obj = {};
	 obj.title = $('#new_menu_name').val();

      $.post("<?php 
print api_link('content/menu_create');
?>
",  obj, function(data){
	    window.location.href = window.location.href;
      });
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:29,代码来源:admin_live_edit_tab1.php


示例11: load_apijs

 public function load_apijs($page = false)
 {
     $this->app->content_manager->define_constants($page);
     $l = new \Microweber\View(mw_includes_path() . 'api' . DS . 'api.js');
     $l = $l->__toString();
     $l = str_replace('{SITE_URL}', $this->app->url_manager->site(), $l);
     $l = str_replace('{MW_SITE_URL}', $this->app->url_manager->site(), $l);
     $l = str_replace('%7BSITE_URL%7D', $this->app->url_manager->site(), $l);
     return $l;
 }
开发者ID:minhkiller,项目名称:microweber,代码行数:10,代码来源:DefaultController.php


示例12: mw_includes_url

  mw.require("<?php 
print mw_includes_url();
?>
js/jquery-ui-1.10.0.custom.min.js");
  mw.require("tools.js");

  mw.require("liveadmin.js");
  mw.require("events.js");
  mw.require("url.js");
  mw.require("wysiwyg.js");
  mw.require("css_parser.js");
  mw.require ("forms.js");
  mw.require("files.js");
  mw.require("content.js", true);
  mw.require("liveedit.js");
  mw.require(mw.settings.includes_url + "css/liveedit.css");
  mw.require(mw.settings.includes_url + "css/components.css");
  mw.require(mw.settings.includes_url + "css/wysiwyg.css");


  
</script>
<style>
.mw-sorthandle, .mw_master_handle {
	display:none !important;
}
</style>
<?php 
$here = mw_includes_path();
include $here . 'toolbar' . DS . 'wysiwyg.php';
include $here . 'toolbar' . DS . 'wysiwyg_tiny.php';
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:index.php


示例13: mw_var

mw_var('plain_modules', true);
if (is_admin() == false) {
    //exit('Must be admin');
}
?>
 

<div class="mw-admin-editor <?php 
print $mainclass;
?>
" id="the_admin_editor">
 <?php 
//include mw_includes_path() . DS . 'toolbar' . DS ."wysiwyg_admin.php";
?>
 <?php 
include mw_includes_path() . DS . 'toolbar' . DS . "wysiwyg_tiny.php";
?>
  <div class="mw-admin-editor-area" id="mw-iframe-editor-area" tabindex="0" >{content}</div>
</div>

<?php 
mw_var('plain_modules', false);
?>

<span class="mw-plus-top">+</span>
<span class="mw-plus-bottom">+</span>
<div style="display: none" id="plus-modules-list">
<input type="text" class="mw-ui-searchfield" />
    <div class="mw-ui-btn-nav mw-ui-btn-nav-tabs pull-left">
        <span class="mw-ui-btn active"><span class="mw-icon-module"></span><?php 
_e("Modules");
开发者ID:minhkiller,项目名称:microweber,代码行数:31,代码来源:index.php


示例14: mw_var

::-webkit-scrollbar-thumb {
    background: #787878;
}

.mw-admin-editor .module{
	 
}

</style>
</head>
<body style="padding: 0;margin: 0;">
<?php 
mw_var('plain_modules', true);
if (is_admin() == false) {
    //exit('Must be admin');
}
?>


<div class="mw-admin-editor" id="the_admin_editor">
 <?php 
include mw_includes_path() . DS . 'toolbar' . DS . "wysiwyg_admin.php";
?>
  <div id="mw-richtext-content" tabindex="0" autofocus="autofocus">{content}</div>
</div>

<?php 
mw_var('plain_modules', false);
?>
</body>
</html>
开发者ID:hyrmedia,项目名称:microweber,代码行数:31,代码来源:index.php


示例15: mw_includes_path

        } else {
            $done = true;
            $f = mw_includes_path() . 'install' . DIRECTORY_SEPARATOR . 'done.php';
            include $f;
            exit;
        }
        //  var_dump($save_config);
    }
}
if (!isset($to_save['IS_INSTALLED'])) {
    $cfg = MW_CONFIG_FILE;
    $data = false;
    if (is_file($cfg)) {
        include $cfg;
        if (isset($config)) {
            $data = $config;
        }
        //
    }
    if (is_array($data)) {
        foreach ($data as $key => $value) {
            if (is_string($value) and !is_array($key)) {
                $value_clean = str_ireplace($remove, '', $value);
                $data[$key] = $value_clean;
            }
        }
    }
    __mw_install_log('Preparing to install');
    $f = mw_includes_path() . 'install' . DIRECTORY_SEPARATOR . 'main.php';
    include $f;
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:31,代码来源:index+-+Copy.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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