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

PHP my_substr函数代码示例

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

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



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

示例1: asb_strip_url

function asb_strip_url($message)
{
    $message = ' ' . $message;
    $message = preg_replace("#([\\>\\s\\(\\)])(http|https|ftp|news){1}://([^\\/\"\\s\\<\\[\\.]+\\.([^\\/\"\\s\\<\\[\\.]+\\.)*[\\w]+(:[0-9]+)?(/[^\"\\s<\\[]*)?)#i", '', $message);
    $message = preg_replace("#([\\>\\s\\(\\)])(www|ftp)\\.(([^\\/\"\\s\\<\\[\\.]+\\.)*[\\w]+(:[0-9]+)?(/[^\"\\s<\\[]*)?)#i", '', $message);
    return my_substr($message, 1);
}
开发者ID:badboy4life91,项目名称:Advanced-Sidebox,代码行数:7,代码来源:functions_addon.php


示例2: create_action

 public function create_action($id, $type)
 {
     checkObject();
     checkObjectModule('documents');
     object_set_visit_module('documents');
     if (!$GLOBALS['rechte']) {
         throw new AccessDeniedException();
     }
     PageLayout::setTitle(_('Neuen Ordner erstellen'));
     $options = array();
     $options[md5('new_top_folder')] = _('Namen auswählen oder wie Eingabe') . ' -->';
     $query = "SELECT SUM(1) FROM folder WHERE range_id = ?";
     $statement = DBManager::get()->prepare($query);
     $statement->execute(array($id));
     if ($statement->fetchColumn() == 0) {
         $options[$id] = _('Allgemeiner Dateiordner');
     }
     if ($type === 'sem') {
         $query = "SELECT statusgruppe_id AS id, statusgruppen.name AS name\n                      FROM statusgruppen\n                      LEFT JOIN folder ON (statusgruppe_id = folder.range_id)\n                      WHERE statusgruppen.range_id = ? AND folder_id IS NULL\n                      ORDER BY position";
         $statement = DBManager::get()->prepare($query);
         $statement->execute(array($id));
         $statement->setFetchMode(PDO::FETCH_ASSOC);
         foreach ($statement as $row) {
             $options[$row['id']] = sprintf(_('Dateiordner der Gruppe: %s'), $row['name']);
         }
         $issues = array();
         $shown_dates = array();
         $query = "SELECT themen_termine.issue_id, termine.date, folder.name, termine.termin_id, date_typ\n                      FROM termine\n                      LEFT JOIN themen_termine USING (termin_id)\n                      LEFT JOIN folder ON (themen_termine.issue_id = folder.range_id)\n                      WHERE termine.range_id = ? AND folder.folder_id IS NULL\n                      ORDER BY termine.date, name";
         $statement = DBManager::get()->prepare($query);
         $statement->execute(array($id));
         $statement->setFetchMode(PDO::FETCH_ASSOC);
         foreach ($statement as $row) {
             if ($row['name']) {
                 continue;
             }
             $name = sprintf(_('Ordner für %s [%s]'), date('d.m.Y', $row['date']), $GLOBALS['TERMIN_TYP'][$row['date_typ']]['name']);
             if ($row['issue_id']) {
                 if (!$issues[$row['issue_id']]) {
                     $issues[$row['issue_id']] = new Issue(array('issue_id' => $row['issue_id']));
                 }
                 $name .= ', ' . my_substr($issues[$row['issue_id']]->toString(), 0, 20);
                 $option_id = $row['issue_id'];
             } else {
                 $option_id = $row['termin_id'];
             }
             $options[$option_id] = $name;
         }
     }
     $this->options = $options;
     $this->id = $id;
 }
开发者ID:ratbird,项目名称:hope,代码行数:51,代码来源:folder.php


示例3: google_seo_meta_description

/**
 * Clean up a description and append it to google_seo_meta.
 *
 * @param string The unfiltered description that should be used.
 */
