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


PHP TLSmarty::display方法代码示例

本文整理汇总了PHP中TLSmarty::display方法的典型用法代码示例。如果您正苦于以下问题:PHP TLSmarty::display方法的具体用法?PHP TLSmarty::display怎么用?PHP TLSmarty::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TLSmarty的用法示例。


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

示例1: displayInfo

/**
 * Display simple info and exit
 *
 * @param string $title
 * @param string $message
 */
function displayInfo($title, $message)
{
    $smarty = new TLSmarty();
    $smarty->assign('title', $title);
    $smarty->assign('content', $message);
    $smarty->display('workAreaSimple.tpl');
    exit;
}
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:14,代码来源:info.inc.php

示例2: displayInfo

/**
 * Display simple info and exit
 *
 * @param string $title
 * @param string $message
 */
function displayInfo($title, $message)
{
    $smarty = new TLSmarty();
    $gui = new stdClass();
    $gui->title = $title;
    $gui->content = $message;
    $gui->hint_text = $gui->link_to_op = '';
    $smarty->assign('gui', $gui);
    $smarty->display('workAreaSimple.tpl');
    exit;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:17,代码来源:info.inc.php

示例3: renderGui

/**
 */
function renderGui(&$dbHandler, &$argsObj, $guiObj, $opObj, $templateCfg)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    // key: gui action
    // value: next gui action (used to set value of action button on gui)
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate');
    // Get rendering type and set variable for template
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "doDelete":
        case "doCreate":
        case "doUpdate":
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $renderType = 'redirect';
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
                $tpl = $tplDir . $tpl;
                $renderType = 'template';
            }
            break;
    }
    // execute rendering
    // new dBug($tpl);
    // new dBug($guiObj);
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:47,代码来源:issueTrackerEdit.php

示例4: displayReport

/**
 * 
 *
 */
function displayReport($template_file, &$smarty, $doc_format, $mailCfg = null)
{
    switch ($doc_format) {
        case FORMAT_HTML:
        case FORMAT_ODT:
        case FORMAT_ODS:
        case FORMAT_XLS:
        case FORMAT_MSWORD:
        case FORMAT_PDF:
            flushHttpHeader($doc_format, $doc_kind = 0);
            break;
        case FORMAT_MAIL_HTML:
            $op = generateHtmlEmail($smarty, $template_file, $mailCfg);
            $message = $op->status_ok ? '' : lang_get('send_mail_ko');
            $smarty = new TLSmarty();
            $smarty->assign('message', $message . ' ' . $op->msg);
            $smarty->assign('title', $mailCfg->subject);
            $template_file = "emailSent.tpl";
            break;
    }
    $smarty->display($template_file);
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:26,代码来源:displayMgr.php

示例5: TLSmarty

                $phase = $_POST['phaseName'];
            } else {
                $errStr = "<h1>Phase Name: PR-" . $_POST['phaseName'] . " updated succesfully!!!</h1>";
            }
        } else {
            $errStr .= "Build or phase is empty";
        }
        mysql_close($link);
    }
} else {
    $errStr = "";
}
$smarty = new TLSmarty();
$smarty->assign('valid_user', $arr[0]);
$smarty->assign('none', $arr[1]);
$smarty->assign('userString', $arr[2]);
$smarty->assign('errString', $errStr);
$smarty->assign('submitPHP', "resultCons.php");
$smarty->assign('searchPHP', "resultCons.php");
$smarty->assign('regr', "regression");
$smarty->assign('tableHeader', $tableHeader);
$smarty->assign('columnCount', "10");
$smarty->assign('regReq', $regReq);
$smarty->assign('builds', $builds);
$smarty->assign('phaser', $phase);
$smarty->assign('submit', $submit);
$smarty->display('resultCons.tpl');
?>


开发者ID:window98lsq,项目名称:autoweb,代码行数:28,代码来源:resultCons.php

