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

PHP parse_params函数代码示例

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

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



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

示例1: get_quotes

function get_quotes($params = array())
{
    if (is_string($params)) {
        $params = parse_params($params);
    }
    $params['table'] = "ez_quotes";
    return db_get($params);
}
开发者ID:pinecreativelabs,项目名称:EZ-Quotes,代码行数:8,代码来源:functions.php


示例2: get

 public function get($params = array())
 {
     if (is_string($params)) {
         $params = parse_params($params);
     }
     $table = $this->table;
     $params['table'] = $table;
     $get = $this->app->database_manager->get($params);
     return $get;
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:10,代码来源:TaxManager.php


示例3: save

 public function save($params)
 {
     $table = $this->table;
     $params = parse_params($params);
     $params['user_ip'] = MW_USER_IP;
     $params['table'] = $table;
     $save = $this->app->database_manager->save($params);
     $id = $save;
     $this->app->cache_manager->delete('log' . DIRECTORY_SEPARATOR . 'global');
     return $id;
 }
开发者ID:microweber,项目名称:microweber,代码行数:11,代码来源:LogManager.php


示例4: save

 public function save($params)
 {
     if (is_string($params)) {
         $params = parse_params($params);
     }
     if ($params == false) {
         return;
     }
     $table = $this->table;
     $params['table'] = $table;
     $save = $this->app->database_manager->save($params);
     return $save;
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:13,代码来源:Crud.php


示例5: save

 public function save($params)
 {
     if (is_string($params)) {
         $params = parse_params($params);
     }
     if ($params == false) {
         return;
     }
     if (!$this->has_permission($params)) {
         return;
     }
     $table = $this->table;
     $params['table'] = $table;
     $save = parent::save($params);
     return $save;
 }
开发者ID:microweber,项目名称:microweber,代码行数:16,代码来源:UserCrud.php


示例6: save

 public function save($data)
 {
     if (!is_array($data)) {
         $data = parse_params($data);
     }
     if (!isset($data['id'])) {
         if (!isset($data['attribute_name'])) {
             return array('error' => "You must set 'field' parameter");
         }
         if (!isset($data['attribute_value'])) {
             return array('error' => "You must set 'value' parameter");
         }
     }
     if (!isset($data['rel_type']) and isset($data['content_id'])) {
         $data['rel_type'] = 'content';
         $data['rel_id'] = $data['content_id'];
     }
     if (isset($data['attribute_name']) and isset($data['rel_id']) and isset($data['rel_type'])) {
         $is_existing_data = array();
         $is_existing_data['attribute_name'] = $data['attribute_name'];
         $is_existing_data['rel_id'] = $data['rel_id'];
         $is_existing_data['rel_type'] = $data['rel_type'];
         $is_existing_data['one'] = true;
         $is_existing = $this->get($is_existing_data);
         if (is_array($is_existing) and isset($is_existing['id'])) {
             $data['id'] = $is_existing['id'];
         }
     }
     if (isset($data['content_id'])) {
         $data['rel_id'] = intval($data['content_id']);
     }
     if (isset($data['attribute_value']) and is_array($data['attribute_value'])) {
         $data['attribute_value'] = json_encode($data['attribute_value']);
         $data['attribute_type'] = 'array';
     }
     if (!isset($data['rel_type'])) {
         $data['rel_type'] = 'content';
     }
     if (isset($data['rel_type']) and $data['rel_type'] == 'content') {
         if (isset($data['rel_id'])) {
             $data['content_id'] = $data['rel_id'];
         }
     }
     $save = parent::save($data);
     return $save;
 }
开发者ID:hyrmedia,项目名称:microweber,代码行数:46,代码来源:AttributesManager.php


示例7: link_to

function link_to($link, $text, $title, $params)
{
    $link = '<a href="' . $link . '" ';
    if ($title) {
        $link .= 'title="' . $title . '" ';
    } else {
        $link .= 'title="' . $text . '"';
    }
    if (is_array($params)) {
        foreach ($params as $param) {
            $link .= parse_params($param);
        }
    } else {
        $link .= parse_params($params);
    }
    $link .= '>' . $text . '</a>';
    return $link;
}
开发者ID:OneTimeCZ,项目名称:Tasker,代码行数:18,代码来源:BasicHelper.php


示例8: array

/**
* 		array(
			'method' => 'foo',
			'params' => array(
				'a' => null,
			),
			'is_public'=>1,
			'is_return'=>0,
			'testcase' => array(
				array('input'=>array('a'=>1), 'output'=>null),
			),
		)
*/
function main($args)
{
    if (empty($args[1])) {
        echo "filepath is require\n";
        return;
    }
    $class_path = $args[1];
    if (!file_exists($class_path)) {
        echo sprintf("path %s is not exits!\n", $class_path);
        return;
    }
    $buf = file_get_contents($class_path);
    $n = preg_match_all('/([a-z|\\s]+)function\\s+([^\\s|\\(|\\{)]+)\\s*\\(([^)]+)\\)/', $buf, $match);
    $methods = array();
    $method_empty = array('method' => '', 'params' => array(), 'is_public' => 0, 'is_return' => 0, 'is_static' => 0, 'testcase' => array());
    if ($n > 0) {
        for ($i = 0; $i < $n; $i++) {
            $row = $method_empty;
            $row['method'] = $match[2][$i];
            $row['params'] = parse_params($match[3][$i]);
            //var_dump($row);
        }
    }
}
开发者ID:wjzhangq,项目名称:testcase,代码行数:37,代码来源:parseClass.php


示例9: save

 /**
  * Generic save data function, it saves data to the database
  *
  * @param $table
  * @param $data
  * @param bool $data_to_save_options
  * @return string|int The id of the saved row.
  *
  * @example
  * <code>
  * $table = $this->table_prefix.'content';
  * $data = array();
  * $data['id'] = 0; //if 0 will create new content
  * $data['title'] = 'new title';
  * $data['content'] = '<p>Something</p>';
  * $save = save($table, $data);
  * </code>
  * @package Database
  */
 public function save($table, $data = false, $data_to_save_options = false)
 {
     if (is_array($table) and isset($table['table'])) {
         $data = $table;
         $table = $table['table'];
         unset($data['table']);
     }
     if (is_string($data)) {
         $data = parse_params($data);
     }
     if (!is_array($data)) {
         return false;
     }
     $original_data = $data;
     $is_quick = isset($original_data['quick_save']);
     $skip_cache = isset($original_data['skip_cache']);
     if (!isset($params['skip_timestamps'])) {
         if (!isset($params['id']) or isset($params['id']) and $params['id'] == 0) {
             if (!isset($params['created_at'])) {
                 $params['created_at'] = date("Y-m-d H:i:s");
             }
         }
         if (!isset($params['updated_at'])) {
             $params['updated_at'] = date("Y-m-d H:i:s");
         }
     }
     if ($is_quick == false) {
         if (isset($data['updated_at']) == false) {
             $data['updated_at'] = date("Y-m-d H:i:s");
         }
     }
     if ($skip_cache == false and isset($data_to_save_options) and !empty($data_to_save_options)) {
         if (isset($data_to_save_options['delete_cache_groups']) and !empty($data_to_save_options['delete_cache_groups'])) {
             foreach ($data_to_save_options['delete_cache_groups'] as $item) {
                 $this->app->cache_manager->delete($item);
             }
         }
     }
     $user_sid = mw()->user_manager->session_id();
     $the_user_id = mw()->user_manager->id();
     if (!isset($data['session_id']) and $user_sid) {
         $data['session_id'] = $user_sid;
     }
     if (!isset($data['id'])) {
         $data['id'] = 0;
     }
     if (isset($data['cf_temp'])) {
         $cf_temp = $data['cf_temp'];
     }
     $allow_html = false;
     $allow_scripts = false;
     if (isset($data['allow_html']) and !isset($_REQUEST['allow_html'])) {
         $allow_html = $data['allow_html'];
     }
     if (isset($data['allow_scripts']) and !isset($_REQUEST['allow_scripts'])) {
         $allow_scripts = $data['allow_scripts'];
     }
     if (isset($data['debug']) and $data['debug'] == true) {
         $dbg = 1;
         unset($data['debug']);
     } else {
         $dbg = false;
     }
     if ($dbg != false) {
         var_dump($data);
     }
     $data['user_ip'] = MW_USER_IP;
     if (isset($data['id']) == false or $data['id'] == 0) {
         $data['id'] = 0;
         $l = $this->last_id($table);
         $data['new_id'] = intval($l + 1);
         $original_data['new_id'] = $data['new_id'];
     }
     if (!isset($the_user_id)) {
         $the_user_id = 0;
     }
     if (intval($data['id']) == 0) {
         if (isset($data['created_at']) == false) {
             $data['created_at'] = date("Y-m-d H:i:s");
         }
         if ($the_user_id) {
//.........这里部分代码省略.........
开发者ID:hyrmedia,项目名称:microweber,代码行数:101,代码来源:DatabaseManager.php


示例10: get

 public function get($params)
 {
     $table = $this->tables['media'];
     if ($params != false and !is_array($params) and intval($params) > 0) {
         $params2 = array();
         $params2['rel_type'] = 'content';
         $params2['rel_id'] = intval($params);
         $params = $params2;
     } else {
         $params = parse_params($params);
     }
     if (!isset($params['rel_type']) and isset($params['for'])) {
         $params['rel_type'] = $this->app->database_manager->assoc_table_name($params['for']);
     }
     if (!isset($params['rel_type'])) {
         $params['rel_type'] = 'content';
     }
     if (!isset($params['limit'])) {
         $params['limit'] = "nolimit";
     }
     $params['table'] = $table;
     $params['order_by'] = 'position ASC';
     $data = $this->app->database_manager->get($params);
     if (media_base_url()) {
         if (!empty($data)) {
             $return = array();
             foreach ($data as $item) {
                 if (isset($item['filename']) and $item['filename'] != false) {
                     if (!stristr($item['filename'], '{SITE_URL}') and !stristr($item['filename'], '{MEDIA_URL}') and !stristr($item['filename'], '://') and !stristr($item['filename'], media_base_url())) {
                         $item['filename'] = media_base_url() . $item['filename'];
                     }
                 }
                 if (isset($item['title']) and $item['title'] != '') {
                     $item['title'] = html_entity_decode($item['title']);
                     $item['title'] = strip_tags($item['title']);
                     $item['title'] = $this->app->format->clean_html($item['title']);
                 }
                 $return[] = $item;
             }
             $data = $return;
         }
     }
     return $data;
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:44,代码来源:MediaManager.php


示例11: get

 public function get($table, $id = 0, $return_full = false, $field_for = false, $debug = false, $field_type = false, $for_session = false)
 {
     $params = array();
     $no_cache = false;
     $table_assoc_name = false;
     // $id = intval ( $id );
     if (is_string($table)) {
         $params = $params2 = parse_params($table);
         if (!is_array($params2) or is_array($params2) and count($params2) < 2) {
             $id = trim($id);
             $table = $this->app->database_manager->escape_string($table);
             if ($table != false) {
                 $table_assoc_name = $this->app->database_manager->assoc_table_name($table);
             } else {
                 $table_assoc_name = 'MW_ANY_TABLE';
             }
             if ($table_assoc_name == false) {
                 $table_assoc_name = $this->app->database_manager->assoc_table_name($table_assoc_name);
             }
             $params['rel_type'] = $table_assoc_name;
         } else {
             $params = $params2;
         }
     } elseif (is_array($table)) {
         $params = $table;
     }
     $params = $this->unify_params($params);
     if (!isset($table_assoc_name)) {
         if (isset($params['for'])) {
             $params['rel_type'] = $table_assoc_name = $this->app->database_manager->assoc_table_name($params['for']);
         }
     } else {
         // $params['rel_type'] = $table_assoc_name;
     }
     if (isset($params['debug'])) {
         $debug = $params['debug'];
     }
     if (isset($params['for'])) {
         if (!isset($params['rel_type']) or $params['rel_type'] == false) {
             $params['for'] = $params['rel_type'];
         }
     }
     if (isset($params['for_id'])) {
         $params['rel_id'] = $id = $this->app->database_manager->escape_string($params['for_id']);
     }
     if (isset($params['field_type'])) {
         $params['type'] = $params['field_type'];
     }
     if (isset($params['field_value'])) {
         $params['value'] = $params['field_value'];
     }
     if (isset($params['no_cache'])) {
         $no_cache = $params['no_cache'];
     }
     if (isset($params['return_full'])) {
         $return_full = $params['return_full'];
     }
     if (isset($params['is_active']) and strtolower(trim($params['is_active'])) == 'any') {
     } elseif (isset($params['is_active']) and $params['is_active'] == 0) {
         $custom_field_is_active = 0;
     } else {
         $custom_field_is_active = 1;
     }
     $table_custom_field = $this->table;
     $params['table'] = $table_custom_field;
     if (isset($custom_field_is_active)) {
         $params['is_active'] = $custom_field_is_active;
     }
     if (strval($table_assoc_name) != '') {
         if ($field_for != false) {
             $field_for = trim($field_for);
             $field_for = $this->app->database_manager->escape_string($field_for);
             $params['name'] = $field_for;
         }
         if (isset($params['rel_type']) and $params['rel_type'] == 'MW_ANY_TABLE') {
             unset($params['rel_type']);
         }
         $sidq = '';
         if (intval($id) == 0 and $for_session != false) {
             if (is_admin() != false) {
                 $sid = mw()->user_manager->session_id();
                 $params['session_id'] = $sid;
             }
         }
         if ($id != 'all' and $id != 'any') {
             $id = $this->app->database_manager->escape_string($id);
             $params['rel_id'] = $id;
         }
     }
     if (isset($params['content'])) {
         unset($params['content']);
     }
     if (!isset($params['order_by']) and !isset($params['orderby'])) {
         $params['order_by'] = 'position asc';
     }
     if (empty($params)) {
         return false;
     }
     $q = $this->app->database_manager->get($params);
     if (!empty($q)) {
//.........这里部分代码省略.........
开发者ID:microweber,项目名称:microweber,代码行数:101,代码来源:FieldsManager.php


示例12: mw_send_anonymous_server_data

function mw_send_anonymous_server_data($params)
{
    only_admin_access();
    $update_api = mw('update');
    if ($params != false) {
        $params = parse_params($params);
    }
    if (method_exists($update_api, 'send_anonymous_server_data')) {
        $iudates = $update_api->send_anonymous_server_data($params);
        return $iudates;
    } else {
        $params['site_url'] = site_url();
        $result = $update_api->call('send_anonymous_server_data', $params);
        return $result;
    }
}
开发者ID:newaltcoin,项目名称:microweber,代码行数:16,代码来源:other.php


示例13: rtrim

    }
    // true for nginx
}
$doc_path = 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
$base_path = MOD_REWRITE ? $doc_path : $doc_path . '/' . SCRIPT_NAME;
ini_set('session.gc_maxlifetime', 7776000);
ini_set('session.cookie_lifetime', 7776000);
session_set_cookie_params(7776000);
session_start();
//if( $_SERVER['HTTP_HOST'] == 'localhost' ) $userid = 'test';
if (isset($_SESSION['user_id'])) {
    $userid = $_SESSION['user_id'];
}
$message = '';
$api = isset($_REQUEST['api']);
$params = parse_params();
$action = $params['action'];
$bbcode = $params['bbcode'];
$title = $params['title'];
if (isset($params['id'])) {
    $scodeid = $params['id'];
}
if (isset($params['editid'])) {
    $seditid = $params['editid'];
}
$data = false;
if (isset($scodeid)) {
    $data = get_data($scodeid);
    if (!$data) {
        if ($api) {
            return_json(array('error' => 'No such code: ' . $scodeid));
开发者ID:keno-teixeira,项目名称:PHP-leaflet-wms,代码行数:31,代码来源:index.php


示例14: get

 /**
  * \Files\Api::get
  *
  *  Get an array that represents directory and files
  *
  * @package        modules
  * @subpackage    files
  * @subpackage    files\api
  * @category    files module api
  * @version 1.0
  * @since 0.320
  * @return mixed Array with files
  *
  * @param array $params = array()     the params
  * @param string $params['directory']       The directory
  * @param string $params['keyword']       If set it will seach the dir and subdirs
  */
 static function get($params)
 {
     if (is_admin() == false) {
         mw_error("Must be admin");
     }
     $params = parse_params($params);
     if (!isset($params['directory'])) {
         mw_error("You must define directory");
     } else {
         $directory = $params['directory'];
     }
     $from_search = 0;
     $arrayItems = array();
     if (isset($params['search']) and strval($params['search']) != '') {
         $from_search = 1;
         $arrayItems_search = rglob($pattern = DS . '*' . $params['search'] . '*', $flags = 0, $directory);
     } else {
         //$paths = glob($directory . DS . '*', GLOB_ONLYDIR | GLOB_NOSORT);
         //$files = glob($directory . DS . '*', 0);
         //$arrayItems_search = array_merge($paths, $files);
         if (!is_dir($directory . DS)) {
             return false;
         }
         $arrayItems_search = array();
         $myDirectory = opendir($directory . DS);
         // get each entry
         while ($entryName = readdir($myDirectory)) {
             if ($entryName != '..' and $entryName != '.') {
                 $arrayItems_search[] = $entryName;
             }
         }
         // close directory
         closedir($myDirectory);
     }
     if (!empty($arrayItems_search)) {
         if (isset($params['sort_by']) and strval($params['sort_by']) != '') {
             if (isset($params['sort_order']) and strval($params['sort_order']) != '') {
                 $ord = SORT_DESC;
                 if (strtolower($params['sort_order']) == 'asc') {
                     $ord = SORT_ASC;
                 }
                 array_multisort(array_map($params['sort_by'], $arrayItems_search), SORT_NUMERIC, $ord, $arrayItems_search);
                 //	d($arrayItems_search);
             }
         }
         //usort($myarray, create_function('$a,$b', 'return filemtime($a) - filemtime($b);'));
         $arrayItems_f = array();
         $arrayItems_d = array();
         foreach ($arrayItems_search as $file) {
             if ($from_search == 0) {
                 $file = $directory . DS . $file;
             }
             if (is_file($file)) {
                 $df = normalize_path($file, false);
                 if (!in_array($df, $arrayItems_f)) {
                     $arrayItems_f[] = $df;
                 }
             } else {
                 $df = normalize_path($file, 1);
                 if (!in_array($df, $arrayItems_d)) {
                     $arrayItems_d[] = $df;
                 }
             }
         }
         $arrayItems['files'] = $arrayItems_f;
         $arrayItems['dirs'] = $arrayItems_d;
     }
     return $arrayItems;
 }
开发者ID:MenZil-Team,项目名称:microweber,代码行数:86,代码来源:Api.php


示例15: get

 public function get($params = false)
 {
     $params = parse_params($params);
     $return = array();
     $is_sys_log = false;
     if (isset($params['id'])) {
         $is_log = substr(strtolower($params['id']), 0, 4);
         if ($is_log == 'log_') {
             $is_sys_log = 1;
             $is_log_id = str_ireplace('log_', '', $params['id']);
             $log_entr = $this->app->log_manager->get_entry_by_id($is_log_id);
             if ($log_entr != false and isset($params['one'])) {
                 return $log_entr;
             } else {
                 if ($log_entr != false) {
                     $return[] = $log_entr;
                 }
             }
         }
     }
     if (isset($params['rel'])) {
         $params['rel_type'] = $params['rel'];
     }
     if ($is_sys_log == false) {
         $table = $this->table;
         $params['table'] = $table;
         $params['order_by'] = 'id desc';
         $return = $this->app->database_manager->get($params);
     }
     return $return;
 }
开发者ID:Git-Host,项目名称:microweber,代码行数:31,代码来源:NotificationsManager.php


示例16: update_order

 /**
  * update_order
  *
  * updates order by parameters
  *
  * @package        modules
  * @subpackage     shop
  * @subpackage     shop\orders
  * @category       shop module api
  */
 public function update_order($params = false)
 {
     $params2 = array();
     if ($params == false) {
         $params = array();
     }
     if (is_string($params)) {
         $params - parse_params($params);
     }
     if (isset($params['is_paid'])) {
         if ($params['is_paid'] == 'y') {
             $params['is_paid'] = 1;
         } elseif ($params['is_paid'] == 'n') {
             $params['is_paid'] = 0;
         }
     }
     $table = $this->tables['cart_orders'];
     $params['table'] = $table;
     $this->app->cache_manager->delete('cart_orders');
     return $this->app->database_manager->save($table, $params);
 }
开发者ID:apsolut,项目名称:microweber,代码行数:31,代码来源:ShopManager.php


示例17: get_lists

 public function get_lists($params)
 {
     $params = parse_params($params);
     $table = MW_DB_TABLE_FORMS_LISTS;
     $params['table'] = $table;
     return $this->app->database_manager->get($params);
 }
开发者ID:biggtfish,项目名称:microweber,代码行数:7,代码来源:FormsManager.php


示例18: get_saved_modules_as_template

 public function get_saved_modules_as_template($params)
 {
     $params = parse_params($params);
     if ($this->app->user_manager->is_admin() == false) {
         return false;
     }
     $table = MW_DB_TABLE_MODULE_TEMPLATES;
     $params['table'] = $table;
     $data = $this->app->database_manager->get($params);
     return $data;
 }
开发者ID:kamilmiesiac,项目名称:microweber,代码行数:11,代码来源:Modules.php


示例19: template_save_css

 function template_save_css($params)
 {
     $is_admin = $this->app->user_manager->is_admin();
     if ($is_admin == false) {
         return false;
     }
     if (is_string($params)) {
         $params = parse_params($params);
     }
     $ref_page = false;
     if (!isset($params['active_site_template'])) {
         if (!isset($params['content_id'])) {
             if (isset($_SERVER['HTTP_REFERER'])) {
                 $ref_page_url = $_SERVER['HTTP_REFERER'];
                 if ($ref_page_url != '') {
                     $ref_page_url_rel = str_ireplace(site_url(), '', $ref_page_url);
                     if ($ref_page_url_rel == '') {
                         $ref_page1 = $this->app->content_manager->homepage();
                     } else {
                         $ref_page1 = $this->app->content_manager->get_by_url($ref_page_url, true);
                     }
                     if (isset($ref_page1['id'])) {
                         $ref_page = $this->app->content_manager->get_by_id(intval($ref_page1['id']));
                     }
                 }
             }
         } else {
             $ref_page = $this->app->content_manager->get_by_id(intval($params['content_id']));
         }
         if (isset($ref_page['id']) and isset($ref_page['content_type']) and $ref_page['content_type'] != 'page') {
             $ref_page_parent = $this->app->content_manager->get_by_id(intval($ref_page['id']));
             if (isset($ref_page_partent['parent']) and intval($ref_page_partent['parent']) != 0) {
                 $ref_page = $this->app->content_manager->get_by_id(intval($ref_page_partent['id']));
             } else {
                 $ref_page_parents = $this->app->content_manager->get_parents(intval($ref_page['id']));
                 if (!empty($ref_page_parents)) {
                     $ref_page_parent = array_pop($ref_page_parents);
                     $ref_page = $this->app->content_manager->get_by_id($ref_page_parent);
                 }
             }
         }
     } else {
         $ref_page = $params;
     }
     if (!is_array($ref_page) or empty($ref_page)) {
         return false;
     }
     $pd = $ref_page;
     if ($is_admin == true and is_array($pd)) {
         $save_page = $pd;
         if (isset($save_page["layout_file"]) and $save_page["layout_file"] == 'inherit') {
             $inherit_from_id = $this->app->content_manager->get_inherited_parent($save_page["id"]);
             $inherit_from = $this->app->content_manager->get_by_id($inherit_from_id);
             if (is_array($inherit_from) and isset($inherit_from['active_site_template'])) {
                 $save_page['active_site_template'] = $inherit_from['active_site_template'];
                 $save_page['layout_file'] = $inherit_from['layout_file'];
             }
         }
         $template = false;
         if (!isset($save_page['active_site_template']) or $save_page['active_site_template'] == '') {
             $template = 'default';
         } else {
             if (isset($save_page['active_site_template'])) {
                 $template = $save_page['active_site_template'];
             }
         }
         if ($template == 'default') {
             $site_template_settings = $this->app->option_manager->get('current_template', 'template');
             if ($site_template_settings != false and $site_template_settings != 'default') {
                 $template = $site_template_settings;
             }
         }
         $final_file_blocks = array();
         if ($template != false) {
             if (isset($_POST['save_template_settings'])) {
                 $json = json_encode($_POST);
                 $option = array();
                 $option['option_value'] = $json;
                 $option['option_key'] = 'template_settings';
                 $option['option_group'] = 'template_' . $template;
                 save_option($option);
             }
             $template_folder = templates_path() . $template . DS;
             $template_url = templates_url() . $template . '/';
             $this_template_url = THIS_TEMPLATE_URL;
             $template_folder = userfiles_path() . 'css' . DS . $template . DS;
             if (!is_dir($template_folder)) {
                 mkdir_recursive($template_folder);
             }
             $live_edit_css = $template_folder . 'live_edit.css';
             $fcont = '';
             if (is_file($live_edit_css)) {
                 $fcont = file_get_contents($live_edit_css);
             }
             $css_cont = $fcont;
             $css_cont_new = $css_cont;
             //@import on top
             $sort_params = array();
             $sort_params2 = array();
             foreach ($params as $item) {
//.........这里部分代码省略.........
开发者ID:hyrmedia,项目名称:microweber,代码行数:101,代码来源:LayoutsManager.php


示例20: get_page_name

 /**
  * Figure out the page to load, and put it in $this->pages and ROSTER_PAGE_NAME
  */
 function get_page_name()
 {
     // cmslink function to resolve SEO linking etc.
     parse_params();
     // --[ Determine the module request ]--
     if (isset($_GET[ROSTER_PAGE]) && !empty($_GET[ROSTER_PAGE])) {
         $page = $_GET[ROSTER_PAGE];
     } elseif (!strpos($this->config['default_page'], '&amp;')) {
         $page = $this->config['default_page'];
     } else {
         // --[ Insert directly into GET request ]--
         list($page, $gets) = explode('&amp;', $this->conf['default_page'], 2);
         foreach (explode('&amp;', $gets) as $get) {
             list($key, $value) = explode('=', $get, 2);
             $_GET[$key] = $value;
         }
     }
     // --[ We only accept certain characters in our page ]--
     if (preg_match('/[^a-zA-Z0-9_-]/', $page)) {
         roster_die($this->locale->act['invalid_char_module'], $this->locale->act['roster_error']);
     }
     define('ROSTER_PAGE_NAME', $page);
     $this->pages = explode('-', $page);
     if (in_array($this->pages[0], array('util', 'user', 'realm', 'guild', 'char'))) {
         $this->scope = $this->pages[0];
     } else {
         $this->scope = 'page';
     }
 }
开发者ID:Sajaki,项目名称:wowroster,代码行数:32,代码来源:roster.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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