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


PHP getBlocks函数代码示例

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


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

示例1: explode

$accountidstr = $focus->column_fields['accountid'];
$accountidarr = explode(",", $accountidstr);
if (is_array($accountidarr)) {
    foreach ($accountidarr as $accountid) {
        if (!empty($accountid)) {
            $accountname = getAccountNameInfo($accountid);
            $acc_arr[] = $accountname;
        }
    }
}
$acc_arr_srt = implode(",", $acc_arr);
$focus->column_fields['accountid'] = $acc_arr_srt;
$smarty = new CRMSmarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$blocks2 = getBlocks($currentModule, "detail_view", '', $focus->column_fields);
$smarty->assign("BLOCKS", $blocks2);
$smarty->assign("UPDATEINFO", updateInfo($focus->id));
if (isset($module_enable_product) && $module_enable_product) {
    $smarty->assign("MODULE_ENABLE_PRODUCT", "true");
    $smarty->assign("ASSOCIATED_PRODUCTS", $focus->getDetailAssociatedProducts());
}
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
    $smarty->assign("NAME", "");
}
if (isset($_REQUEST['return_module'])) {
    $smarty->assign("RETURN_MODULE", $_REQUEST['return_module']);
}
if (isset($_REQUEST['return_action'])) {
开发者ID:honj51,项目名称:taobaocrm,代码行数:31,代码来源:DetailView.php

示例2: setObjectValuesFromRequest

    $focus->name = $focus->column_fields['bookname'];
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->mode = '';
}
if (empty($_REQUEST['record']) && $focus->mode != 'edit') {
    setObjectValuesFromRequest($focus);
}
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$disp_view = getView($focus->mode);
if ($disp_view == 'edit_view') {
    $smarty->assign("BLOCKS", getBlocks($currentModule, $disp_view, $mode, $focus->column_fields));
} else {
    $bas_block = getBlocks($currentModule, $disp_view, $mode, $focus->column_fields, 'BAS');
    $blocks['basicTab'] = $bas_block;
    $smarty->assign("BLOCKS", $blocks);
    $smarty->assign("BLOCKS_COUNT", count($blocks));
}
$smarty->assign("OP_MODE", $disp_view);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'PriceBook');
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
if (isset($cust_fld)) {
    $smarty->assign("CUSTOMFIELD", $cust_fld);
}
$smarty->assign("ID", $focus->id);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:EditView.php

示例3: VT_detailViewNavigation

if (PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule . '_listquery'])) {
    $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
    VT_detailViewNavigation($smarty, $recordNavigationInfo, $focus->id);
}
$smarty->assign('IS_REL_LIST', isPresentRelatedLists($currentModule));
$smarty->assign('SinglePane_View', $singlepane_view);
if ($singlepane_view == 'true') {
    $related_array = getRelatedLists($currentModule, $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
    require_once 'include/ListView/RelatedListViewSession.php';
    if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
        RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), vtlib_purify($_REQUEST['selected_header']));
    }
    $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
    $smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
if (isPermitted($currentModule, 'EditView', $record) == 'yes') {
    $smarty->assign('EDIT_DUPLICATE', 'permitted');
}
if (isPermitted($currentModule, 'Delete', $record) == 'yes') {
    $smarty->assign('DELETE', 'permitted');
}
$smarty->assign('BLOCKS', getBlocks($currentModule, 'detail_view', '', $focus->column_fields));
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => $currentModule, 'RECORD' => $focus->id, 'ACTION' => vtlib_purify($_REQUEST['action']));
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), array('DETAILVIEWBASIC', 'DETAILVIEW', 'DETAILVIEWWIDGET'), $customlink_params));
// Record Change Notification
$focus->markAsViewed($current_user->id);
$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true));
$smarty->display('Inventory/InventoryDetailView.tpl');
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:DetailView.php

