本文整理汇总了PHP中R_PARAMS函数的典型用法代码示例。如果您正苦于以下问题:PHP R_PARAMS函数的具体用法?PHP R_PARAMS怎么用?PHP R_PARAMS使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了R_PARAMS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init_args
/**
*
*
*/
function init_args()
{
$iParams = array("delete" => array(tlInputParameter::INT_N), "user" => array(tlInputParameter::INT_N), "user_id" => array(tlInputParameter::INT_N), "rights_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 30), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 100), "emailAddress" => array(tlInputParameter::STRING_N, 0, 100), "locale" => array(tlInputParameter::STRING_N, 0, 10), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "user_is_active" => array(tlInputParameter::CB_BOOL));
$args = new stdClass();
R_PARAMS($iParams, $args);
return $args;
}
示例2: init_args
function init_args()
{
$iParams = array("exec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "notes" => array(tlInputParameter::STRING_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
return $args;
}
示例3: init_args
function init_args(&$dbHandler)
{
$iParams = array("apikey" => array(tlInputParameter::STRING_N, 32, 64), "tproject_id" => array(tlInputParameter::INT_N), "format" => array(tlInputParameter::INT_N));
$args = new stdClass();
$pParams = R_PARAMS($iParams, $args);
if (!is_null($args->apikey)) {
$cerbero = new stdClass();
$cerbero->args = new stdClass();
$cerbero->args->tproject_id = $args->tproject_id;
if (strlen($args->apikey) == 32) {
$cerbero->args->getAccessAttr = true;
$cerbero->method = 'checkRights';
$cerbero->redirect_target = "../../login.php?note=logout";
setUpEnvForRemoteAccess($dbHandler, $args->apikey, $cerbero);
} else {
$args->addOpAccess = false;
$cerbero->method = null;
setUpEnvForAnonymousAccess($dbHandler, $args->apikey, $cerbero);
}
} else {
testlinkInitPage($dbHandler, true, false, "checkRights");
$args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
}
if ($args->tproject_id <= 0) {
$msg = __FILE__ . '::' . __FUNCTION__ . " :: Invalid Test Project ID ({$args->tproject_id})";
throw new Exception($msg);
}
if (is_null($args->format)) {
tlog("Parameter 'format' is not defined", 'ERROR');
exit;
}
$args->user = $_SESSION['currentUser'];
return $args;
}
示例4: init_args
/**
*
*
*/
function init_args(&$dbHandler)
{
$iParams = array("apikey" => array(tlInputParameter::STRING_N, 0, 64), "tproject_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
if (!is_null($args->apikey)) {
$cerbero = new stdClass();
$cerbero->args = new stdClass();
$cerbero->args->tproject_id = $args->tproject_id;
$cerbero->args->tplan_id = $args->tplan_id;
if (strlen($args->apikey) == 32) {
$cerbero->args->getAccessAttr = true;
$cerbero->method = 'checkRights';
$cerbero->redirect_target = "../../login.php?note=logout";
setUpEnvForRemoteAccess($dbHandler, $args->apikey, $cerbero);
} else {
$args->addOpAccess = false;
$cerbero->method = null;
$cerbero->args->getAccessAttr = false;
setUpEnvForAnonymousAccess($dbHandler, $args->apikey, $cerbero);
}
} else {
testlinkInitPage($dbHandler, true, false, "checkRights");
$args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
}
return $args;
}
示例5: init_args
function init_args()
{
$iParams = array("exec_id" => array(tlInputParameter::INT_N), "readonly" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
return $args;
}
示例6: init_args
/**
*
*
*/
function init_args()
{
$pwdInputLen = config_get('loginPagePasswordMaxLenght');
// 2010904 - eloff - Why is req and reqURI parameters to the login?
$iParams = array("note" => array(tlInputParameter::STRING_N, 0, 255), "tl_login" => array(tlInputParameter::STRING_N, 0, 30), "tl_password" => array(tlInputParameter::STRING_N, 0, $pwdInputLen), "req" => array(tlInputParameter::STRING_N, 0, 4000), "reqURI" => array(tlInputParameter::STRING_N, 0, 4000), "action" => array(tlInputParameter::STRING_N, 0, 10), "destination" => array(tlInputParameter::STRING_N, 0, 255), "loginform_token" => array(tlInputParameter::STRING_N, 0, 255));
$pParams = R_PARAMS($iParams);
$args = new stdClass();
$args->note = $pParams['note'];
$args->login = $pParams['tl_login'];
$args->pwd = $pParams['tl_password'];
$args->reqURI = urlencode($pParams['req']);
$args->preqURI = urlencode($pParams['reqURI']);
$args->destination = urldecode($pParams['destination']);
$args->loginform_token = urldecode($pParams['loginform_token']);
if ($pParams['action'] == 'ajaxcheck' || $pParams['action'] == 'ajaxlogin') {
$args->action = $pParams['action'];
} else {
if (!is_null($args->login)) {
$args->action = 'doLogin';
} else {
$args->action = 'loginform';
}
}
return $args;
}
示例7: init_args
/**
* init_args()
*
*/
function init_args()
{
$iParams = array("key" => array(tlInputParameter::STRING_N), "refreshTree" => array(tlInputParameter::INT_N));
$args = new stdClass();
$pParams = R_PARAMS($iParams, $args);
return $args;
}
示例8: init_args
/**
*
*/
function init_args()
{
$iParams = array("id" => array(tlInputParameter::INT_N), "req_id" => array(tlInputParameter::ARRAY_INT), "req" => array(tlInputParameter::INT_N), "showCloseButton" => array(tlInputParameter::STRING_N, 0, 1), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "edit" => array(tlInputParameter::STRING_N, 0, 100), "unassign" => array(tlInputParameter::STRING_N, 0, 1), "assign" => array(tlInputParameter::STRING_N, 0, 1), "form_token" => array(tlInputParameter::INT_N), "idSRS" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
// take care of proper escaping when magic_quotes_gpc is enabled
$_REQUEST = strings_stripSlashes($_REQUEST);
$args->idReqSpec = null;
$args->idReq = $args->req;
$args->reqIdSet = $args->req_id;
$args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
$args->tcaseSet = null;
if (isset($_SESSION['edit_mode'][$args->form_token]['testcases_to_show'])) {
$args->tcaseSet = $_SESSION['edit_mode'][$args->form_token]['testcases_to_show'];
}
if (is_null($args->doAction)) {
$args->doAction = $args->unassign != "" ? "unassign" : null;
}
if (is_null($args->doAction)) {
$args->doAction = $args->assign != "" ? "assign" : null;
}
if ($args->idSRS) {
$args->idReqSpec = $args->idSRS;
$_SESSION['currentSrsId'] = $args->idReqSpec;
} else {
if (isset($_SESSION['currentSrsId']) && intval($_SESSION['currentSrsId']) > 0) {
$args->idReqSpec = intval($_SESSION['currentSrsId']);
}
}
$args->user = $_SESSION['currentUser'];
return $args;
}
示例9: init_args
function init_args()
{
$iParams = array("help" => array(tlInputParameter::STRING_N), "locale" => array(tlInputParameter::STRING_N, 0, 10));
$args = new stdClass();
$pParams = R_PARAMS($iParams, $args);
return $args;
}
示例10: initEnv
/**
*
*/
function initEnv(&$dbHandler)
{
$_REQUEST = strings_stripSlashes($_REQUEST);
// input from GET['HelloString3'],
// type: string,
// minLen: 1,
// maxLen: 15,
// regular expression: null
// checkFunction: applys checks via checkFooOrBar() to ensure its either 'foo' or 'bar'
// normalization: done via normFunction() which replaces ',' with '.'
// "HelloString3" => array("GET",tlInputParameter::STRING_N,1,15,'checkFooOrBar','normFunction'),
//
$iParams = array("operation" => array(tlInputParameter::STRING_N, 0, 50), "user" => array(tlInputParameter::INT_N));
$pParams = R_PARAMS($iParams);
$args = new stdClass();
$args->operation = $pParams["operation"];
$args->user_id = $pParams['user'];
$args->currentUser = $_SESSION['currentUser'];
$args->currentUserID = $_SESSION['currentUser']->dbID;
$args->basehref = $_SESSION['basehref'];
$gui = new stdClass();
$gui->grants = getGrantsForUserMgmt($dbHandler, $args->currentUser);
$gui->result = null;
$gui->action = null;
$gui->user_feedback = '';
$gui->basehref = $args->basehref;
return array($args, $gui);
}
示例11: init_args
/**
* init_args
*
*/
function init_args(&$dbHandler)
{
// take care of proper escaping when magic_quotes_gpc is enabled
$_REQUEST = strings_stripSlashes($_REQUEST);
$iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "containerID" => array(tlInputParameter::INT_N), "reqDocId" => array(tlInputParameter::STRING_N, 0, 64), "req_title" => array(tlInputParameter::STRING_N, 0, 100), "scope" => array(tlInputParameter::STRING_N), "reqStatus" => array(tlInputParameter::STRING_N, 0, 1), "reqType" => array(tlInputParameter::STRING_N, 0, 1), "countReq" => array(tlInputParameter::INT_N), "expected_coverage" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20), "req_id_cbox" => array(tlInputParameter::ARRAY_INT), "itemSet" => array(tlInputParameter::ARRAY_INT), "testcase_count" => array(tlInputParameter::ARRAY_INT), "req_version_id" => array(tlInputParameter::INT_N), "copy_testcase_assignment" => array(tlInputParameter::CB_BOOL), "relation_id" => array(tlInputParameter::INT_N), "relation_source_req_id" => array(tlInputParameter::INT_N), "relation_type" => array(tlInputParameter::STRING_N), "relation_destination_req_doc_id" => array(tlInputParameter::STRING_N, 0, 64), "relation_destination_testproject_id" => array(tlInputParameter::INT_N), "save_rev" => array(tlInputParameter::INT_N), "do_save" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "log_message" => array(tlInputParameter::STRING_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->req_id = $args->requirement_id;
$args->title = $args->req_title;
$args->arrReqIds = $args->req_id_cbox;
$args->basehref = $_SESSION['basehref'];
$args->tproject_name = '';
if ($args->tproject_id > 0) {
$treeMgr = new tree($dbHandler);
$dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
$args->tproject_name = $dummy['name'];
}
$args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
$args->user = $_SESSION['currentUser'];
// to avoid database errors with null value
if (!is_numeric($args->expected_coverage)) {
$args->expected_coverage = 0;
}
$uk = 'setting_refresh_tree_on_action';
$args->refreshTree = testproject::getUserChoice($args->tproject_id, array('reqTreeRefreshOnAction'));
$args->stay_here = isset($_REQUEST['stay_here']) ? 1 : 0;
return $args;
}
示例12: init_args
/**
* init_args
*
*/
function init_args(&$dbHandler)
{
$reqTitleSize = config_get('field_size')->requirement_title;
$iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_version_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "req_title" => array(tlInputParameter::STRING_N, 0, $reqTitleSize), "req_id_cbox" => array(tlInputParameter::ARRAY_INT), "reqDocId" => array(tlInputParameter::STRING_N, 0, 64), "reqStatus" => array(tlInputParameter::STRING_N, 0, 1), "reqType" => array(tlInputParameter::STRING_N, 0, 1), "containerID" => array(tlInputParameter::INT_N), "scope" => array(tlInputParameter::STRING_N), "countReq" => array(tlInputParameter::INT_N), "expected_coverage" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20), "itemSet" => array(tlInputParameter::ARRAY_INT), "testcase_count" => array(tlInputParameter::ARRAY_INT), "copy_testcase_assignment" => array(tlInputParameter::CB_BOOL), "relation_id" => array(tlInputParameter::INT_N), "relation_source_req_id" => array(tlInputParameter::INT_N), "relation_type" => array(tlInputParameter::STRING_N), "relation_destination_req_doc_id" => array(tlInputParameter::STRING_N, 0, 64), "relation_destination_testproject_id" => array(tlInputParameter::INT_N), "save_rev" => array(tlInputParameter::INT_N), "do_save" => array(tlInputParameter::INT_N), "log_message" => array(tlInputParameter::STRING_N), "tcaseIdentity" => array(tlInputParameter::STRING_N), "file_id" => array(tlInputParameter::INT_N), "fileTitle" => array(tlInputParameter::STRING_N, 0, 100));
$args = new stdClass();
R_PARAMS($iParams, $args);
$_REQUEST = strings_stripSlashes($_REQUEST);
$args->req_id = $args->requirement_id;
$args->title = $args->req_title;
$args->arrReqIds = $args->req_id_cbox;
$args->basehref = $_SESSION['basehref'];
$args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
if ($args->tproject_id <= 0) {
throw new Exception(__FILE__ . '::' . __FUNCTION__ . " Test project ID can not be <= 0 ");
}
$mgr = new testproject($dbHandler);
$info = $mgr->get_by_id($args->tproject_id);
if (is_null($info)) {
throw new Exception(__FILE__ . '::' . __FUNCTION__ . " Unable to get test project data ");
}
$args->tproject_name = $info['name'];
$args->tcasePrefix = $info['prefix'];
$args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
if (!is_numeric($args->expected_coverage)) {
$args->expected_coverage = 0;
}
$args->refreshTree = isset($_SESSION['setting_refresh_tree_on_action']) ? $_SESSION['setting_refresh_tree_on_action'] : 0;
$args->stay_here = isset($_REQUEST['stay_here']) ? 1 : 0;
return $args;
}
示例13: init_args
function init_args()
{
$iParams = array("exec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "notes" => array(tlInputParameter::STRING_N), "tcversion_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
$args->basehref = $_SESSION['basehref'];
return $args;
}
示例14: init_args
/**
*
*
*/
function init_args()
{
$_REQUEST = strings_stripSlashes($_REQUEST);
$iParams = array("machineID" => array(tlInputParameter::INT_N), "machineOwner" => array(tlInputParameter::INT_N), "machineName" => array(tlInputParameter::STRING_N, 0, 255), "machineIp" => array(tlInputParameter::STRING_N, 0, 50), "machineNotes" => array(tlInputParameter::STRING_N, 0, 2000), "machinePurpose" => array(tlInputParameter::STRING_N, 0, 2000), "machineHw" => array(tlInputParameter::STRING_N, 0, 2000), "tproject_id" => array(tlInputParameter::INT_N));
$args = new stdClass();
R_PARAMS($iParams, $args);
return $args;
}
示例15: init_args
/**
* @return object returns the arguments for the page
*/
function init_args()
{
$iParams = array("roleid" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100));
$args = new stdClass();
$pParams = R_PARAMS($iParams, $args);
$args->currentUser = $_SESSION['currentUser'];
return $args;
}