function google_seo_meta_description($description)
{
    global $settings, $plugins, $google_seo_meta;
    if ($settings['google_seo_meta_length'] > 0) {
        $description = strip_tags($description);
        $description = str_replace("&nbsp;", " ", $description);
        $description = preg_replace("/\\[[^\\]]+\\]/u", "", $description);
        $description = preg_replace("/\\s+/u", " ", $description);
        $description = trim($description);
        $description = my_substr($description, 0, $settings['google_seo_meta_length'], true);
        $description = trim($description);
        if ($description) {
            $plugins->add_hook('pre_output_page', 'google_seo_meta_output');
            $google_seo_meta = "<meta name=\"description\" content=\"{$description}\" />\n{$google_seo_meta}";
        }
    }
}
开发者ID:learnix-xx,项目名称:MyBB-Google-SEO,代码行数:22,代码来源:meta.php


示例4: build_profile_link

     $memban['adminuser'] = build_profile_link($memban['adminuser'], $memban['admin']);
     // Display a nice warning to the user
     eval('$bannedbit = "' . $templates->get('member_profile_banned') . '";');
 }
 $adminoptions = '';
 if ($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1) {
     eval("\$adminoptions = \"" . $templates->get("member_profile_adminoptions") . "\";");
 }
 $modoptions = $viewnotes = $editnotes = $editprofile = $banuser = $manageuser = '';
 $can_purge_spammer = purgespammer_show($memprofile['postnum'], $memprofile['usergroup'], $memprofile['uid']);
 if ($mybb->usergroup['canmodcp'] == 1 || $can_purge_spammer) {
     $memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));
     if (!empty($memprofile['usernotes'])) {
         if (strlen($memprofile['usernotes']) > 100) {
             eval("\$viewnotes = \"" . $templates->get("member_profile_modoptions_viewnotes") . "\";");
             $memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100) . "... {$viewnotes}";
         }
     } else {
         $memprofile['usernotes'] = $lang->no_usernotes;
     }
     if ($mybb->usergroup['caneditprofiles'] == 1) {
         eval("\$editprofile = \"" . $templates->get("member_profile_modoptions_editprofile") . "\";");
         eval("\$editnotes = \"" . $templates->get("member_profile_modoptions_editnotes") . "\";");
     }
     if ($mybb->usergroup['canbanusers'] == 1 && (!$memban['uid'] || $memban['uid'] && $mybb->user['uid'] == $memban['admin'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)) {
         eval("\$banuser = \"" . $templates->get("member_profile_modoptions_banuser") . "\";");
     }
     if ($can_purge_spammer) {
         eval("\$purgespammer = \"" . $templates->get('member_profile_modoptions_purgespammer') . "\";");
     }
     if (!empty($editprofile) || !empty($banuser) || !empty($purgespammer)) {
开发者ID:nicopinto,项目名称:fantasitura.com,代码行数:31,代码来源:member.php


示例5: getSearchResults

    <tr>
        <td valign="top">

    <?
        $search_exp = Request::get('search_exp');
        if ($search_exp):
            $users = getSearchResults(trim($search_exp), $range_id, 'sem');
            if ($users): ?>
                <select name="searchPersons[]" size="5" multiple style="width: 90%;">
                <? if (is_array($users)) foreach ($users as $user) : ?>
                    <option value="<?php 
echo htmlReady($user['username']);
?>
">
                        <?php 
echo htmlReady(my_substr($user['fullname'], 0, 35));
?>
 (<?php 
echo $user['username'];
?>
), <?php 
echo $user['perms'];
?>
                    </option>
                <? endforeach; ?>
                </select>
                <?php 
echo Icon::create('refresh', ['title' => _('Personen suchen')])->asInput(['valign' => 'bottom', 'name' => 'search', 'value' => _('Personen suchen')]);
?>
                <br>
            <? else : // no users there ?>
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:sem_available_users.php


示例6: get_user

     }
 }
 $loginhandler->set_data(array('username' => $mybb->input['username'], 'password' => $mybb->input['password']));
 if ($loginhandler->validate_login() == true) {
     $mybb->user = get_user($loginhandler->login_data['uid']);
 }
 if ($mybb->user['uid']) {
     if (login_attempt_check_acp($mybb->user['uid']) == true) {
         log_admin_action(array('type' => 'admin_locked_out', 'uid' => (int) $mybb->user['uid'], 'username' => $mybb->user['username']));
         $default_page->show_lockedout();
     }
     $db->delete_query("adminsessions", "uid='{$mybb->user['uid']}'");
     $sid = md5(uniqid(microtime(true), true));
     $useragent = $_SERVER['HTTP_USER_AGENT'];
     if (my_strlen($useragent) > 200) {
         $useragent = my_substr($useragent, 0, 200);
     }
     // Create a new admin session for this user
     $admin_session = array("sid" => $sid, "uid" => $mybb->user['uid'], "loginkey" => $mybb->user['loginkey'], "ip" => $db->escape_binary(my_inet_pton(get_ip())), "dateline" => TIME_NOW, "lastactive" => TIME_NOW, "data" => my_serialize(array()), "useragent" => $db->escape_string($useragent));
     $db->insert_query("adminsessions", $admin_session);
     $admin_session['data'] = array();
     // Only reset the loginattempts when we're really logged in and the user doesn't need to enter a 2fa code
     $query = $db->simple_select("adminoptions", "authsecret", "uid='{$mybb->user['uid']}'");
     $admin_options = $db->fetch_array($query);
     if (empty($admin_options['authsecret'])) {
         $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'");
     }
     my_setcookie("adminsid", $sid, '', true);
     my_setcookie('acploginattempts', 0);
     $post_verify = false;
     $mybb->request_method = "get";
开发者ID:styv300,项目名称:ToRepublic2.5,代码行数:31,代码来源:index.php


示例7: eval

             eval("\$latest_post = \"" . $templates->get("modcp_awaitingmoderation_none") . "\";");
         }
         eval("\$awaitingposts = \"" . $templates->get("modcp_awaitingposts") . "\";");
     }
     if ($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1) {
         $query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible='0' {$flist_queue_threads}");
         $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
         if ($unapproved_threads > 0) {
             $query = $db->simple_select("threads", "tid, subject, uid, username, dateline", "visible='0' {$flist_queue_threads}", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => 1));
             $thread = $db->fetch_array($query);
             $thread['date'] = my_date('relative', $thread['dateline']);
             $thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
             $thread['link'] = get_thread_link($thread['tid']);
             $thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']);
             if (my_strlen($thread['subject']) > 25) {
                 $post['subject'] = my_substr($thread['subject'], 0, 25) . "...";
             }
             $thread['subject'] = htmlspecialchars_uni($thread['subject']);
             $thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
             $unapproved_threads = my_number_format($unapproved_threads);
             eval("\$latest_thread = \"" . $templates->get("modcp_lastthread") . "\";");
         } else {
             eval("\$latest_thread = \"" . $templates->get("modcp_awaitingmoderation_none") . "\";");
         }
         eval("\$awaitingthreads = \"" . $templates->get("modcp_awaitingthreads") . "\";");
     }
     if (!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads)) {
         eval("\$awaitingmoderation = \"" . $templates->get("modcp_awaitingmoderation") . "\";");
     }
 }
 $latestfivemodactions = '';
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:modcp.php