示例4: getView

        }
        $smarty->assign('webmail_attachments', $attachment_links);
        if (preg_match("/FW:/i", $webmail->subject)) {
            $smarty->assign('SUBJECT', $webmail->subject);
        } else {
            $smarty->assign('SUBJECT', "FW: " . $webmail->subject);
        }
    }
    $smarty->assign('DESCRIPTION', $webmail->replyBody());
    $focus->mode = '';
}
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$disp_view = getView($focus->mode);
$details = getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields);
//changed this below line to view description in all language - bharath
$smarty->assign("BLOCKS", $details[$mod_strings['LBL_EMAIL_INFORMATION']]);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", $app_strings['Email']);
//id list of attachments while forwarding
$smarty->assign("ATT_ID_LIST", $att_id_list);
//needed when creating a new email with default values passed in
if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) {
    $focus->contact_name = vtlib_purify($_REQUEST['contact_name']);
}
if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) {
    $focus->contact_id = vtlib_purify($_REQUEST['contact_id']);
}
if (isset($_REQUEST['parent_name']) && is_null($focus->parent_name)) {
    $focus->parent_name = vtlib_purify($_REQUEST['parent_name']);
开发者ID:kikojover,项目名称:corebos,代码行数:31,代码来源:EditView.php

示例5: getBlocks

<?php

$TList = 0;
$BlockParam = $_GET['b'];
if (empty($BlockParam)) {
    $TList = getBlocks();
} else {
    $TList = getBlockFiles($BlockParam);
}
?>
<h1>Browse Blocks</h1>
<?php 
if (empty($_GET['b'])) {
    ?>
    <?php 
    foreach ($TList as $value) {
        ?>
  
        <a style="display:block" href="admin.php?p=BrowseBlocks&b=<?php 
        echo $value;
        ?>
"><?php 
        echo $value;
        ?>
</a>
    <?php 
    }
} else {
    ?>
     <?php 
    foreach ($TList as $value) {
开发者ID:BackupTheBerlios,项目名称:gencms-svn,代码行数:31,代码来源:BlocksBrowse.php

示例6: getBlocks

if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) {
    $focus->contact_id = $_REQUEST['contact_id'];
}
if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name)) {
    $focus->parent_name = $_REQUEST['opportunity_name'];
}
if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id)) {
    $focus->parent_id = $_REQUEST['opportunity_id'];
}
if (isset($_REQUEST['accountname']) && is_null($focus->parent_name)) {
    $focus->parent_name = $_REQUEST['accountname'];
}
if (isset($_REQUEST['accountid']) && is_null($focus->parent_id)) {
    $focus->parent_id = $_REQUEST['accountid'];
}
$act_data = getBlocks($tab_type, "detail_view", '', $focus->column_fields);
$finaldata = array();
foreach ($act_data as $block => $entry) {
    foreach ($entry as $key => $value) {
        foreach ($value as $label => $field) {
            $fldlabel[$field['fldname']] = $label;
            if ($field['ui'] == 15 || $field['ui'] == 16) {
                foreach ($field['options'] as $index => $arr_val) {
                    if ($arr_val[2] == "selected") {
                        $finaldata[$field['fldname']] = $arr_val[0];
                    }
                }
            } else {
                $fldvalue = $field['value'];
                if ($field['fldname'] == 'description') {
                    $fldvalue = nl2br($fldvalue);
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EventDetailView.php

示例7: getView

 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
global $mod_strings, $app_strings, $theme, $currentModule, $current_user;
require_once 'Smarty_setup.php';
require_once 'include/utils/utils.php';
$focus = CRMEntity::getInstance($currentModule);
$focus->mode = '';
$mode = 'mass_edit';
$disp_view = getView($focus->mode);
$idstring = $_REQUEST['idstring'];
$smarty = new vtigerCRM_Smarty();
$smarty->assign('MODULE', $currentModule);
$smarty->assign('APP', $app_strings);
$smarty->assign('THEME', $theme);
$smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
$smarty->assign('IDS', $idstring);
$smarty->assign('MASS_EDIT', '1');
$smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $mode, $focus->column_fields, '', $focus->non_mass_edit_fields));
$smarty->assign("CATEGORY", getParentTab());
// Field Validation Information
$tabid = getTabid($currentModule);
$validationData = getDBValidationData($focus->tab_name, $tabid);
$validationArray = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $validationArray['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $validationArray['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $validationArray['fieldlabel']);
$smarty->display('MassEditForm.tpl');
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:MassEdit.php

示例8: setObjectValuesFromRequest

}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->mode = '';
}
if (empty($_REQUEST['record']) && $focus->mode != 'edit') {
    setObjectValuesFromRequest($focus);
}
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$disp_view = getView($focus->mode);
if ($disp_view == 'edit_view') {
    $smarty->assign("BLOCKS", getBlocks($currentModule, $disp_view, $mode, $focus->column_fields));
} else {
    $bas_block = getBlocks($currentModule, $disp_view, $mode, $focus->column_fields, 'BAS');
    $adv_block = getBlocks($currentModule, $disp_view, $mode, $focus->column_fields, 'ADV');
    $blocks['basicTab'] = $bas_block;
    if (is_array($adv_block)) {
        $blocks['moreTab'] = $adv_block;
    }
    $smarty->assign("BLOCKS", $blocks);
    $smarty->assign("BLOCKS_COUNT", count($blocks));
}
$smarty->assign("OP_MODE", $disp_view);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Vendor');
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("ID", $focus->id);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:EditView.php

示例9: vtigerCRM_Smarty

global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("Account detail view");
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
    $smarty->assign("NAME", "");
}
$smarty->assign("BLOCKS", getBlocks("Accounts", "detail_view", '', $focus->column_fields));
$smarty->assign("UPDATEINFO", updateInfo($focus->id));
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
    $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
    $mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("CUSTOMFIELD", $cust_fld);
