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


PHP block函数代码示例

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


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

示例1: textile

 function textile($text, $lite = '')
 {
     if (get_magic_quotes_gpc() == 1) {
         $text = stripslashes($text);
     }
     $text = incomingEntities($text);
     $text = encodeEntities($text);
     $text = fixEntities($text);
     $text = cleanWhiteSpace($text);
     $text = getRefs($text);
     $text = noTextile($text);
     $text = image($text);
     $text = links($text);
     $text = span($text);
     $text = superscript($text);
     $text = footnoteRef($text);
     $text = code($text);
     $text = glyphs($text);
     $text = retrieve($text);
     if ($lite == '') {
         $text = lists($text);
         $text = table($text);
         $text = block($text);
     }
     /* clean up <notextile> */
     $text = preg_replace('/<\\/?notextile>/', "", $text);
     /* turn the temp char back to an ampersand entity */
     $text = str_replace("x%x%", "&amp;", $text);
     $text = str_replace("<br />", "<br />\n", $text);
     return trim($text);
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:textile2.php

示例2: textProcess

/**
 * Text processing functions
 * @author edited by Peng Wang <peng@pengxwang.com>
 * @author Dean Allen <http://www.textpattern.com>
 * @version 1.1
 * @package Indexhibit
 **/
function textProcess($text = '', $override)
{
    if ($text !== '') {
        return $override == 1 ? block($text) : $text;
    } else {
        return;
    }
}
开发者ID:WurdahMekanik,项目名称:hlf-ndxz,代码行数:15,代码来源:textprocess.php

示例3: get_dashboard

/**
 * Main function to create the parameters passed to the view.
 *
 * @return array
 */
function get_dashboard()
{
    global $privileges;
    require_once realpath(__DIR__ . '/../controller/api.php');
    $shifts = getAllUpcomingShifts();
    $viewData = array('number_upcoming_shifts' => block(array('description' => _("Angels needed in the next 3 hrs"), 'number' => countUpcomingNeededAngels($shifts, 3 * 60 * 60)), BLOCK_TYPE_COUNTER), 'number_upcoming_night_shifts' => block(array('description' => _("Angels needed for night shifts"), 'number' => getNumberUpcomingNightShifts()), BLOCK_TYPE_COUNTER), 'number_currently_working' => block(array('description' => _("Angels currently working"), 'number' => getCurrentlyWorkingAngels()), BLOCK_TYPE_COUNTER), 'number_hours_worked' => block(array('description' => _("Hours to be worked"), 'number' => countHoursToBeWorked($shifts)), BLOCK_TYPE_COUNTER), 'my_next_jobs' => in_array('user_shifts', $privileges) ? block(array('title' => _("My next jobs"), 'body' => getUsersNextJobs($shifts, 3 * 60 * 60)), BLOCK_TYPE_PANEL) : '', 'jobs_currently_running' => block(array('title' => _("Currently running"), 'body' => getListCurrentShifts($shifts)), BLOCK_TYPE_PANEL), 'jobs_now' => block(array('title' => _("Within the next hour"), 'body' => getListUpcomingShifts($shifts, 60 * 60)), BLOCK_TYPE_PANEL), 'jobs_soon' => block(array('title' => _("Within the next 3 hours"), 'body' => getListUpcomingShifts($shifts, 3 * 60 * 60)), BLOCK_TYPE_PANEL), 'news' => block(array('title' => _("News"), 'body' => getAllNewsList()), BLOCK_TYPE_PANEL), 'api_shifts_link' => api_link('shifts'));
    return dashboardView($viewData);
}
开发者ID:kekru,项目名称:engelsystem,代码行数:13,代码来源:dashboard.php

示例4: crafting_common

function crafting_common($cache_name, $texture, $params, $positions, $size_factor)
{
    global $im, $final_size_x, $final_size_y, $set_404, $cache_final_image, $final_image_modid, $final_image_type, $final_image_item, $final_image_size;
    list($final_size_x, $final_size_y) = getimagesize($texture);
    $final_size_x *= $size_factor;
    $final_size_y *= $size_factor;
    $im = image_from_cache("minecraft", "crafting", $cache_name, $size_factor * 16);
    if ($im === null) {
        $images = array();
        foreach ($params as $image) {
            $images[] = block(array($image));
        }
        $im = render_crafting($texture, $images, $positions);
        cache_image("minecraft", "crafting", $cache_name, $im, "base");
    }
    $set_404 = false;
    $cache_final_image = true;
    $final_image_modid = "minecraft";
    $final_image_type = "crafting";
    $final_image_item = $cache_name;
    $final_image_size = $size_factor * 16;
}
开发者ID:mcenderdragon,项目名称:Icon-Craft,代码行数:22,代码来源:render.php

示例5: block

                    </tr>
                </table>

            </td>
        </tr>
    </table>
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr height="1px">
            <td width="100%" valign="top">
<?php 
$searchword = $_GET[searchword];
if ($searchword == "" || $searchword == "поиск...") {
    echo "Введите запрос для поиска";
} else {
    if ($where != "") {
        echo block($sqlQuery, "search_item", "", "", 20, "Поиск по запросу <b>\"" . $searchword . "\"</b> не дал результатов.");
    }
}
?>
            </td>
        </tr>
        <tr height="30px">
            <td width="100%">
            </td>
        </tr>
    </table>

    <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr height="1px">
            <td width="100%" style="padding-top:10px;padding-bottom:30px;">
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
开发者ID:pioytazsko,项目名称:drell,代码行数:31,代码来源:_new_center_search.php

示例6: block

<?php

//$data = pt_view();
include block("admin/block/template/blank");
开发者ID:houlonglong,项目名称:easytee-me,代码行数:4,代码来源:detail.php

示例7: foreach

<div class="t_list_9">
            	<h4>相关推荐</h4>
                <div class="t_list_19" id="ad_box_3">加载中...</div>
            </div>
        </div>
    	<div class="t_box_5">
            <div class="t_list_21">
            <h4>网站地图</h4>
            <dl>
<?php 
if (is_array($channels['menus'])) {
    foreach ($channels['menus'] as $key => $value) {
        if ($key == 'news' || $value['upnameid'] == 'news') {
            ?>
<!--资讯根分类 开始--><?php 
            block("category", "type/{$key}/isroot/1/limit/0,100/order/c.displayorder/cachetime/10800/cachename/category");
            ?>
<dt><a href="<?php 
            echo $value['url'];
            ?>
"><?php 
            echo $value['name'];
            ?>
</a></dt>
<dd>
<?php 
            if (is_array($_SBLOCK['category'])) {
                foreach ($_SBLOCK['category'] as $value) {
                    ?>
<a href="<?php 
                    echo $value['url'];
开发者ID:hongz1125,项目名称:devil,代码行数:31,代码来源:tpl_tobo20130125_site_map.php

示例8: block

                                    </tbody>
                                </table>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
    <!-- Footer-->
    <?php 
include block("user/block/footer");
?>
    <script src="/resources/public/js/region_select.js"></script>

    <div class="modal fade" id="model_address" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="color-line"></div>
                <div class="modal-header text-center">
                    <h4 class="modal-title">收货地址</h4>
                </div>
                <div class="modal-body">

                    <form method="get" onsubmit="return false;" class="form-horizontal">

                            <div class="row">
开发者ID:houlonglong,项目名称:easytee-me,代码行数:30,代码来源:address.php

示例9: geturl

    echo geturl("uid/{$_GET['uid']}/op/bbs");
    ?>
">论坛</a>
<?php 
}
?>
</div>
<?php 
if ($_GET['op'] == 'uchblog' && uchome_exists() && !in_array('uchblog', $_SCONFIG['closechannels'])) {
    block("uchblog", "uid/{$_GET['uid']}/order/dateline DESC/perpage/20/cachetime/3600/showdetail/1/messagelen/200/messagedot/1/cachename/infobody");
} elseif ($_GET['op'] == 'uchphoto' && uchome_exists() && !in_array('uchphoto', $_SCONFIG['closechannels'])) {
    block("uchphoto", "uid/{$_GET['uid']}/order/updatetime DESC/perpage/6/subjectlen/30/messagedot/0/cachetime/3600/cachename/infobody");
} elseif ($_GET['op'] == 'bbs' && discuz_exists() && !in_array('bbs', $_SCONFIG['closechannels'])) {
    block("bbsthread", "authorid/{$_GET['uid']}/order/dateline DESC/perpage/20/cachetime/3600/showdetail/1/messagelen/200/messagedot/1/cachename/infobody");
} else {
    block("spacenews", "uid/{$_GET['uid']}/order/i.dateline DESC/perpage/20/cachetime/3600/showdetail/1/messagelen/200/messagedot/1/cachename/infobody");
}
?>

<?php 
if ($_GET['op'] == 'uchphoto') {
    ?>
<div class="global_module user_photolist">
<div class="clearfix">
<?php 
    if (is_array($_SBLOCK['infobody'])) {
        foreach ($_SBLOCK['infobody'] as $key => $value) {
            ?>
<dl>
<dt><div><a href="<?php 
            echo $value['url'];
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:tpl_default_space.php

示例10: session_start

include "sql.php";
session_start();
if ($_GET['action'] == "chatheartbeat") {
    chatHeartbeat();
}
if ($_GET['action'] == "sendchat") {
    sendChat();
}
if ($_GET['action'] == "closechat") {
    closeChat();
}
if ($_GET['action'] == "startchatsession") {
    startChatSession();
}
if ($_GET['action'] == "block") {
    block();
}
if ($_GET['action'] == "webcam") {
    webcam();
}
if (!isset($_SESSION['chatHistory'])) {
    $_SESSION['chatHistory'] = array();
}
if (!isset($_SESSION['openChatBoxes'])) {
    $_SESSION['openChatBoxes'] = array();
}
function webcam()
{
    $username = $_POST["username"];
    echo "{$username} has received a request";
    exit(0);
开发者ID:zaverichintan,项目名称:peer2peerchat,代码行数:31,代码来源:chat.php

示例11: block

<td valign="top" class="catalog">

<?php 
echo block("rid=3 ORDER BY date DESC LIMIT 2", "news");
?>

<table class="allnews" width="250" border=0><tr><td align="right" style="padding-right:10px;padding-top:27px;"><a class="allnews" href="/">Все новости</a></td></tr>
<tr><td><img src="images/blank.gif" width="1" height="27" border="0"></td></tr>
<tr><td class="company">Производители</td></tr>
<tr><td><img src="images/blank.gif" width="1" height="24" border="0"></td></tr>
</table>
<table class="company" width="250" border=0>
<tr><td width=50%><a href="/"><img src="images/bosch.jpg" width="115" height="30" border="0"></a></td><td width=50%><a href="/"><img src="images/dewalt.jpg" width="115" height="30" border="0"></a></td></tr>
<tr><td width=50% class="companyname" align="center">Bosch</td><td width=50% class="companyname" align="center">Dewalt</td></tr>

<tr><td width=50%><a href="/"><img src="images/bosch.jpg" width="115" height="30" border="0"></a></td><td width=50%><a href="/"><img src="images/dewalt.jpg" width="115" height="30" border="0"></a></td></tr>
<tr><td width=50% class="companyname" align="center">Bosch</td><td width=50% class="companyname" align="center">Dewalt</td></tr>

<tr><td width=50%><a href="/"><img src="images/bosch.jpg" width="115" height="30" border="0"></a></td><td width=50%><a href="/"><img src="images/dewalt.jpg" width="115" height="30" border="0"></a></td></tr>
<tr><td width=50% class="companyname" align="center">Bosch</td><td width=50% class="companyname" align="center">Dewalt</td></tr>

<tr><td width=50%><a href="/"><img src="images/bosch.jpg" width="115" height="30" border="0"></a></td><td width=50%><a href="/"><img src="images/dewalt.jpg" width="115" height="30" border="0"></a></td></tr>
<tr><td width=50% class="companyname" align="center">Bosch</td><td width=50% class="companyname" align="center">Dewalt</td></tr>

<tr><td width=50%><a href="/"><img src="images/bosch.jpg" width="115" height="30" border="0"></a></td><td width=50%><a href="/"><img src="images/dewalt.jpg" width="115" height="30" border="0"></a></td></tr>
<tr><td width=50% class="companyname" align="center">Bosch</td><td width=50% class="companyname" align="center">Dewalt</td></tr>
</table>
<table width="250" border=0><tr><td align="right" style="padding-right:10px;padding-top:27px;padding-bottom:30px;"><a class="allnews" href="/">Все производители</a></td></tr>
<tr><td style="padding-bottom:15px;"><img src="images/hit_bg.jpg" width="250" height="25" border="0"></td></tr>
</table>
<table style="margin-right:10px;" border=0>
开发者ID:pioytazsko,项目名称:drell,代码行数:31,代码来源:_right.php

示例12: block

        echo $value['url'];
        ?>
"><?php 
        echo $value['subject'];
        ?>
</a></li>
            
<?php 
    }
}
?>
        </ul>
    	<ul>
        	<li class="first"><a href="/category-32.html">院校大全</a></li>
            <?php 
block("spacenews", "type/news/catid/32/order/i.dateline DESC/limit/0,5/cachetime/9000/subjectlen/30/cachename/newsShow");
?>
<!--news-->
            
<?php 
if (is_array($_SBLOCK['newsShow'])) {
    foreach ($_SBLOCK['newsShow'] as $value) {
        ?>
            <li><a href="<?php 
        echo $value['url'];
        ?>
"><?php 
        echo $value['subject'];
        ?>
</a></li>
            
开发者ID:hongz1125,项目名称:devil,代码行数:30,代码来源:tpl_tobo20130125_index.php

示例13: block

        
<?php 
    }
}
?>
    </div>
    <div id="contentinner" class="clearfix">
    	<div class="t_box_1">
        	<div class="t_list_9">
            	<h4><a href="/action-<?php 
echo $channel;
?>
.html">其他相关</a></h4>
                <ul>
                   <?php 
block("spacenews", "catid/27/limit/0,20/cachetime/9000/cachename/other");
?>
                    
<?php 
if (is_array($_SBLOCK['other'])) {
    foreach ($_SBLOCK['other'] as $value) {
        ?>
                    <li><a href="<?php 
        echo $value['url'];
        ?>
"><?php 
        echo $value['subject'];
        ?>
</a></li>
                    
<?php 
开发者ID:hongz1125,项目名称:devil,代码行数:30,代码来源:tpl_tobo20130125_other.php

示例14: extend

<? extend('frix/admin/base') ?>

<? block('contents') ?>
	<div id="message">
		<p>Are you sure you want to delete <strong>"<?php 
echo $file_name;
?>
"</strong>?</p>
	</div>

	<form action="./?<?php 
echo $_SERVER['QUERY_STRING'];
?>
" method="post">
		<p class="buttons">
		<span class="button"><input type="submit" name="delete" value="Yes" /></span>
		<span class="button"><a href="./">No</a></span>
		</p>
	</form>
<? end_block() ?>
开发者ID:ricobl,项目名称:frix,代码行数:20,代码来源:delete.php

示例15: write

function write($_POST)
{
    extract($_POST);
    if (isset($back)) {
        unset($_POST["back"]);
        return slctCat($_POST);
    }
    require_lib("validate");
    $v = new validate();
    $v->isOk($type, "string", 1, 2, "Invalid category type.");
    $v->isOk($tab, "string", 1, 14, "Invalid category type.");
    $v->isOk($accname, "string", 1, 50, "Invalid account name.");
    $v->isOk($catid, "string", 1, 50, "Invalid category Id/name.");
    $v->isOk($topacc, "num", 4, 4, "Invalid account number.");
    $v->isOk($accnum, "num", 1, 3, "Invalid account number.");
    $v->isOk($toptype, "string", 1, 255, "Invalid category type.");
    if ($v->isError()) {
        $err = $v->genErrors();
        return $err;
    }
    core_connect();
    $sql = "SELECT * FROM accounts WHERE accname = '{$accname}' AND div = '" . USER_DIV . "'";
    $checkRslt = db_exec($sql) or errDie("Unable to retrieve Account details from database.");
    if (pg_numrows($checkRslt) > 0) {
        $confirm = "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='err'>Account name already exist.</td>\n\t\t\t</tr>";
        return slctCaterr($type, $tab, $accname, $catid, $topacc, $accnum, $confirm);
        exit;
    }
    # Check Account Number
    core_connect();
    $sql = "SELECT * FROM accounts WHERE topacc = '{$topacc}' AND accnum = '{$accnum}' AND div = '" . USER_DIV . "'";
    $checkRslt = db_exec($sql) or errDie("Unable to retrieve Account details from database.");
    $check = pg_numrows($checkRslt);
    if (pg_numrows($checkRslt) > 0) {
        $confirm = "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' class='err'>The Account number is already in use.</td>\n\t\t\t</tr>";
        return slctCaterr($type, $tab, $accname, $catid, $topacc, $accnum, $confirm);
        exit;
    }
    # Begin sql transaction
    pglib_transaction("BEGIN") or errDie("Unable to start a database transaction.", SELF);
    // Get the db value of toptype
    $toptype_db = explode(":", $toptype);
    $toptype_db = $toptype_db[0];
    # write to DB
    $sql = "\n\t\tINSERT INTO accounts (\n\t\t\ttopacc, accnum, accname, acctype, catid, div, toptype\n\t\t) VALUES (\n\t\t\t'{$topacc}', '{$accnum}', '{$accname}','{$type}', '{$catid}', '" . USER_DIV . "', '{$toptype_db}'\n\t\t)";
    $catRslt = db_exec($sql) or errDie("Unable to add Account to Database.", SELF);
    # get last inserted id for new acc
    $accid = pglib_lastid("accounts", "accid");
    global $MONPRD;
    $month_names = array(0, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    # insert account into trial Balance
    insert_trialbal($accid, $topacc, $accnum, $accname, $type, 'f', USER_DIV);
    for ($i = 1; $i <= 12; $i++) {
        $periodname = getMonthName($i);
        $sql = "\n\t\t\tINSERT INTO " . YR_DB . ".{$periodname} (\n\t\t\t\taccid, topacc, accnum, accname, debit, credit, div\n\t\t\t) SELECT accid, topacc, accnum, accname, debit, credit, div FROM core.trial_bal WHERE month='{$i}' AND accid='{$accid}'";
        db_exec($sql) or die($sql);
        $sql = "\n\t\t\tINSERT INTO \"{$i}\".openbal (\n\t\t\t\taccid, accname, debit, credit, div\n\t\t\t) SELECT accid, accname, debit, credit, div FROM core.trial_bal WHERE month='{$i}' AND accid='{$accid}'";
        db_exec($sql) or die($sql);
        $sql = "\n\t\t\tINSERT INTO \"{$i}\".ledger (\n\t\t\t\tacc, contra, edate, eref, descript, credit, debit, div, caccname, ctopacc, caccnum, cbalance, dbalance\n\t\t\t) SELECT accid, accid, CURRENT_DATE, '0', 'Balance', '0', '0', div, accname, topacc, accnum, credit, debit \n\t\t\tFROM core.trial_bal \n\t\t\tWHERE month='{$i}' AND accid='{$accid}'";
        db_exec($sql) or die($sql);
    }
    pglib_transaction("COMMIT") or errDie("Unable to start a database transaction.", SELF);
    block();
    //			print "
    //			<script>
    //				window.opener.location.reload();
    //				window.close();
    //			</script>";
    if (isset($update_parent) and $update_parent == "yes") {
        #do something to reload the parent window ...
        print "\n\t\t\t<script>\n\t\t\t\twindow.opener.document.form.key.value='{$set_key}';\n\t\t\t\twindow.opener.document.form.submit ();\n\t\t\t\twindow.close();\n\t\t\t</script>";
    } else {
        #do normal return
        # status report
        $write = "\n\t\t\t<table " . TMPL_tblDflts . " width='50%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>New Account</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t<td>New Account, <b>({$topacc}/{$accnum}) - {$accname}</b> was successfully added to Cubit.</td>\n\t\t\t\t</tr>\n\t\t\t</table><br>" . mkQuickLinks(ql("../reporting/allcat.php", "List All Accounts (New Window)", true), ql("acc-view.php", "View Accounts"), ql("acc-new2.php", "Add Account"));
        return $write;
    }
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:78,代码来源:acc-new2.php


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