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

PHP TLSmarty类代码示例

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

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



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

示例1: renderGui

function renderGui(&$argsObj, &$guiObj, $templateCfg)
{
    $smarty = new TLSmarty();
    $smarty->assign('gui', $guiObj);
    $doRender = false;
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
            $doRender = true;
            $tpl = $templateCfg->default_template;
            break;
        case "doCreate":
        case "doUpdate":
            if (!is_null($templateCfg->template)) {
                $doRender = true;
                $tpl = $templateCfg->template;
            } else {
                header("Location: rolesView.php?tproject_id={$guiObj->tproject_id}");
                exit;
            }
            break;
    }
    if ($doRender) {
        $smarty->display($templateCfg->template_dir . $tpl);
    }
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:26,代码来源:rolesEdit.php


示例2: 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


示例3: 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


示例4: 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


示例5: 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


示例6: renderGui

function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg)
{
    $smartyObj = new TLSmarty();
    //
    // key: operation requested (normally received from GUI on doAction)
    // value: operation value to set on doAction HTML INPUT
    // This is useful when you use same template (example xxEdit.tpl), for create and edit.
    // When template is used for create -> operation: doCreate.
    // When template is used for edit -> operation: doUpdate.
    //
    // used to set value of: $guiObj->operation
    //
    $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doDelete' => '', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate');
    $renderType = 'none';
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "doDelete":
        case "doCreate":
        case "doUpdate":
            $renderType = 'template';
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tplDir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
            $smartyObj->assign('gui', $guiObj);
            $smartyObj->display($tpl);
            break;
        case 'redirect':
            header("Location: {$tpl}");
            exit;
            break;
        default:
            break;
    }
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:49,代码来源:planMilestonesEdit.php


示例7: while

    while ($myrow = mysql_fetch_assoc($result)) {
        $data[runID][$myrow['runID']] = $myrow;
        $limitedRunIDs[] = $myrow['runID'];
        if (!isset($machine[$myrow['runMachineID']])) {
            list($ip, $client, $hostnameID, $hostname) = getMachineInfo($myrow['runID']);
            $machine[$hostnameID][ip] = $ip;
            $machine[$hostnameID][client] = $client;
            $machine[$hostnameID][hostnameID] = $hostnameID;
            $machine[$hostnameID][hostname] = $hostname;
        }
        $data[runID][$myrow['runID']][machineIPAddr] = $machine[$myrow['runMachineID']][ip];
        $data[runID][$myrow['runID']][p4Client] = $machine[$myrow['runMachineID']][client];
        $data[runID][$myrow['runID']][hostname] = $machine[$myrow['runMachineID']][hostname];
        $data[runID][$myrow['runID']][scriptCount] = 0;
        $data[runID][$myrow['runID']][caseCount] = 0;
        $data[runID][$myrow['runID']][scripts][passed] = 0;
    }
}
getTestScriptResults($data, $condition, $limitedRunIDs);
$smarty = new TLSmarty();
$smarty->assign("chosenQueueID", is_null($queueIDform) ? "" : $queueIDform);
$smarty->assign("errors", $error);
$smarty->assign("data", $data);
# note: for the href to work you will need to edit gui/javascript/highlightTableRow.js
#       in order to propery set the <rowname>href attribute
$spanInfo = array(array(id => "runID", show => "yes", message => "runID", colName => "runID", tdTag => 'id="runID" width="6%"', href => 'smokeruns_ts.php?runID={$data.runID.$runID.runID}'), array(id => "versioncolumn", show => "yes", message => "Version", colName => "versionDottedQuad"), array(id => "buildcolumn", show => "yes", message => "Build", colName => "buildNum"), array(id => "purpose", show => "no", message => "Purpose", colName => "runPurpose"), array(id => "user", show => "yes", message => "User", colName => "NTID"), array(id => "total", show => "yes", message => "Total", colName => "scriptCount"), array(id => "passed", show => "yes", message => "Passed", evalColName => '{$data.runID.$runID.scripts.passed}'), array(id => "status", show => "yes", color => "yes", message => "Status", colName => "runStatus"), array(id => "machine", show => "no", message => "Where Run", colName => "hostname"), array(id => "cli", show => "no", color => "no", tdTag => 'class="cli"', message => "Command Line", colName => "runExecuteMethod"));
$smarty->assign("spaninfo", $spanInfo);
$smarty->display('smokeruns.tpl');
?>

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