$smarty->assign("ID", $_REQUEST['record']);
$smarty->assign("SINGLE_MOD", 'Account');
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:DetailView.php

示例10: Hiemstra

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="author" content="Michel Hiemstra (mhiemstra@php.net)" />
		<meta name="keywords" content="drag&drop portal, igoogle drag and drop, igoogle, drag and drop div igoogle javascript, drag and drop block like igoogle, div drag drop" />
		<meta name="description" content="iGoogle like Drag & Drop Portal v3 by Michel Hiemstra" />
		
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1/prototype.js"></script>
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js"></script>
		<script type="text/javascript" src="js/portal.js"></script>
		
		<?php 
require_once 'blocks_get.php';
?>
		
		<script type="text/javascript">
			var settings 	= <?php 
echo getBlocks();
?>
;
			
			var options 	= { portal 			: 'columns', 
								editorEnabled 	: true, 
								saveurl 		: 'blocks_save.php' };
								
			var data 		= {};
						
			var portal;
					
			Event.observe(window, 'load', function() {
				portal = new Portal(settings, options, data);
			});
		</script>
开发者ID:vanzhiganov,项目名称:iGoogle-Drag-Drop-portal,代码行数:31,代码来源:index.php

示例11: getView

if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->mode = '';
    $focus->column_fields['customernum'] = "";
}
/*
if(empty($focus->column_fields['customernum'])) {
	require_once('user_privileges/seqprefix_config.php');
	$focus->column_fields['customernum'] = $account_seqprefix.date("Ymd")."-".$focus->get_next_id();
}
*/
$disp_view = getView($focus->mode);
if ($disp_view == 'edit_view') {
    $smarty->assign("BLOCKS", getBlocks("Accounts", $disp_view, $focus->mode, $focus->column_fields));
} else {
    $smarty->assign("BASBLOCKS", getBlocks("Accounts", $disp_view, $focus->mode, $focus->column_fields));
    //$smarty->assign("ADVBLOCKS",getBlocks("Accounts",$disp_view,$mode,$focus->column_fields,'ADV'));
}
$smarty->assign("OP_MODE", $disp_view);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
//retreiving the combo values array
//$comboFieldNames = Array('accounttype'=>'account_type_dom'
//                      ,'industry'=>'industry_dom');
//$comboFieldArray = getComboArray($comboFieldNames);
$log->info("Account detail view");
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
开发者ID:Pengzw,项目名称:c3crm,代码行数:31,代码来源:EditView.php