示例6: init_args

}
$gui->items = $out['spec_view'];
// useful to avoid error messages on smarty template.
$gui->items_qty = is_null($gui->items) ? 0 : count($gui->items);
$gui->has_tc = $out['num_tc'] > 0 ? 1 : 0;
$gui->support_array = array_keys($gui->items);
if ($_SESSION['testprojectOptions']->testPriorityEnabled) {
    $urgencyCfg = config_get('urgency');
    $gui->priority_labels = init_labels($urgencyCfg["code_label"]);
}
// Changing to _flat template
$tpl = $templateCfg->template_dir . $templateCfg->default_template;
$tpl = str_replace('.tpl', '_flat.tpl', $tpl);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($tpl);
/*
  function: 
  args :
  
  returns: 
*/
function init_args()
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args = new stdClass();
    $args->user_id = intval($_SESSION['userID']);
    $args->tproject_id = intval($_SESSION['testprojectID']);
    $args->tproject_name = $_SESSION['testprojectName'];
    $key2loop = array('doActionButton' => null, 'doAction' => null, 'level' => null, 'achecked_tc' => null, 'version_id' => 0, 'has_prev_assignment' => null, 'send_mail' => false, 'tester_for_tcid' => null, 'feature_id' => null, 'id' => 0);
    foreach ($key2loop as $key => $value) {
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:tc_exec_assignment.php

示例7: getWebEditorCfg

require_once "common.php";
require_once "web_editor.php";
$editorCfg = getWebEditorCfg('testplan');
require_once require_web_editor($editorCfg['type']);
testlinkInitPage($db, false, false, "checkRights");
$templateCfg = templateConfiguration();
$tplan_mgr = new testplan($db);
$tproject_mgr = new testproject($db);
$smarty = new TLSmarty();
$do_display = false;
$template = null;
$args = init_args($_REQUEST);
if (!$args->tproject_id) {
    $smarty->assign('title', lang_get('fatal_page_title'));
    $smarty->assign('content', lang_get('error_no_testprojects_present'));
    $smarty->display('workAreaSimple.tpl');
    exit;
}
$gui = initializeGui($db, $args, $editorCfg, $tproject_mgr);
$of = web_editor('notes', $_SESSION['basehref'], $editorCfg);
$of->Value = getItemTemplateContents('testplan_template', $of->InstanceName, $args->notes);
// Checks on testplan name, and testplan name<=>testplan id
if ($args->do_action == "do_create" || $args->do_action == "do_update") {
    $gui->testplan_name = $args->testplan_name;
    $name_exists = $tproject_mgr->check_tplan_name_existence($args->tproject_id, $args->testplan_name);
    $name_id_rel_ok = isset($gui->tplans[$args->tplan_id]) && $gui->tplans[$args->tplan_id]['name'] == $args->testplan_name;
}
// interface changes to be able to do not loose CF values if some problem arise on User Interface
$gui->cfields = $tplan_mgr->html_table_of_custom_field_inputs($args->tplan_id, $args->tproject_id, 'design', '', $_REQUEST);
switch ($args->do_action) {
    case 'fileUpload':
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:planEdit.php

示例8: init_args

    case "create":
        $op = $action($args, $gui, $platform_mgr);
        $of->Value = $gui->notes;
        break;
}
if ($op->status == 1) {
    $default_template = $op->template;
    $gui->user_feedback['message'] = $op->user_feedback;
} else {
    $gui->user_feedback['message'] = getErrorMessage($op->status, $args->name);
    $gui->user_feedback['type'] = 'ERROR';
}
$gui->platforms = $platform_mgr->getAll(array('include_linked_count' => true));
$gui->notes = $of->CreateHTML();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . $default_template);
/**
 * 
 *
 */