示例8: if

echo $institute_id;
?>
"
                            <? if ($institute_id == $resObject->getInstitutId()) echo 'selected'; ?>>
                        <?php 
echo htmlReady(my_substr($faculty['Name'], 0, 50));
?>
                    </option>
                    <? foreach ($faculty['institutes'] as $institute_id => $name): ?>
                        <option style="padding-left: 1.5em;" value="<?php 
echo $institute_id;
?>
"
                                <? if ($institute_id == $resObject->getInstitutId()) echo 'selected'; ?>>
                            <?php 
echo htmlReady(my_substr($name, 0, 50));
?>
                        </option>
                    <? endforeach; ?>
                <? endforeach; ?>
                </select>
            <? else : ?>
                <?php 
echo MessageBox::info(_('Sie können die Einordnung in die Orga-Struktur nicht ändern.'));
?>
            <? endif; ?>
            </td>
        </tr>
    <? endif; ?>
<? if ($resObject->getCategoryId()) : ?>
    <? foreach ($EditResourceData->selectProperties() as $property): ?>
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:show_properties_forms.php


示例9: foreach

foreach ($faculties as $faculty) {
    $export_pagecontent .= "<option style=\"font-weight:bold;\" ";

    if ($range_id == $faculty['fakultaets_id']) {
        $export_pagecontent .= " selected";
    }

    $export_pagecontent .= " value=\"" . $faculty['Institut_id'] . "\">" . htmlReady(my_substr($faculty['Name'], 0, 60)) . "</option>";

    $inst_statement->execute(array($faculty['Institut_id']));
    while ($institute = $inst_statement->fetch(PDO::FETCH_ASSOC)) {
        $export_pagecontent .= sprintf("<option value=\"%s\"", $institute['Institut_id']);
        if ($range_id == $institute['Institut_id'] && $range_id != $faculty['Institut_id']) {
            $export_pagecontent .= " selected";
        }
        $export_pagecontent .= sprintf(">&nbsp;&nbsp;&nbsp;&nbsp;%s </option>\n", htmlReady(my_substr($institute['Name'], 0, 60)));
    }
    $inst_statement->closeCursor();
}