示例12: doluck

function doluck($data, $user)
{
    global $fld_sep, $val_sep;
    if ($user === null) {
        $ans = getBlocks('Anon');
    } else {
        $ans = getBlocks($user);
    }
    $pg = '<h1>Pool Avg Block Luck History</h1><br>';
    if ($ans['STATUS'] == 'ok' and isset($ans['rows']) and $ans['rows'] > 0) {
        $count = $ans['s_rows'] - 1;
        $av = number_format(100 * $ans['s_luck:' . $count], 3);
        for ($i = 0; $i < $count; $i++) {
            // This also defines how many lines there are
            $cols = array('#0000c0', '#00dd00', '#e06020', '#b020e0');
        }
        $nams = array(1, 5, 15, 25);
        $nc = count($cols);
        addGBase();
        $cbx = array('skey' => 'block key', 'slines' => 'block lines', 'tkey' => 'time key', 'tlines' => 'time lines', 'over' => 'key overlap', 'smooth' => 'smooth', 'utc' => 'utc');
        $xon = array('skey' => 1, 'tkey' => 1, 'tlines' => 1, 'utc' => 1);
        $pg .= '<div>';
        foreach ($cbx as $nam => $txt) {
            $pg .= ' <span class=nb>';
            $pg .= "<input type=checkbox id={$nam} onclick='gact(this)'>";
            $pg .= "{$txt}&nbsp;</span>";
        }
        $pg .= '</div><div>';
        $i = 1;
        $datacols = '';
        foreach ($cols as $col) {
            if ($i != 1) {
                $pg .= '&nbsp;&nbsp;';
            }
            if ($i == 2 || $i == 4) {
                $chk = ' checked';
            } else {
                $chk = '';
            }
            $pg .= "<span class=nb><font color={$col}>";
            $pg .= "<input type=checkbox id=lin{$i}{$chk} onclick='godrw(0)'>: ";
            if ($nams[$i - 1] == 1) {
                $avs = '';
            } else {
                $avs = ' Avg';
            }
            $pg .= $nams[$i - 1] . " Block Luck{$avs}</font></span>";
            if ($i > 1) {
                $datacols .= ',';
            }
            $datacols .= $col;
            $i++;
        }
        $pg .= '</div>';
        $pg .= '<div id=can0><canvas id=can width=1 height=1>';
        $pg .= 'A graph will show here if your browser supports html5/canvas';
        $pg .= "</canvas></div>\n";
        $count = $ans['rows'];
        # add the orphan/reject ratios to the subsequent blocks
        $dr = 0;
        for ($i = $count - 1; $i >= 0; $i--) {
            $conf = $ans["confirmed:{$i}"];
            if ($conf == '1' or $conf == 'F') {
                $ans["diffratio:{$i}"] += $dr;
                $dr = 0;
            } else {
                $dr += $ans["diffratio:{$i}"];
            }
        }
        # $ans blocks are 0->rows-1 highest->lowest
        # build an array of valid block offsets (reversed lowest->highest)
        $off = array();
        for ($i = $count - 1; $i >= 0; $i--) {
            $conf = $ans["confirmed:{$i}"];
            if ($conf == '1' or $conf == 'F') {
                $off[] = $i;
            }
        }
        $data = '';
        $count = count($off);
        $avg = 0;
        # each valid block offset number (lowest->highest)
        for ($j = 0; $j < $count; $j++) {
            $i = $off[$j];
            $data .= $fld_sep . "height:{$j}{$val_sep}";
            $data .= $ans["height:{$i}"];
            $data .= $fld_sep . "seq:{$j}{$val_sep}";
            $data .= $ans["seq:{$i}"];
            $data .= $fld_sep . "firstcreatedate:{$j}{$val_sep}";
            $data .= $ans["firstcreatedate:{$i}"];
            $data .= $fld_sep . "0_luck:{$j}{$val_sep}";
            $data .= number_format(100 * $ans['luck:' . $i], 3);
            $avg += $ans["diffratio:{$i}"];
            $l5c = $l15c = $l25c = 1;
            $l5 = $l15 = $l25 = $ans['diffratio:' . $i];
            # +/- offset from j (12 is the max for 25)
            for ($k = 1; $k <= 12; $k++) {
                # we want the (n-1)/2 on each side of the offset number
                foreach (array(-1, 1) as $s) {
                    $o = $j + $s * $k;
//.........这里部分代码省略.........
开发者ID:ctubio,项目名称:ckpool,代码行数:101,代码来源:page_luck.php

示例13: doblocks

function doblocks($data, $user)
{
    $blink = '<a href=https://www.blocktrail.com/BTC/block/';
    $pg = '';
    if ($user === null) {
        $ans = getBlocks('Anon');
    } else {
        $ans = getBlocks($user);
    }
    if (nuem(getparam('csv', true))) {
        $wantcsv = false;
    } else {
        $wantcsv = true;
    }
    if ($wantcsv === false) {
        if ($ans['STATUS'] == 'ok' and isset($ans['s_rows']) and $ans['s_rows'] > 0) {
            $pg .= '<h1>Block Statistics</h1>';
            $pg .= "<table callpadding=0 cellspacing=0 border=0>\n";
            $pg .= "<tr class=title>";
            $pg .= "<td class=dl>Description</td>";
            $pg .= "<td class=dr>Time</td>";
            $pg .= "<td class=dr>MeanTx%</td>";
            $pg .= "<td class=dr>Diff%</td>";
            $pg .= "<td class=dr>Mean%</td>";
            $pg .= "<td class=dr>CDF[Erl]</td>";
            $pg .= "<td class=dr>Luck%</td>";
            $pg .= "</tr>\n";
            $since = $data['info']['lastblock'];
            $count = $ans['s_rows'];
            for ($i = 0; $i < $count; $i++) {
                if ($i % 2 == 0) {
                    $row = 'even';
                } else {
                    $row = 'odd';
                }
                $desc = $ans['s_desc:' . $i];
                $age = daysago($since - $ans['s_prevcreatedate:' . $i]);
                $diff = number_format(100 * $ans['s_diffratio:' . $i], 2);
                $mean = number_format(100 * $ans['s_diffmean:' . $i], 2);
                $cdferl = $ans['s_cdferl:' . $i];
                list($fg, $bg) = erlcolour($cdferl);
                $cdferldsp = "<font color={$fg}>" . number_format($cdferl, 4) . '</font>';
                $bg = " bgcolor={$bg}";
                $luck = number_format(100 * $ans['s_luck:' . $i], 2);
                $txm = number_format(100 * $ans['s_txmean:' . $i], 1);
                $pg .= "<tr class={$row}>";
                $pg .= "<td class=dl>{$desc} Blocks</td>";
                $pg .= "<td class=dr>{$age}</td>";
                $pg .= "<td class=dr>{$txm}%</td>";
                $pg .= "<td class=dr>{$diff}%</td>";
                $pg .= "<td class=dr>{$mean}%</td>";
                $pg .= "<td class=dr{$bg}>{$cdferldsp}</td>";
                $pg .= "<td class=dr>{$luck}%</td>";
                $pg .= "</tr>\n";
            }
            $pg .= "</table>\n";
        }
        if ($ans['STATUS'] == 'ok') {
            $count = $ans['rows'];
            if ($count == 1) {
                $num = '';
                $s = '';
            } else {
                $num = " {$count}";
                $s = 's';
            }
            $pg .= "<h1>Last{$num} Block{$s}</h1>";
        } else {
            $pg .= '<h1>Blocks</h1>';
        }
        list($fg, $bg) = pctcolour(25.0);
        $pg .= "<span style='background:{$bg}; color:{$fg};'>";
        $pg .= "&nbsp;Green&nbsp;</span>&nbsp;";
        $pg .= 'is good luck. Lower Diff% and brighter green is better luck.<br>';
        list($fg, $bg) = pctcolour(100.0);
        $pg .= "<span style='background:{$bg}; color:{$fg};'>";
        $pg .= "&nbsp;100%&nbsp;</span>&nbsp;";
        $pg .= 'is expected average.&nbsp;';
        list($fg, $bg) = pctcolour(400.0);
        $pg .= "<span style='background:{$bg}; color:{$fg};'>";
        $pg .= "&nbsp;Red&nbsp;</span>&nbsp;";
        $pg .= 'is bad luck. Higher Diff% and brighter red is worse luck.<br><br>';
        $pg .= "<table callpadding=0 cellspacing=0 border=0>\n";
        $pg .= "<tr class=title>";
        $pg .= "<td class=dr>#</td>";
        $pg .= "<td class=dl>Height</td>";
        if ($user !== null) {
            $pg .= "<td class=dl>Who</td>";
        }
        $pg .= "<td class=dr>Block Reward</td>";
        $pg .= "<td class=dc>When</td>";
        $pg .= "<td class=dr>Status</td>";
        $pg .= "<td class=dr>Diff</td>";
        $pg .= "<td class=dr>Diff%</td>";
        $pg .= "<td class=dr>CDF</td>";
        $pg .= "<td class=dr>B</td>";
        $pg .= "</tr>\n";
    }
    $blktot = 0;
    $nettot = 0;
//.........这里部分代码省略.........
开发者ID:nullivex,项目名称:ckpool,代码行数:101,代码来源:page_blocks.php

示例14: vtigerCRM_Smarty

}
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$log->info("SalesOrder detail view");
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
if (isset($focus->name)) {
    $smarty->assign("NAME", $focus->name);
} else {
    $smarty->assign("NAME", "");
}
$smarty->assign("BLOCKS", getBlocks($currentModule, "detail_view", '', $focus->column_fields));
$smarty->assign("UPDATEINFO", updateInfo($focus->id));
$smarty->assign("CUSTOMFIELD", $cust_fld);
$smarty->assign("ID", vtlib_purify($_REQUEST['record']));
$salesorder_no = getModuleSequenceNumber($currentModule, vtlib_purify($_REQUEST['record']));
$smarty->assign("SO_NO", $salesorder_no);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
    $mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
    $mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("SINGLE_MOD", 'SalesOrder');
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:DetailView.php

示例15: getRelatedLists

    $related_array = getRelatedLists($currentModule, $focus);
    $smarty->assign("RELATEDLISTS", $related_array);
    require_once 'include/ListView/RelatedListViewSession.php';
    if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
        RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), vtlib_purify($_REQUEST['selected_header']));
    }
    $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
    $smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
if (isPermitted($currentModule, 'EditView', $record) == 'yes') {
    $smarty->assign('EDIT_DUPLICATE', 'permitted');
}
if (isPermitted($currentModule, 'Delete', $record) == 'yes') {
    $smarty->assign('DELETE', 'permitted');
}
$blocks = getBlocks($currentModule, 'detail_view', '', $focus->column_fields);
// This might not be picked up in getBlocks as we do not have a field in it.
if (empty($blocks[getTranslatedString('StatusInformation', $currentModule)])) {
    $blocks[getTranslatedString('StatusInformation', $currentModule)] = array();
}
$smarty->assign('BLOCKS', $blocks);
// Gather the custom link information to display
include_once 'vtlib/Vtiger/Link.php';
$customlink_params = array('MODULE' => $currentModule, 'RECORD' => $focus->id, 'ACTION' => vtlib_purify($_REQUEST['action']));
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), array('DETAILVIEWBASIC', 'DETAILVIEW', 'DETAILVIEWWIDGET'), $customlink_params));
// Record Change Notification
$focus->markAsViewed($current_user->id);
//$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true));
/** Removing Edit permissions */
$smarty->assign('DETAILVIEW_AJAX_EDIT', false);
$smarty->assign('EDIT_DUPLICATE', 'notpermitted');
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:DetailView.php


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