function init_args(&$dbHandler)
{
    $args = new stdClass();
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $source = sizeof($_POST) ? "POST" : "GET";
    $iParams = array("doAction" => array($source, tlInputParameter::STRING_N, 0, 50), "id" => array($source, tlInputParameter::INT_N), "name" => array($source, tlInputParameter::STRING_N, 0, 100), "notes" => array($source, tlInputParameter::STRING_N));
    $pParams = I_PARAMS($iParams);
    $args->doAction = $pParams["doAction"];
    $args->platform_id = $pParams["id"];
    $args->name = $pParams["name"];
    $args->notes = $pParams["notes"];
开发者ID:moraesmv,项目名称:testlink-code,代码行数:31,代码来源:platformsEdit.php

示例9: createBaseline

                    $index++;
                }
            }
        }
    }
}
###########################################################################################################################
# Save Baseline Counts to DB for entire build in one shot
if ($_REQUEST[baseline]) {
    createBaseline($moduleArr, $version, $build, $regr);
}
###########################################################################################################################
$smarty = new TLSmarty();
$smarty->assign('gren', $gren);
$smarty->assign('rap', $rap);
$smarty->assign('regr', $regr);
$smarty->assign('moduleArr', $moduleArr);
$smarty->assign('isbased', $isBaselined);
$smarty->assign('version', $version);
$smarty->assign('build', $build);
$smarty->assign('count', count($cases));
$smarty->assign('valid_user', $arr[0]);
$smarty->assign('none', $arr[1]);
$smarty->assign('userString', $arr[2]);
$smarty->assign('userLogin', $_POST[username]);
$smarty->assign('submitPHP', "modules.php?regr={$regr}&rap=" . $rap . "&gren=" . $gren . "&version=" . $version . "&build=" . $build . "&platform=" . $platform);
$smarty->display('modules.tpl');
###########################################################################################################################
?>

开发者ID:window98lsq,项目名称:autoweb,代码行数:29,代码来源:modules.php

示例10: init_args

 * @copyright   2007-2013, TestLink community 
 * @link                http://www.teamst.org/index.php
 *
 * @internal revisions
 * @since 1.9.7
 *
**/
require_once "../../config.inc.php";
require_once "../functions/common.php";
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$args = init_args();
$gui = initializeGui($db, $args);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . 'tcSearchForm.tpl');
/**
 * 
 *
 */
function init_args()
{
    $args = new stdClass();
    $args->tprojectID = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    $args->tprojectName = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : 0;
    if ($args->tprojectID <= 0) {
        throw new Exception("Error Processing Request - Invalid Test project id " . __FILE__);
    }
    return $args;
}
function initializeGui(&$dbHandler, &$argsObj)
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:tcSearchForm.php

示例11: renderLoginScreen

/**
 * renderLoginScreen
 * simple piece of code used to clean up code layout
 * 
 * @global  $g_tlLogger
 * @param stdClassObject $guiObj
 */
function renderLoginScreen($guiObj)
{
    global $g_tlLogger;
    $templateCfg = templateConfiguration();
    $logPeriodToDelete = config_get('removeEventsOlderThan');
    $g_tlLogger->deleteEventsFor(null, strtotime("-{$logPeriodToDelete} days UTC"));
    $smarty = new TLSmarty();
    $smarty->assign('gui', $guiObj);
    $smarty->display($templateCfg->default_template);
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:17,代码来源:login.php

示例12: TLSmarty

    }
} else {
    $noPrev = "none";
}
/////////////////////////////////////////////////////////////////////////////
if ($_GET[week] == "") {
    $noNext = "none";
} else {
    $noNext = "";
}
if ($from == 30 && $to == -1) {
    $noNext = "none";
}
krsort($releaseTables[releases], SORT_NUMERIC);
$smarty = new TLSmarty();
$smarty->assign('releaseTables', $releaseTables);
$smarty->assign('releaseCount', count($arrData));
$smarty->assign('valid_user', $arr[0]);
$smarty->assign('none', $arr[1]);
$smarty->assign('userString', $arr[2]);
$smarty->assign('to', $to);
$smarty->assign('from', $from);
$smarty->assign('private', "&private=yes");
$smarty->assign('noNext', $noNext);
$smarty->assign('searchPHP', "searchBuild.php");
$smarty->assign('submitPHP', "private.php");
$smarty->assign('totalColLabel', "Total Private Runs");
$smarty->assign('columnHide', "");
$smarty->assign('columnCount', "11");
$smarty->display('index.tpl');
开发者ID:window98lsq,项目名称:autoweb,代码行数:30,代码来源:private.php

示例13: renderGui

