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


PHP debug_die函数代码示例

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


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

示例1: ip2int

 /**
  * Get an object from cache by IP address
  *
  * Load into cache if necessary
  *
  * @param string IP address
  * @param boolean false if you want to return false on error
  * @param boolean true if function should die on empty/null
  */
 function &get_by_ip($req_ip, $halt_on_error = false, $halt_on_empty = false)
 {
     global $DB, $Debuglog;
     if (!isset($this->ip_index[$req_ip])) {
         // not yet in cache:
         $IP = ip2int($req_ip);
         $SQL = new SQL('Get ID of IP range by IP address');
         $SQL->SELECT('aipr_ID');
         $SQL->FROM('T_antispam__iprange');
         $SQL->WHERE('aipr_IPv4start <= ' . $DB->quote($IP));
         $SQL->WHERE_and('aipr_IPv4end >= ' . $DB->quote($IP));
         $IPRange_ID = $DB->get_var($SQL->get());
         // Get object from IPRangeCache bi ID
         $IPRange = $this->get_by_ID($IPRange_ID, $halt_on_error, $halt_on_empty);
         if ($IPRange) {
             // It is in IPRangeCache
             $this->ip_index[$req_ip] = $IPRange;
         } else {
             // not in the IPRangeCache
             if ($halt_on_error) {
                 debug_die("Requested {$this->objtype} does not exist!");
             }
             $this->ip_index[$req_ip] = false;
         }
     } else {
         $Debuglog->add("Retrieving <strong>{$this->objtype}({$req_ip})</strong> from cache");
     }
     return $this->ip_index[$req_ip];
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:38,代码来源:_iprangecache.class.php

示例2: debug_die

 /**
  * Get an object from cache by its urltitle
  *
  * Load into cache if necessary
  *
  * @param string stub of object to load
  * @param boolean false if you want to return false on error
  */
 function &get_by_urltitle($req_urltitle, $halt_on_error = true)
 {
     global $DB, $Debuglog;
     if (!isset($this->urltitle_index[$req_urltitle])) {
         // not yet in cache:
         // Load just the requested object:
         $Debuglog->add("Loading <strong>{$this->objtype}({$req_urltitle})</strong> into cache");
         $sql = "SELECT *\r\n\t\t\t          FROM {$this->dbtablename}\r\n\t\t\t         WHERE post_urltitle = " . $DB->quote($req_urltitle);
         $row = $DB->get_row($sql);
         if (empty($row)) {
             // Requested object does not exist
             if ($halt_on_error) {
                 debug_die("Requested {$this->objtype} does not exist!");
             }
             // put into index:
             $this->urltitle_index[$req_urltitle] = false;
             return $this->urltitle_index[$req_urltitle];
         }
         $this->instantiate($row);
         // put into index:
         $this->urltitle_index[$req_urltitle] =& $this->cache[$row->post_ID];
     } else {
         $Debuglog->add("Retrieving <strong>{$this->objtype}({$req_urltitle})</strong> from cache");
     }
     return $this->urltitle_index[$req_urltitle];
 }
开发者ID:LFSF,项目名称:oras,代码行数:34,代码来源:_itemcache.class.php

示例3: load_all

 /**
  * Load the cache **extensively**
  */
 function load_all()
 {
     if ($this->all_loaded) {
         // Already loaded
         return false;
     }
     debug_die('Load all is not allowed for FileCache!');
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:11,代码来源:_filecache.class.php

示例4: XHTML_Validator

 /**
  * Constructor
  *
  * {@internal This gets tested in _libs.misc.simpletest.php}}
  *
  * @param string Context
  * @param boolean Allow CSS tweaks?
  * @param boolean Allow IFrames?
  * @param boolean Allow Javascript?
  * @param boolean Allow Objects?
  * @param string Input encoding to use ('ISO-8859-1', 'UTF-8', 'US-ASCII' or '' for auto-detect)
  * @param string Message type for errors
  */
 function XHTML_Validator($context = 'posting', $allow_css_tweaks = false, $allow_iframes = false, $allow_javascript = false, $allow_objects = false, $encoding = NULL, $msg_type = 'error')
 {
     global $inc_path;
     require $inc_path . 'xhtml_validator/_xhtml_dtd.inc.php';
     $this->context = $context;
     switch ($context) {
         case 'posting':
         case 'xmlrpc_posting':
             $this->tags =& $allowed_tags;
             $this->tagattrs =& $allowed_attributes;
             break;
         case 'commenting':
             $this->tags =& $comments_allowed_tags;
             $this->tagattrs =& $comments_allowed_attributes;
             break;
         case 'head_extension':
             $this->tags = array('body' => 'meta link style script', 'meta' => '', 'link' => '', 'style' => '#PCDATA', 'script' => '#PCDATA');
             $this->tagattrs = array('meta' => 'name content charset http-equiv', 'link' => 'charset href hreflang media rel sizes type', 'style' => 'media scoped type', 'script' => 'async charset defer src type');
             break;
         default:
             debug_die('unknown context: ' . $context);
     }
     // Attributes that need to be checked for a valid URI:
     $this->uri_attrs = array('xmlns', 'profile', 'href', 'src', 'cite', 'classid', 'codebase', 'data', 'archive', 'usemap', 'longdesc', 'action');
     $this->allowed_uri_scheme = get_allowed_uri_schemes($context);
     $this->msg_type = $msg_type;
     if (empty($encoding)) {
         global $io_charset;
         $encoding = $io_charset;
     }
     $encoding = strtoupper($encoding);
     // we might get 'iso-8859-1' for example
     $this->encoding = $encoding;
     if (!in_array($encoding, array('ISO-8859-1', 'UTF-8', 'US-ASCII'))) {
         // passed encoding not supported by xml_parser_create()
         $this->xml_parser_encoding = '';
         // auto-detect (in PHP4, in PHP5 anyway)
     } else {
         $this->xml_parser_encoding = $this->encoding;
     }
     $this->parser = xml_parser_create($this->xml_parser_encoding);
     $this->last_checked_pos = 0;
     $this->error = false;
     // Creates the parser
     xml_set_object($this->parser, $this);
     // set functions to call when a start or end tag is encountered
     xml_set_element_handler($this->parser, 'tag_open', 'tag_close');
     // set function to call for the actual data
     xml_set_character_data_handler($this->parser, 'cdata');
     xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:64,代码来源:_xhtml_validator.class.php

示例5: display_perm

/**
 * Display the permissions for the type file
 */
function display_perm($perm)
{
    switch ($perm) {
        case 'any':
            $r = get_icon('file_allowed');
            break;
        case 'registered':
            $r = get_icon('file_allowed_registered');
            break;
        case 'admin':
            $r = get_icon('file_not_allowed');
            break;
        default:
            debug_die('Wrong filetype allowed value!');
    }
    return $r;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:20,代码来源:_filetype_list.view.php

示例6: cat_create

/**
 * Create a new category
 *
 * This funtion has to handle all needed DB dependencies!
 *
 * @param string Category name
 * @param string Category ID ('NULL' as string(!) for root)
 * @param integer|NULL Blog ID (will be taken from parent cat, if empty)
 * @param string Category description
 * @param boolean Set to true if the new object needs to be added into the ChapterCache after it was created
 * @param integer Category order
 * @param boolean Is meta category?
 */
function cat_create($cat_name, $cat_parent_ID, $cat_blog_ID = NULL, $cat_description = NULL, $add_to_cache = false, $cat_order = NULL, $subcat_ordering = NULL, $meta = false)
{
    global $DB;
    load_class('chapters/model/_chapter.class.php', 'Chapter');
    if (!$cat_blog_ID) {
        if (empty($cat_parent_ID)) {
            debug_die('cat_create(-) missing parameters (cat_parent_ID)!');
        }
        $ChapterCache =& get_ChapterCache();
        $Chapter = $ChapterCache->get_by_ID($cat_parent_ID);
        $cat_blog_ID = $Chapter->blog_ID;
    }
    if ($cat_parent_ID === 'NULL') {
        // fix old use case
        $cat_parent_ID = NULL;
    }
    $new_Chapter = new Chapter(NULL, $cat_blog_ID);
    $new_Chapter->set('name', $cat_name);
    $new_Chapter->set('parent_ID', $cat_parent_ID);
    if (!empty($cat_description)) {
        // Set decription
        $new_Chapter->set('description', $cat_description);
    }
    $new_Chapter->set('order', $cat_order);
    $new_Chapter->set('subcat_ordering', $subcat_ordering);
    if ($meta) {
        // Set this category as meta
        $new_Chapter->set('meta', 1);
    }
    if (!$new_Chapter->dbinsert()) {
        return 0;
    }
    if ($add_to_cache) {
        // add new Category into the Cache
        $ChapterCache =& get_ChapterCache();
        $ChapterCache->add($new_Chapter);
    }
    return $new_Chapter->ID;
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:52,代码来源:_category.funcs.php

示例7: param

            $Session->assert_received_crumb('users');
            // Check required permission
            $current_User->check_perm('users', 'edit', true);
            // get the type of the removable sender customization
            $type = param('type', 'string', true);
            // Set remove custom settings query
            $remove_query = 'DELETE FROM T_users__usersettings WHERE uset_name = "%s" AND uset_value != %s';
            if ($type == 'sender_email') {
                // Remove custom sender emails
                $DB->query(sprintf($remove_query, 'notification_sender_email', $DB->quote($Settings->get('notification_sender_email'))));
            } elseif ($type == 'sender_name') {
                // Remove custom sender names
                $DB->query(sprintf($remove_query, 'notification_sender_name', $DB->quote($Settings->get('notification_sender_name'))));
            } else {
                // The customization param is not valid
                debug_die('Invalid remove sender customization action!');
            }
            $Messages->add(T_('Customizations have been removed!'), 'success');
            $redirect_to = param('redirect_to', 'url', regenerate_url('action'));
            // Redirect so that a reload doesn't write to the DB twice:
            header_redirect($redirect_to);
            /* EXITED */
            break;
        case 'remove_report':
            // Remove one report on user:
            // Check that this action request is not a CSRF hacked request:
            $Session->assert_received_crumb('users');
            $reporter_ID = param('reporter_ID', 'integer', true);
            // Remove the report from DB:
            $DB->query('DELETE FROM T_users__reports
					WHERE urep_target_user_ID = ' . $DB->quote($edited_User->ID) . '
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:users.ctrl.php

示例8: duplicate

     } else {
         // Duplicate object in order no to mess with the cache:
         $edited_Thread = duplicate($edited_Message->Thread);
         // PHP4/5 abstraction
         $edited_Message = duplicate($edited_Message);
         // PHP4/5 abstraction
         $edited_Message->ID = 0;
     }
     $edited_Message->Thread =& $edited_Thread;
     init_tokeninput_js();
     break;
 case 'create':
     // Record new thread
     if (check_create_thread_limit()) {
         // max new threads limit reached, don't allow to create new thread
         debug_die('Invalid request, new conversation limit already reached!');
     }
     // the create_new_thread() funciton will create required Thread and Message objects
     if (create_new_thread()) {
         // new thread has been created successful
         // Redirect so that a reload doesn't write to the DB twice:
         header_redirect('?ctrl=threads', 303);
         // Will EXIT
         // We have EXITed already at this point!!
     }
     init_tokeninput_js();
     break;
 case 'delete':
     // Delete thread:
     // Check permission:
     $current_User->check_perm('perm_messaging', 'delete', true);
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:threads.ctrl.php

示例9: load_from_Request

 /**
  * Load data from Request form fields.
  *
  * @return boolean true if loaded data seems valid.
  */
 function load_from_Request($cron_job_names = array(), $cron_job_params = array())
 {
     if ($this->ID > 0 || get_param('ctsk_ID') > 0) {
         // Update or copy cron job
         $cjob_name = param('cjob_name', 'string', true);
         param_check_not_empty('cjob_name', T_('Please enter job name'));
     } else {
         // Create new cron job
         $cjob_type = param('cjob_type', 'string', true);
         if (!isset($cron_job_params[$cjob_type])) {
             // This cron job type doesn't exist, so this is an invalid state
             debug_die('Invalid job type received');
             $cjob_name = '';
         } else {
             $cjob_name = $cron_job_names[$cjob_type];
         }
     }
     // start datetime:
     param_date('cjob_date', T_('Please enter a valid date.'), true);
     param_time('cjob_time');
     $this->set('start_datetime', form_date(get_param('cjob_date'), get_param('cjob_time')));
     // repeat after:
     $cjob_repeat_after = param_duration('cjob_repeat_after');
     if ($cjob_repeat_after == 0) {
         $cjob_repeat_after = NULL;
     }
     $this->set('repeat_after', $cjob_repeat_after);
     // name:
     if (!empty($cjob_name) && $cjob_name != $this->get('name')) {
         $this->set('name', $cjob_name);
     }
     if ($this->ID == 0 && get_param('ctsk_ID') == 0) {
         // Set these params only on creating and copying actions
         // controller:
         $this->set('controller', $cron_job_params[$cjob_type]['ctrl']);
         // params:
         $this->set('params', $cron_job_params[$cjob_type]['params']);
     }
     return !param_errors_detected();
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:45,代码来源:_cronjob.class.php

示例10: header_redirect

}
// EXTERNAL FEED PROVIDER?
$rss2_redirect = $Blog->get_setting('rss2_redirect');
if (!empty($rss2_redirect) && empty($Chapter) && $redir == 'yes') {
    header_redirect($rss2_redirect, 301);
    exit(0);
}
// Note: even if we request the same post as $Item earlier, the following will do more restrictions (dates, etc.)
// Init the MainList object:
init_MainList($Blog->get_setting('posts_per_feed'));
// What level of detail do we want?
$feed_content = $Blog->get_setting('feed_content');
if ($feed_content == 'none') {
    // We don't want to provide this feed!
    // This will normaly have been detected earlier but just for security:
    debug_die('Feeds are disabled.');
}
$image_size = $Blog->get_setting('image_size');
headers_content_mightcache('application/xml');
// In most situations, you do NOT want to cache dynamic content!
// Add caching headers
header('Last-Modified: ' . $MainList->get_lastpostdate('r'));
header('Expires: ' . date('r', time() + 300));
// TODO: dh> should be a centralized setting. Maybe through the Skin class, if type is "feed"?
echo '<?xml version="1.0" encoding="' . $io_charset . '"?' . '>';
?>
<!-- generator="<?php 
echo $app_name;
?>
/<?php 
echo $app_version;
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:index.main.php

示例11: sprintf

        $DB->commit();
        break;
    case 'delete':
        // Remove a widget from container:
        $msg = sprintf(T_('Widget &laquo;%s&raquo; removed.'), $edited_ComponentWidget->get_name());
        $edited_ComponentWidget->dbdelete(true);
        unset($edited_ComponentWidget);
        forget_param('wi_ID');
        $Messages->add($msg, 'success');
        // PREVENT RELOAD & Switch to list mode:
        header_redirect('?ctrl=widgets&blog=' . $blog);
        break;
    case 'list':
        break;
    default:
        debug_die('Action: unhandled action');
}
/**
 * Display page header, menus & messages:
 */
$AdminUI->set_coll_list_params('blog_properties', 'edit', array('ctrl' => 'widgets'), T_('List'), '?ctrl=collections&amp;blog=0');
$AdminUI->set_path('blogs', 'widgets');
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
$AdminUI->disp_body_top();
/**
 * Display payload:
 */
switch ($action) {
    case 'nil':
开发者ID:LFSF,项目名称:oras,代码行数:31,代码来源:widgets.ctrl.php

示例12: send_email_notifications


//.........这里部分代码省略.........
        }
        if (!count($notify_users)) {
            // No-one to notify:
            return false;
        }
        /*
         * We have a list of user IDs to notify:
         */
        // TODO: dh> this reveals the comments author's email address to all subscribers!!
        //           $notify_from should get used by default, unless the user has opted in to be the sender!
        // fp>If the subscriber has permission to moderate the comments, he SHOULD receive the email address.
        // Get author email address. It will be visible for moderators/blog/post owners only -- NOT for other subscribers
        if ($this->get_author_User()) {
            // Comment from a registered user:
            $reply_to = $this->author_User->get('email');
            $author_name = $this->author_User->get('login');
            $author_ID = $this->author_User->ID;
        } elseif (!empty($this->author_email)) {
            // non-member, but with email address:
            $reply_to = $this->author_email;
            $author_name = $this->dget('author');
            $author_ID = NULL;
        } else {
            // Fallback (we have no email address):  fp>TODO: or the subscriber is not allowed to view it.
            $reply_to = NULL;
            $author_name = $this->dget('author');
            $author_ID = NULL;
        }
        // Load all users who will be notified, becasuse another way the send_mail_to_User funtion would load them one by one
        $UserCache =& get_UserCache();
        $UserCache->load_list(array_keys($notify_users));
        // Load a list with the blocked emails  in cache
        load_blocked_emails(array_keys($notify_users));
        // Send emails:
        foreach ($notify_users as $notify_user_ID => $notify_type) {
            // get data content
            $notify_User = $UserCache->get_by_ID($notify_user_ID);
            $notify_email = $notify_User->get('email');
            // init notification setting
            locale_temp_switch($notify_User->get('locale'));
            $notify_user_Group = $notify_User->get_Group();
            $notify_full = $notify_type == 'moderator' && $notify_user_Group->check_perm('comment_moderation_notif', 'full') || $notify_user_Group->check_perm('comment_subscription_notif', 'full');
            switch ($this->type) {
                case 'trackback':
                    /* TRANS: Subject of the mail to send on new trackbacks. First %s is the blog's shortname, the second %s is the item's title. */
                    $subject = T_('[%s] New trackback on "%s"');
                    break;
                default:
                    /* TRANS: Subject of the mail to send on new comments. */
                    // In case of full notification the first %s is blog name, the second %s is the item's title.
                    // In case of short notification the first %s is author login, the second %s is the item's title.
                    $subject = $notify_full ? T_('[%s] New comment on "%s"') : T_('%s posted a new comment on "%s"');
                    if ($only_moderators) {
                        if ($this->status == 'draft') {
                            $subject = $notify_full ? T_('[%s] New comment awaiting moderation on "%s"') : T_('New comment awaiting moderation: ') . $subject;
                        } else {
                            $subject = $notify_full ? T_('[%s] New comment may need moderation on "%s"') : T_('New comment may need moderation: ') . $subject;
                        }
                    }
            }
            if ($notify_type == 'moderator') {
                // moderation email
                $user_reply_to = $reply_to;
            } else {
                if ($notify_type == 'blog_subscription') {
                    // blog subscription
                    $user_reply_to = NULL;
                } else {
                    if ($notify_type == 'item_subscription') {
                        // item subscription
                        $user_reply_to = NULL;
                    } else {
                        if ($notify_type == 'creator') {
                            // user is the creator of the post
                            $user_reply_to = $reply_to;
                        } else {
                            debug_die('Unknown user subscription type');
                        }
                    }
                }
            }
            $subject = sprintf($subject, $notify_full ? $edited_Blog->get('shortname') : $author_name, $edited_Item->get('title'));
            $email_template_params = array('notify_full' => $notify_full, 'Comment' => $this, 'Blog' => $edited_Blog, 'Item' => $edited_Item, 'author_name' => $author_name, 'author_ID' => $author_ID, 'notify_type' => $notify_type);
            if ($debug) {
                $notify_message = mail_template('comment_new', 'text', $email_template_params);
                $mail_dump = "Sending notification to {$notify_email}:<pre>Subject: {$subject}\n{$notify_message}</pre>";
                if ($debug >= 2) {
                    // output mail content - NOTE: this will kill sending of headers.
                    echo "<p>{$mail_dump}</p>";
                }
                $Debuglog->add($mail_dump, 'notification');
            }
            // Send the email:
            // Note: Note activated users won't get notification email
            send_mail_to_User($notify_user_ID, $subject, 'comment_new', $email_template_params, false, array('Reply-To' => $user_reply_to));
            blocked_emails_memorize($notify_User->email);
            locale_restore_previous();
        }
        blocked_emails_display();
    }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:101,代码来源:_comment.class.php

示例13: gen_ID

 /**
  * @static
  */
 function gen_ID($root_type, $root_in_type_ID)
 {
     switch ($root_type) {
         case 'user':
         case 'collection':
         case 'skins':
             return $root_type . '_' . $root_in_type_ID;
     }
     debug_die("Root_type={$root_type} not supported");
 }
开发者ID:LFSF,项目名称:oras,代码行数:13,代码来源:_fileroot.class.php

示例14: get

 /**
  * Get a param.
  *
  * @param string Parameter name
  * @return false|string The value as string or false in case of error (e.g. media dir is disabled).
  */
 function get($parname)
 {
     global $xmlsrv_url, $baseurl, $basepath, $media_url, $current_User, $Settings, $Debuglog;
     switch ($parname) {
         case 'blogurl':
             // Deprecated
         // Deprecated
         case 'link':
             // Deprecated
         // Deprecated
         case 'url':
             return $this->gen_blogurl('default');
         case 'dynurl':
             return $this->gen_blogurl('dynamic');
         case 'staticurl':
             return $this->gen_blogurl('static');
         case 'dynfilepath':
             // Source file for static page:
             return $basepath . $this->get_setting('source_file');
         case 'staticfilepath':
             // Destiantion file for static page:
             return $basepath . $this->get_setting('static_file');
         case 'baseurl':
             return $this->gen_baseurl();
         case 'baseurlroot':
             // fp>> TODO: cleanup
             if (preg_match('#^(https?://(.+?)(:.+?)?)/#', $this->gen_baseurl(), $matches)) {
                 // TODO: shouldn't that include a trailing slash?:
                 return $matches[1];
             }
             debug_die('Blog::get(baseurl)/baseurlroot - assertion failed [baseurl: ' . $this->gen_baseurl() . '].');
         case 'lastcommentsurl':
             return url_add_param($this->gen_blogurl(), 'disp=comments');
         case 'arcdirurl':
             return url_add_param($this->gen_blogurl(), 'disp=arcdir');
         case 'catdirurl':
             return url_add_param($this->gen_blogurl(), 'disp=catdir');
         case 'mediaidxurl':
             return url_add_param($this->gen_blogurl(), 'disp=mediaidx');
         case 'msgformurl':
             return url_add_param($this->gen_blogurl(), 'disp=msgform');
         case 'description':
             // RSS wording
         // RSS wording
         case 'shortdesc':
             return $this->shortdesc;
         case 'rdf_url':
             return $this->get_item_feed_url('_rdf');
         case 'rss_url':
             return $this->get_item_feed_url('_rss');
         case 'rss2_url':
             return $this->get_item_feed_url('_rss2');
         case 'atom_url':
             return $this->get_item_feed_url('_atom');
         case 'comments_rdf_url':
             return $this->get_comment_feed_url('_rdf');
         case 'comments_rss_url':
             return $this->get_comment_feed_url('_rss');
         case 'comments_rss2_url':
             return $this->get_comment_feed_url('_rss2');
         case 'comments_atom_url':
             return $this->get_comment_feed_url('_atom');
             /* Add the html for a blog-specified stylesheet
              * All stylesheets will be included if the blog settings allow it
              * and the file "style.css" exists. CSS rules say that the latter style sheets can
              * override earlier stylesheets.
              */
         /* Add the html for a blog-specified stylesheet
          * All stylesheets will be included if the blog settings allow it
          * and the file "style.css" exists. CSS rules say that the latter style sheets can
          * override earlier stylesheets.
          */
         case 'blog_css':
             if ($this->allowblogcss && file_exists($this->get_media_dir(false) . 'style.css')) {
                 return '<link rel="stylesheet" href="' . $this->get_media_url() . 'style.css" type="text/css" />';
             } else {
                 return '';
             }
             /* Add the html for a user-specified stylesheet
              * All stylesheets will be included if the blog settings allow it
              * and the file "style.css" exists. CSS rules say that the latter style sheets can
              * override earlier stylesheets. A user-specified stylesheet will
              * override a blog-specified stylesheet which will override a skin stylesheet.
              */
         /* Add the html for a user-specified stylesheet
          * All stylesheets will be included if the blog settings allow it
          * and the file "style.css" exists. CSS rules say that the latter style sheets can
          * override earlier stylesheets. A user-specified stylesheet will
          * override a blog-specified stylesheet which will override a skin stylesheet.
          */
         case 'user_css':
             if ($this->allowusercss && isset($current_User) && file_exists($current_User->get_media_dir(false) . 'style.css')) {
                 return '<link rel="stylesheet" href="' . $current_User->get_media_url() . 'style.css" type="text/css" />';
             } else {
//.........这里部分代码省略.........
开发者ID:LFSF,项目名称:oras,代码行数:101,代码来源:_blog.class.php

示例15: debug_die

 * @var instance of User class
 */
global $edited_User;
/**
 * @var current action
 */
global $action;
/**
 * @var user permission, if user is only allowed to edit his profile
 */
global $user_profile_only;
global $user_tab, $user_ID;
global $current_User, $UserSettings;
if (!$current_User->check_perm('users', 'edit')) {
    // Check permission:
    debug_die(T_('You have no permission to see this tab!'));
}
memorize_param('user_tab', 'string', '', $user_tab);
memorize_param('user_ID', 'integer', 0, $user_ID);
// ------------------- PREV/NEXT USER LINKS -------------------
user_prevnext_links(array('block_start' => '<table class="prevnext_user"><tr>', 'prev_start' => '<td width="33%">', 'prev_end' => '</td>', 'prev_no_user' => '<td width="33%">&nbsp;</td>', 'back_start' => '<td width="33%" class="back_users_list">', 'back_end' => '</td>', 'next_start' => '<td width="33%" class="right">', 'next_end' => '</td>', 'next_no_user' => '<td width="33%">&nbsp;</td>', 'block_end' => '</tr></table>', 'user_tab' => 'activity'));
// ------------- END OF PREV/NEXT USER LINKS -------------------
if (!$user_profile_only) {
    // echo user edit action icons
    $Widget = new Widget();
    echo_user_actions($Widget, $edited_User, 'edit');
    echo '<span class="floatright">' . $Widget->gen_global_icons() . '</span>';
}
echo '<div>' . get_usertab_header($edited_User, $user_tab, $current_User->ID == $edited_User->ID ? T_('My Activity') : T_('User Activity')) . '</div>';
// Display IP address from where this user was created
echo '<div style="margin-top:25px;font-weight:bold;"><span>' . T_('User created from IP') . ': ' . int2ip($UserSettings->get('created_fromIPv4', $edited_User->ID)) . '</span></div>';
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_user_activity.view.php


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