if ($perm->have_perm("root")) {
    $export_pagecontent .= "<option style=\"font-weight:bold;\" value=\"root\">Alle Einrichtungen";
}

$export_pagecontent .= "</select><br><br>";

$export_pagecontent .= "<b>"._("Art der auszugebenden Daten: ") .  "</b><br><select name=\"ex_type\">";

$export_pagecontent .= "<option";
if ($ex_type=="veranstaltung")
    $export_pagecontent .= " selected";
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:export_start.inc.php


示例10: error

        error($lang->no_attachments_selected);
    }
    $aids = implode(',', array_map('intval', $mybb->input['attachments']));
    $query = $db->simple_select("attachments", "*", "aid IN ({$aids}) AND uid='" . $mybb->user['uid'] . "'");
    while ($attachment = $db->fetch_array($query)) {
        remove_attachment($attachment['pid'], '', $attachment['aid']);
    }
    $plugins->run_hooks("usercp_do_attachments_end");
    redirect("usercp.php?action=attachments", $lang->attachments_deleted);
}
if ($mybb->input['action'] == "do_notepad" && $mybb->request_method == "post") {
    // Verify incoming POST request
    verify_post_check($mybb->get_input('my_post_key'));
    // Cap at 60,000 chars; text will allow up to 65535?
    if (my_strlen($mybb->get_input('notepad')) > 60000) {
        $mybb->input['notepad'] = my_substr($mybb->get_input('notepad'), 0, 60000);
    }
    $plugins->run_hooks("usercp_do_notepad_start");
    $db->update_query("users", array('notepad' => $db->escape_string($mybb->get_input('notepad'))), "uid='" . $mybb->user['uid'] . "'");
    $plugins->run_hooks("usercp_do_notepad_end");
    redirect("usercp.php", $lang->redirect_notepadupdated);
}
if (!$mybb->input['action']) {
    // Get posts per day
    $daysreg = (TIME_NOW - $mybb->user['regdate']) / (24 * 3600);
    if ($daysreg < 1) {
        $daysreg = 1;
    }
    $perday = $mybb->user['postnum'] / $daysreg;
    $perday = round($perday, 2);
    if ($perday > $mybb->user['postnum']) {
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:usercp.php


示例11: process_short_content

function process_short_content($post_text, $parser = null, $length = 200)
{
    global $parser, $mybb;
    require_once MYBB_ROOT . $mybb->settings['tapatalk_directory'] . '/emoji/emoji.class.php';
    $post_text = tapatalkEmoji::covertNameToEmpty($post_text);
    if ($parser === null) {
        require_once MYBB_ROOT . "inc/class_parser.php";
        $parser = new postParser();
    }
    $array_reg = array(array('reg' => '/\\[color=(.*?)\\](.*?)\\[\\/color\\]/sei', 'replace' => "mobi_color_convert('\$1','\$2' ,false)"), array('reg' => '/\\[php\\](.*?)\\[\\/php\\]/si', 'replace' => '[php]'), array('reg' => '/\\[align=(.*?)\\](.*?)\\[\\/align\\]/si', replace => " \$2 "), array('reg' => '/\\[email\\](.*?)\\[\\/email\\]/si', replace => "[url]"), array('reg' => '/\\[quote(.*?)\\](.*?)\\[\\/quote\\]/si', 'replace' => '[quote]'), array('reg' => '/\\[code\\](.*?)\\[\\/code\\]/si', 'replace' => ''), array('reg' => '/\\[url=(.*?)\\](.*?)\\[\\/url\\]/sei', 'replace' => "mobi_url_convert('\$1','\$2')"), array('reg' => '/\\[img(.*?)\\](.*?)\\[\\/img\\]/si', 'replace' => '[img]'), array('reg' => '/\\[video=(.*?)\\](.*?)\\[\\/video\\]/si', 'replace' => '[V]'), array('reg' => '/\\[attachment=(.*?)\\]/si', 'replace' => '[attach]'));
    foreach ($array_reg as $arr) {
        $post_text = preg_replace($arr['reg'], $arr['replace'], $post_text);
    }
    //$post_text = tt_covert_list($post_text, '/\[list=1\](.*?)\[\/list\]/si', '2');
    //$post_text = tt_covert_list($post_text, '/\[list\](.*?)\[\/list\]/si', '1');
    $parser_options = array('allow_html' => 0, 'allow_mycode' => 1, 'allow_smilies' => 0, 'allow_imgcode' => 0, 'filter_badwords' => 1);
    $post_text = strip_tags($parser->parse_message($post_text, $parser_options));
    $post_text = preg_replace('/\\s+/', ' ', $post_text);
    $post_text = html_entity_decode($post_text);
    if (my_strlen($post_text) > $length) {
        $post_text = my_substr(trim($post_text), 0, $length);
    }
    return $post_text;
}
开发者ID:dthiago,项目名称:tapatalk-mybb,代码行数:24,代码来源:mobiquo_common.php


示例12: build_forumbits


//.........这里部分代码省略.........
                        // Fetch the template and append it to the list
                        eval("\$forum_list .= \"" . $templates->get("forumbit_depth3", 1, 0) . "\";");
                        $comma = ', ';
                    }
                    // Have we reached our max visible subforums? put a nice message and break out of the loop
                    ++$donecount;
                    if ($donecount == $mybb->settings['subforumsindex']) {
                        if (subforums_count($fcache[$pid]) > $donecount) {
                            $forum_list .= $comma . $lang->sprintf($lang->more_subforums, subforums_count($fcache[$pid]) - $donecount);
                        }
                    }
                    continue;
                }
            }
            // Forum is a category, set template type
            if ($forum['type'] == 'c') {
                $forumcat = '_cat';
            } else {
                $forumcat = '_forum';
            }
            if ($forum['linkto'] == '') {
                // No posts have been made in this forum - show never text
                if (($lastpost_data['lastpost'] == 0 || $lastpost_data['lastposter'] == '') && $hideinfo != true) {
                    $lastpost = "<div style=\"text-align: center;\">{$lang->lastpost_never}</div>";
                } elseif ($hideinfo != true) {
                    // Format lastpost date and time
                    $lastpost_date = my_date($mybb->settings['dateformat'], $lastpost_data['lastpost']);
                    $lastpost_time = my_date($mybb->settings['timeformat'], $lastpost_data['lastpost']);
                    // Set up the last poster, last post thread id, last post subject and format appropriately
                    $lastpost_profilelink = build_profile_link($lastpost_data['lastposter'], $lastpost_data['lastposteruid']);
                    $lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");
                    $lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
                    if (my_strlen($lastpost_subject) > 25) {
                        $lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
                    }
                    $lastpost_subject = htmlspecialchars_uni($lastpost_subject);
                    $full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);
                    // Call lastpost template
                    if ($depth != 1) {
                        eval("\$lastpost = \"" . $templates->get("forumbit_depth{$depth}_forum_lastpost") . "\";");
                    }
                }
                if ($mybb->settings['showforumviewing'] != 0 && $forum['viewers'] > 0) {
                    if ($forum['viewers'] == 1) {
                        $forum_viewers_text = $lang->viewing_one;
                    } else {
                        $forum_viewers_text = $lang->sprintf($lang->viewing_multiple, $forum['viewers']);
                    }
                    $forum_viewers_text_plain = $forum_viewers_text;
                    $forum_viewers_text = "<span class=\"smalltext\">{$forum_viewers_text}</span>";
                }
            }
            // If this forum is a link or is password protected and the user isn't authenticated, set lastpost and counters to "-"
            if ($forum['linkto'] != '' || $hideinfo == true) {
                $lastpost = "<div style=\"text-align: center;\">-</div>";
                $posts = "-";
                $threads = "-";
            } else {
                $posts = my_number_format($forum['posts']);
                $threads = my_number_format($forum['threads']);
            }
            // Moderator column is not off
            if ($mybb->settings['modlist'] != 0) {
                $done_moderators = array();
                $moderators = '';
                // Fetch list of moderators from this forum and its parents
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:67,代码来源:functions_forumlist.php


示例13: create_session

 /**
  * Create a new session.
  *
  * @param int The user id to bind the session to.
  */
 function create_session($uid = 0)
 {
     global $db;
     $speciallocs = $this->get_special_locations();
     // If there is a proper uid, delete by uid.
     if ($uid > 0) {
         $db->delete_query("sessions", "uid='{$uid}'");
         $onlinedata['uid'] = $uid;
     } else {
         if ($this->is_spider == true) {
             $db->delete_query("sessions", "sid='{$this->sid}'");
         } else {
             $db->delete_query("sessions", "ip=" . $db->escape_binary($this->packedip));
             $onlinedata['uid'] = 0;
         }
     }
     // If the user is a search enginge spider, ...
     if ($this->is_spider == true) {
         $onlinedata['sid'] = $this->sid;
     } else {
         $onlinedata['sid'] = md5(uniqid(microtime(true), true));
     }
     $onlinedata['time'] = TIME_NOW;
     $onlinedata['ip'] = $db->escape_binary($this->packedip);
     $onlinedata['location'] = $db->escape_string(substr(get_current_location(), 0, 150));
     $onlinedata['useragent'] = $db->escape_string(my_substr($this->useragent, 0, 100));
     $onlinedata['location1'] = (int) $speciallocs['1'];
     $onlinedata['location2'] = (int) $speciallocs['2'];
     $onlinedata['nopermission'] = 0;
     $db->replace_query("sessions", $onlinedata, "sid", false);
     $this->sid = $onlinedata['sid'];
     $this->uid = $onlinedata['uid'];
 }
开发者ID:olada,项目名称:mybbintegrator,代码行数:38,代码来源:class_session.php


示例14: foreach

    foreach ($message as $key => $v) {
        ?>
<span class="message_box">
            <div class="row">
                <div class="col-xs-9">
                    <a class="read_message" message_id="<?php 
        echo $v["message_id"];
        ?>
" target="_blank" href="<?php 
        echo U('Comment/index', array('post_id' => $v['post_id']));
        ?>
"><?php 
        echo $v["send_user"]["username"];
        ?>
:<?php 
        echo my_substr(strip_tags(htmlspecialchars_decode($v['body'])), 100);
        ?>
</a>
                </div>
                <div class="col-xs-1">
                    <?php 
        if (!$v['is_read']) {
            ?>
<a class="read_message" message_id="<?php 
            echo $v["message_id"];
            ?>
" target="_blank" href="<?php 
            echo U('Comment/index', array('post_id' => $v['post_id']));
            ?>
"><span message_id="<?php 
            echo $v["message_id"];
开发者ID:luojiangtao,项目名称:putishui,代码行数:31,代码来源:f3d8b71d7fc26eed1694113ad5b2d525.php


示例15: foreach

        <? foreach ($members as $member): ?>
            <tr>
                <td class="gruppe<?php 
echo $seminars[$member['seminar_id']]['gruppe'];
?>
">&nbsp;</td>
                <td>
                    <a href="<?php 
echo URLHelper::getLink('seminar_main.php', array('auswahl' => $member['seminar_id']));
?>
">
                        <?php 
echo Config::get()->IMPORTANT_SEMNUMBER ? htmlReady($seminars[$member['seminar_id']]['sem_nr']) : '';
?>
                        <?php 
echo htmlReady(my_substr($seminars[$member['seminar_id']]['name'], 0, 70));
?>
                    </a>
                <? if (!$seminars[$member['seminar_id']]['visible']): ?>
                    <?php 
echo _('(versteckt)');
?>
                <? endif; ?>
                    <input type="hidden" name="m_checked[<?php 
echo $member['seminar_id'];
?>
][33]" value="0">
                </td>
            <? foreach (array_values($modules) as $index => $data): ?>
                <td>
                    <input type="checkbox" name="m_checked[<?php 
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:notification.php


示例16: echo

">
    <?php 
echo $method == 'post' ? CSRFProtection::tokenTag() : '';
?>
    <select class="sidebar-selectlist" size="<?php 
echo (int) $size ?: 8;
?>
" name="<?php 
echo htmlReady($name);
?>
" onKeyDown="if (event.keyCode === 13) { jQuery(this).closest('form')[0].submit(); }" <?php 
echo $size == 1 ? 'onchange' : 'onClick';
?>
="jQuery(this).closest('form')[0].submit();" size="10" style="max-width: 200px;cursor:pointer" class="text-top" aria-label="<?php 
echo _("Wählen Sie ein Objekt aus. Sie gelangen dann zur neuen Seite.");
?>
">
    <? foreach ($elements as $element): ?>
        <option <?php 
echo $value == $element->getid() ? 'selected' : '';
?>
 value="<?php 
echo htmlReady($element->getid());
?>
"><?php 
echo htmlReady(my_substr($element->getLabel(), 0, 30));
?>
</option>
    <? endforeach; ?>
    </select>
</form>
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:selector-widget.php


示例17: iriDomain

function iriDomain($ip)
{
    $host = gethostbyaddr($ip);
    if (ereg('^([0-9]{1,3}\\.){3}[0-9]{1,3}$', $host)) {
        return "";
    } else {
        return my_substr(strrchr($host, "."), 1);
    }
}
开发者ID:jojospaghettio,项目名称:wicketpixie,代码行数:9,代码来源:statpress.php


示例18: luc_hdate

function luc_hdate($dt = "00000000")
{
    return mysql2date(get_option('date_format'), my_substr($dt, 0, 4) . "-" . my_substr($dt, 4, 2) . "-" . my_substr($dt, 6, 2));
}
开发者ID:dtekcth,项目名称:dns,代码行数:4,代码来源:statpress.php


示例19: fetch_wol_activity

/**
 * Fetch a users activity and any corresponding details from their location.
 *
 * @param string The location (URL) of the user.
 * @return array Array of location and activity information
 */
function fetch_wol_activity($location, $nopermission = false)
{
    global $uid_list, $aid_list, $pid_list, $tid_list, $fid_list, $ann_list, $eid_list, $plugins, $user, $parameters;
    $user_activity = array();
    $split_loc = explode(".php", $location);
    if (isset($user['location']) && $split_loc[0] == $user['location']) {
        $filename = '';
    } else {
        $filename = my_substr($split_loc[0], -my_strpos(strrev($split_loc[0]), "/"));
    }
    $parameters = array();
    if ($split_loc[1]) {
        $temp = explode("&amp;", my_substr($split_loc[1], 1));
        foreach ($temp as $param) {
            $temp2 = explode("=", $param, 2);
            if (isset($temp2[1])) {
                $parameters[$temp2[0]] = $temp2[1];
            }
        }
    }
    if ($nopermission) {
        $filename = "nopermission";
    }
    switch ($filename) {
        case "announcements":
            if (!isset($parameters['aid'])) {
                $parameters['aid'] = 0;
            }
            $parameters['aid'] = (int) $parameters['aid'];
            if ($parameters['aid'] > 0) {
                $ann_list[$parameters['aid']] = $parameters['aid'];
            }
            $user_activity['activity'] = "announcements";
            $user_activity['ann'] = $parameters['aid'];
            break;
        case "attachment":
            if (!isset($parameters['aid'])) {
                $parameters['aid'] = 0;
            }
            $parameters['aid'] = (int) $parameters['aid'];
            if ($parameters['aid'] > 0) {
                $aid_list[] = $parameters['aid'];
            }
            $user_activity['activity'] = "attachment";
            $user_activity['aid'] = $parameters['aid'];
            break;
        case "calendar":
            if (!isset($parameters['action'])) {
                $parameters['action'] = '';
            }
            if ($parameters['action'] == "event") {
                if (!isset($parameters['eid'])) {
                    $parameters['eid'] = 0;
                }
                $parameters['eid'] = (int) $parameters['eid'];
                if ($parameters['eid'] > 0) {
                    $eid_list[$parameters['eid']] = $parameters['eid'];
                }
                $user_activity['activity'] = "calendar_event";
                $user_activity['eid'] = $parameters['eid'];
            } elseif ($parameters['action'] == "addevent" || $parameters['action'] == "do_addevent") {
                $user_activity['activity'] = "calendar_addevent";
            } elseif ($parameters['action'] == "editevent" || $parameters['action'] == "do_editevent") {
                $user_activity['activity'] = "calendar_editevent";
            } else {
                $user_activity['activity'] = "calendar";
            }
            break;
        case "contact":
            $user_activity['activity'] = "contact";
            break;
        case "editpost":
            $user_activity['activity'] = "editpost";
            break;
        case "forumdisplay":
            if (!isset($parameters['fid'])) {
                $parameters['fid'] = 0;
            }
            $parameters['fid'] = (int) $parameters['fid'];
            if ($parameters['fid'] > 0) {
                $fid_list[$parameters['fid']] = $parameters['fid'];
            }
            $user_activity['activity'] = "forumdisplay";
            $user_activity['fid'] = $parameters['fid'];
            break;
        case "index":
        case '':
            $user_activity['activity'] = "index";
            break;
        case "managegroup":
            $user_activity['activity'] = "managegroup";
            break;
        case "member":
            if (!isset($parameters['action'])) {
//.........这里部分代码省略.........
开发者ID:olada,项目名称:mybbintegrator,代码行数:101,代码来源:functions_online.php


示例20: getItemHead

 /**
 * creates the items head
 *
 * @access  private
 * @param   string   $itemID the current item
 * @return  string   the item head (html)
 */
 function getItemHead($itemID)
 {
     $mode = $this->getInstance($itemID);
     if ($this->itemID == $itemID) {
         #       $group = new EvaluationGroup($itemID);
         $head = "&nbsp;";
         if ($this->tree->tree_data[$itemID]['name'] == "" && $mode == QUESTION_BLOCK) {
             $head .= NO_QUESTION_GROUP_TITLE;
         } else {
             $head .= htmlready(my_substr($this->tree->tree_data[$itemID]['name'], 0, 60));
         }
     } else {
         if ($mode == QUESTION_BLOCK) {
             $group =& $this->tree->getGroupObject($itemID);
             $templateID = $group->getTemplateID();
             if ($templateID) {
                 $template = new EvaluationQuestion($templateID);
                 $templateTitle = htmlReady($template->getText());
             } else {
                 $templateTitle = NO_TEMPLATE_GROUP;
             }
             if ($templateTitle == "") {
                 $templateTitle = NO_TEMPLATE;
             }
             $template = "   </td>\n" . "   <td align=\"right\" valign=\"bottom\" " . "class=\"printhead\" nowrap=\"nowrap\">\n" . "<b>" . _("Vorlage") . ": " . $templateTitle . "</b>&nbsp;";
         }
         $head = "&nbsp;<a class=\"tree\" href=\"" . URLHelper::getLink($this->getSelf("itemID={$itemID}", false)) . "\"" . tooltip(_("Diesen Block öffnen"), true) . ">";
         if ($this->tree->tree_data[$itemID]['name'] == "" && $mode == QUESTION_BLOCK) {
             $head .= NO_QUESTION_GROUP_TITLE;
         } else {
             $head .= htmlready(my_substr($this->tree->tree_data[$itemID]['name'], 0, 60));
         }
         $head .= "</a>";
         if ($template) {
             $head .= $template;
         }
     }
     if ($itemID == ROOT_BLOCK) {
         $itemID2 = $this->evalID;
     } else {
         $itemID2 = $itemID;
     }
     // the "verschiebäfinger"
     if ($this->moveItemID && $this->tree->tree_data[$itemID]['parent_id'] != $this->moveItemID && ($mode == ARRANGMENT_BLOCK || $itemID == ROOT_BLOCK) && $this->moveItemID != $itemID2) {
         $parentID = $this->tree->tree_data[$itemID]['parent_id'];
         if (!$parentID) {
             $parentID = ROOT_BLOCK;
         }
         while ($parentID != ROOT_BLOCK && $parentID != $this->moveItemID) {
             $parentID = $this->tree->tree_data[$parentID]['parent_id'];
             if ($parentID == $this->moveItemID) {
                 $moveItemIsParent = 1;
             }
         }
         $moveItem = "   </td>\n" . "   <td align=\"right\" valign=\"middle\" class=\"printhead\" nowrap=\"nowrap\">\n" . $this->createLinkImage(EVAL_PIC_MOVE_GROUP, _("Den ausgwählten Block in diesen Block verschieben"), "&itemID={$itemID}&cmd=MoveGroup", NO, NULL, NO) . "&nbsp;";
     }
     if ($moveItem && !$moveItemIsParent) {
         $move_mode = $this->getInstance($this->moveItemID);
         if ($mode == ARRANGMENT_BLOCK) {
             $group =& $this->tree->getGroupObject($itemID);
             if ($children = $group->getChildren()) {
                 if ($this->getInstance($children[0]->getObjectID()) == ARRANGM 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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