/**
 * renderGui
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $editorCfg)
{
    $smartyObj = new TLSmarty();
    $renderType = 'none';
    $tpl = $tpd = null;
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doReorder' => '', 'reorder' => '', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'createChild' => 'doCreate', 'copy' => 'doCopy', 'doCopy' => 'doCopy', 'copyRequirements' => 'doCopyRequirements', 'doCopyRequirements' => 'doCopyRequirements');
    $owebEditor = web_editor('scope', $argsObj->basehref, $editorCfg);
    switch ($argsObj->doAction) {
        case "edit":
        case "doCreate":
            $owebEditor->Value = $argsObj->scope;
            break;
        default:
            $owebEditor->Value = getItemTemplateContents('req_spec_template', $owebEditor->InstanceName, $argsObj->scope);
            break;
    }
    $guiObj->scope = $owebEditor->CreateHTML();
    $guiObj->editorType = $editorCfg['type'];
    // 20100808 - aismon - added logic to refresh filtered tree on action
    switch ($argsObj->doAction) {
        case "doCreate":
        case "doUpdate":
        case "doCopyRequirements":
        case "doCopy":
        case "doDelete":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "createChild":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "doCreate":
        case "doUpdate":
        case "copyRequirements":
        case "doCopyRequirements":
        case "copy":
        case "doCopy":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $tpd = isset($key2loop['template_dir']) ? $opObj->template_dir : $templateCfg->template_dir;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "createChild":
        case "reorder":
        case "doDelete":
        case "doReorder":
        case "copyRequirements":
        case "copy":
            $tpl = $tpd . $tpl;
            break;
        case "doCreate":
        case "doUpdate":
        case "doCopyRequirements":
        case "doCopy":
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $templateCfg->template_dir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('mgt_view_events', has_rights($db, "mgt_view_events"));
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:tamtrong,项目名称:testlink,代码行数:92,代码来源:reqSpecEdit.php

示例14: initEnv

    // When TL undertand that session exists but has expired
    // is OK to call login with expired indication, but is not this case
    //
    // Dev Notes:
    // may be we are going to login.php and it will call us again!
    redirect(TL_BASE_HREF . "login.php");
    exit;
}
// We arrive to these lines only if we are logged in
//
// Calling testlinkInitPage() I'm doing what we do on navBar.php
// navBar.php is called via main.tpl
// testlinkInitPage($db,('initProject' == 'initProject'));
$tplEngine = new TLSmarty();
$tplEngine->assign('gui', $gui);
$tplEngine->display('main.tpl');
/**
 *
 *
 */
function initEnv()
{
    $iParams = array("reqURI" => array(tlInputParameter::STRING_N, 0, 4000));
    $pParams = G_PARAMS($iParams);
    $args = new stdClass();
    $args->reqURI = $pParams["reqURI"] != '' ? $pParams["reqURI"] : 'lib/general/mainPage.php';
    $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
    $args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
    $gui = new stdClass();
    $gui->title = lang_get('main_page_title');
    $gui->titleframe = "lib/general/navBar.php?tproject_id={$args->tproject_id}&tplan_id={$args->tplan_id}" . "&updateMainPage=1";
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:index.php

示例15: init_args

testlinkInitPage($db, false, false, "checkRights");
$args = init_args();
$deleteDone = false;
if ($args->id) {
    $attachmentRepository = tlAttachmentRepository::create($db);
    $attachmentInfo = $attachmentRepository->getAttachmentInfo($args->id);
    if ($attachmentInfo && checkAttachmentID($db, $args->id, $attachmentInfo)) {
        $deleteDone = $attachmentRepository->deleteAttachment($args->id, $attachmentInfo);
        if ($deleteDone) {
            logAuditEvent(TLS("audit_attachment_deleted", $attachmentInfo['title']), "DELETE", $args->id, "attachments");
        }
    }
}
$smarty = new TLSmarty();
$smarty->assign('bDeleted', $deleteDone);
$smarty->display('attachmentdelete.tpl');
/**
 * @return object returns the arguments for the page
 */
function init_args()
{
    //the id (attachments.id) of the attachment to be deleted
    $iParams = array("id" => array(tlInputParameter::INT_N));
    $args = new stdClass();
    G_PARAMS($iParams, $args);
    return $args;
}
/**
 * @param $db resource the database connection handle
 * @param $user the current active user
 * 
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:attachmentdelete.php


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