示例8: implode

        $filter['by_scope'] = " AND RS.scope like '%{$scope}%' ";
    }
    if ($args->custom_field_id > 0) {
        //search by custom fields
        $args->custom_field_id = $db->prepare_int($args->custom_field_id);
        $args->custom_field_value = $db->prepare_string($args->custom_field_value);
        $from['by_custom_field'] = ", {$tables['cfield_design_values']} CFD ";
        $filter['by_custom_field'] = " AND CFD.field_id={$args->custom_field_id} " . " AND CFD.node_id=NH.id " . " AND CFD.value like '%{$args->custom_field_value}%' ";
    }
    $sql = " SELECT NH.id AS id,NH.name as name " . " FROM {$tables['nodes_hierarchy']} NH, " . " {$tables['req_specs']} RS {$from['by_custom_field']} " . " WHERE NH.id = RS.id " . " AND RS.testproject_id = {$args->tprojectID} ";
    if ($filter) {
        $sql .= implode("", $filter);
    }
    $map = $db->fetchRowsIntoMap($sql, 'id');
}
$smarty = new TLSmarty();
$gui->row_qty = count($map);
if ($gui->row_qty) {
    $tpl = 'reqSpecSearchResults.tpl';
    $gui->pageTitle = $gui->main_descr . " - " . lang_get('match_count') . ": " . $gui->row_qty;
    $gui->resultSet = $map;
    if ($gui->row_qty <= $req_cfg->search->max_qty_for_display) {
        $req_set = array_keys($map);
        $gui->path_info = $tproject_mgr->tree_manager->get_full_path_verbose($req_set);
    } else {
        $gui->warning_msg = lang_get('too_wide_search_criteria');
    }
} else {
    $the_tpl = config_get('tpl');
    $gui->pageTitle = $gui->main_descr;
    $tpl = isset($the_tpl['reqSpecSearchView']) ? $the_tpl['reqSpecSearchView'] : 'reqSpecView.tpl';
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:reqSpecSearch.php


示例9: renderGui

/**
 * manage GUI rendering
 *
 */
function renderGui(&$argsObj, $guiObj, $opObj, $templateCfg, $cfgObj, $edit_steps)
{
    $smartyObj = new TLSmarty();
    // need by webeditor loading logic present on inc_head.tpl
    $smartyObj->assign('editorType', $guiObj->editorType);
    $renderType = 'none';
    //
    // key: operation requested (normally received from GUI on doAction)
    // value: operation value to set on doAction HTML INPUT
    // This is useful when you use same template (example xxEdit.tpl), for create and edit.
    // When template is used for create -> operation: doCreate.
    // When template is used for edit -> operation: doUpdate.
    //
    // used to set value of: $guiObj->operation
    //
    $actionOperation = array('create' => 'doCreate', 'doCreate' => 'doCreate', 'edit' => 'doUpdate', 'delete' => 'doDelete', 'doDelete' => '', 'createStep' => 'doCreateStep', 'doCreateStep' => 'doCreateStep', 'doCopyStep' => 'doUpdateStep', 'editStep' => 'doUpdateStep', 'doUpdateStep' => 'doUpdateStep', 'doDeleteStep' => '', 'doReorderSteps' => '', 'doInsertStep' => 'doUpdateStep');
    $key2work = 'initWebEditorFromTemplate';
    $initWebEditorFromTemplate = property_exists($opObj, $key2work) ? $opObj->{$key2work} : false;
    $key2work = 'cleanUpWebEditor';
    $cleanUpWebEditor = property_exists($opObj, $key2work) ? $opObj->{$key2work} : false;
    $oWebEditor = createWebEditors($argsObj->basehref, $cfgObj->webEditorCfg, null, $edit_steps);
    foreach ($oWebEditor->cfg as $key => $value) {
        $of =& $oWebEditor->editor[$key];
        $rows = $oWebEditor->cfg[$key]['rows'];
        $cols = $oWebEditor->cfg[$key]['cols'];
        switch ($argsObj->doAction) {
            case "edit":
            case "delete":
            case "editStep":
                $initWebEditorFromTemplate = false;
                $of->Value = $argsObj->{$key};
                break;
            case "doCreate":
            case "doDelete":
            case "doCopyStep":
            case "doUpdateStep":
                $initWebEditorFromTemplate = false;
                $of->Value = $argsObj->{$key};
                break;
            case "create":
            case "doCreateStep":
            case "doInsertStep":
            default:
                $initWebEditorFromTemplate = true;
                break;
        }
        $guiObj->operation = $actionOperation[$argsObj->doAction];
        if ($initWebEditorFromTemplate) {
            $of->Value = getItemTemplateContents('testcase_template', $of->InstanceName, '');
        } else {
            if ($cleanUpWebEditor) {
                $of->Value = '';
            }
        }
        $smartyObj->assign($key, $of->CreateHTML($rows, $cols));
    }
    // manage tree refresh
    switch ($argsObj->doAction) {
        case "doDelete":
            $guiObj->refreshTree = $argsObj->refreshTree;
            break;
    }
    switch ($argsObj->doAction) {
        case "edit":
        case "create":
        case "delete":
        case "createStep":
        case "editStep":
        case "doCreate":
        case "doDelete":
        case "doCreateStep":
        case "doUpdateStep":
        case "doDeleteStep":
        case "doReorderSteps":
        case "doCopyStep":
        case "doInsertStep":
            $renderType = 'template';
            // Document !!!!
            $key2loop = get_object_vars($opObj);
            foreach ($key2loop as $key => $value) {
                $guiObj->{$key} = $value;
            }
            $guiObj->operation = $actionOperation[$argsObj->doAction];
            new dBug($opObj);
            $tplDir = !isset($opObj->template_dir) || is_null($opObj->template_dir) ? $templateCfg->template_dir : $opObj->template_dir;
            $tpl = is_null($opObj->template) ? $templateCfg->default_template : $opObj->template;
            $pos = strpos($tpl, '.php');
            if ($pos === false) {
                $tpl = $tplDir . $tpl;
            } else {
                $renderType = 'redirect';
            }
            break;
    }
    switch ($renderType) {
        case 'template':
//.........这里部分代码省略.........
开发者ID:moraesmv,项目名称:testlink-code,代码行数:101,代码来源:tcEdit.php


示例10: testlinkInitPage

require_once "common.php";
require_once "csv.inc.php";
require_once "xml.inc.php";
testlinkInitPage($db, false, false, "checkRights");
$templateCfg = templateConfiguration();
$args = init_args();
switch ($args->doAction) {
    case "do_export":
        $op = do_export($db, $smarty, $args);
        break;
}
$keyword = new tlKeyword();
$exportTypes = $keyword->getSupportedSerializationInterfaces();
$main_descr = lang_get('testproject') . TITLE_SEP . $args->testproject_name;
$fileName = is_null($args->export_filename) ? 'keywords.xml' : $args->export_filename;
$smarty = new TLSmarty();
$smarty->assign('export_filename', $fileName);
$smarty->assign('main_descr', $main_descr);
$smarty->assign('action_descr', lang_get('export_keywords'));
$smarty->assign('exportTypes', $exportTypes);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
function init_args()
{
    $iParams = array("doAction" => array("GET", tlInputParameter::STRING_N, 0, 50), "export_filename" => array("POST", tlInputParameter::STRING_N, 0, 255), "exportType" => array("POST", tlInputParameter::STRING_N, 0, 255));
    $args = new stdClass();
    $pParams = I_PARAMS($iParams, $args);
    $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->testproject_name = $_SESSION['testprojectName'];
    return $args;
}
/*
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:31,代码来源:keywordsExport.php


示例11: setcookie

} else {
    // general role applied
    $testprojectRole = $args->user->globalRole->getDisplayName();
}
$gui->whoami = $args->user->getDisplayName() . ' ' . $tlCfg->gui->role_separator_open . $testprojectRole . $tlCfg->gui->role_separator_close;
// only when the user has changed project using the combo the _GET has this key.
// Use this clue to launch a refresh of other frames present on the screen
// using the onload HTML body attribute
$gui->updateMainPage = 0;
if ($args->testproject) {
    $gui->updateMainPage = 1;
    // set test project ID for the next session
    setcookie('TL_lastTestProjectForUserID_' . $args->user->dbID, $args->testproject, TL_COOKIE_KEEPTIME, '/');
}
$gui->grants = getGrants($db, $args->user);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display('navBar.tpl');
/**
 * 
 */
function getGrants(&$db, &$userObj)
{
    $grants = new stdClass();
    $grants->view_testcase_spec = $userObj->hasRight($db, "mgt_view_tc");
    return $grants;
}
function init_args()
{
    $iParams = array("testproject" => array(tlInputParameter::INT_N));
    $args = new stdClass();
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:navBar.php


示例12: testlinkInitPage

 * @filesource  tcSearch.php
 * @package     TestLink
 * @author      TestLink community
 * @copyright   2007-2015, TestLink community 
 * @link        http://www.testlink.org/
 *
 *
 * @internal revisions
 * @since 1.9.15
 **/
require_once "../../config.inc.php";
require_once "common.php";
require_once 'exttable.class.php';
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$smarty = new TLSmarty();
$tpl = 'tcSearchResults.tpl';
$tproject_mgr = new testproject($db);
$tcase_mgr = new testcase($db);
$tcase_cfg = config_get('testcase_cfg');
$charset = config_get('charset');
$filter = null;
list($args, $filter) = init_args($tproject_mgr);
$ga = initializeGui($args, $tproject_mgr);
$gx = $tcase_mgr->getTcSearchSkeleton($args);
$gui = (object) array_merge((array) $ga, (array) $gx);
initSearch($gui, $args, $tproject_mgr);
$map = null;
if ($args->tprojectID && $args->doAction == 'doSearch') {
    $tables = tlObjectWithDB::getDBTables(array('cfield_design_values', 'nodes_hierarchy', 'requirements', 'req_coverage', 'tcsteps', 'testcase_keywords', 'tcversions', 'users'));
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($args->tprojectID);
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:31,代码来源:tcSearch.php


示例13: isset

$buildid = isset($_GET['buildid']) ? $_GET['buildid'] : 1;
$deviceid = isset($_GET['deviceid']) ? $_GET['deviceid'] : 1;
$topotype = isset($_GET['topotype']) ? $_GET['topotype'] : 999;
$suite = isset($_GET['suite']) ? $_GET['suite'] : 1;
$gui->saveresult = 2;
if ($needsave == 1) {
    $result = isset($_POST['result']) ? $_POST['result'] : 'none';
    $result_summary = isset($_POST['result_summary']) ? $_POST['result_summary'] : '';
    $reviewer = isset($_POST['reviewer']) ? $_POST['reviewer'] : '';
    $review_summary = isset($_POST['review_summary']) ? $_POST['review_summary'] : '';
    $result_report = isset($_POST['result_report']) ? $_POST['result_report'] : '';
    $gui->saveresult = $tplan_mgr->setTestResult($tplanid, $deviceid, $buildid, $topotype, $suite, $result, $result_summary, $reviewer, $review_summary, $result_report);
}
$gui->reviewers = $tplan_mgr->get_review_users();
$dcnresult = $tplan_mgr->getTestResult($tplanid, $deviceid, $buildid, $topotype, $suite);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('tplanid', $tplanid);
$smarty->assign('buildid', $buildid);
$smarty->assign('deviceid', $deviceid);
$smarty->assign('topotype', $topotype);
$smarty->assign('suite', $suite);
$smarty->assign('result', $dcnresult);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
function init_args()
{
    $args = new stdClass();
    $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->currentUser = $_SESSION['currentUser'];
    $args->username = $_SESSION['currentUser']->getDisplayName();
    return $args;
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:dcnResultDetails.php


示例14: array

    $filters = null;
    $options = array('output' => 'map', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'mapOfArray', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'mapOfMap', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'array', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $milestonesList = $tplan_mgr->get_milestones($args->tplan_id);
    if (!empty($milestonesList)) {
        $gui->statistics->milestones = $metricsMgr->getMilestonesMetrics($args->tplan_id, $milestonesList);
    }
}
// ----------------------------------------------------------------------------
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('buildColDefinition', $colDefinition);
$smarty->assign('buildResults', $results);
displayReport($templateCfg->template_dir . $templateCfg->default_template, $smarty, $args->format, $mailCfg);
/*
  function: init_args 
  args: none
  returns: array 
*/
function init_args()
{
    $iParams = array("tplan_id" => array(tlInputParameter::INT_N), "format" => array(tlInputParameter::INT_N));
    $args = new stdClass();
    $pParams = G_PARAMS($iParams, $args);
    $args->tproject_id = $_SESSION['testprojectID'];
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:31,代码来源:resultsGeneral.php


示例15: show_instructions

        show_instructions('tc_exec_assignment');
        break;
}
$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'];
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:tc_exec_assignment.php


示例16: fwrite

            fwrite($file, $text);
            foreach ($gui->var_tcversion['var'] as $tcversion) {
                $name = $tcversion['name'];
                $text = ', "' . "{$name}" . '  --RunLevel 10"';
                fwrite($file, $text);
            }
            $text = '], []], "topovarlist": [], "ixiavarlist": []}';
            fwrite($file, $text);
            fclose($file);
            echo "<script>window.open('{$filename}');</script>";
        } elseif ($_GET['suite_id'] == 666) {
            //function
        }
    }
}
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('vars', json_encode($gui->vars));
$smarty->assign('total_vars', $total_vars);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
function init_args()
{
    $args = new stdClass();
    $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->currentUser = $_SESSION['currentUser'];
    $args->login_username = $_SESSION['currentUser']->getDisplayName();
    return $args;
}
function checkRights(&$db, &$user)
{
    return True;
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:viewVar.php


示例17: testlinkInitPage

 * since 1.9.3
 *
 **/
require_once '../../config.inc.php';
require_once 'common.php';
require_once "users.inc.php";
require_once 'treeMenu.inc.php';
require_once 'exec.inc.php';
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$chronos[] = $tstart = microtime(true);
$control = new tlTestCaseFilterControl($db, 'execution_mode');
$control->formAction = '';
$gui = initializeGui($control);
$control->build_tree_menu($gui);
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('control', $control);
$smarty->assign('menuUrl', $gui->menuUrl);
$smarty->assign('args', $gui->args);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 * 
 *
 */
function initializeGui(&$control)
{
    $gui = new stdClass();
    // This logic is managed from execSetResults.php
    $gui->loadExecDashboard = true;
    if (isset($_SESSION['loadExecDashboard'][$control->form_token]) || $control->args->loadExecDashboard == 0) {
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:execNavigator.php


示例18: getWebEditorCfg

 * @link      http://www.testlink.org/
 *
 *
 * @internal revisions
 * @since 1.9.13
 **/
require_once '../../config.inc.php';
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;
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:31,代码来源:planEdit.php


示例19: testlinkInitPage

 * @package         TestLink
 * @author          TestLink community
 * @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;
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:tcSearchForm.php


示例20: mysql_close

            if (!$res) {
                $errStr .= "Not able to add in database";
                $builds = $_POST['buildID'];
                $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,代码行数:31,代码来源:resultCons.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP TPL类代码示例发布时间:2022-05-23
下一篇:
PHP TGM_Plugin_Activation类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap