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


PHP Validation::getInput方法代码示例

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


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

示例1: Validation

<?php

/**
 * Author: Zuoshuang Xiang
 * The University Of Michigan
 * He Group
 * Date: 2010-03-04
 *
 * This is the main program for processing user inputs, form queries, 
 * process query resuslt and output final results.
 */
header("Content-Type: text/plain");
include 'inc/functions.php';
$vali = new Validation($_REQUEST);
$ontology = $vali->getInput('ontology', 'Ontology', 0, 128);
$ontology2 = $vali->getInput('ontology2', 'Your own ontology', 0, 1024);
$ontology = trim($ontology . "\n" . $ontology2);
$term_iris = $vali->getInput('term_iris', 'Lower level term IRIs to be imported', 0, 81920);
$top_term_iris = $vali->getInput('top_term_iris', 'Top level term IRIs to be imported', 0, 8192);
$top_term_iris2 = $vali->getInput('top_term_iris2', 'Top level term IRIs to be imported', 0, 8192);
$retrieval_setting = $vali->getInput('retrieval_setting', 'Source term retrieval setting', 0, 128);
$annotation_iris = $vali->getInput('annotation_iris', 'annotation IRIs to be included', 0, 8192);
$outputURI = $vali->getInput('output_iri', 'URI of the OWL(RDF/XML) output file', 0, 128);
$str_inputs = "[URI of the OWL(RDF/XML) output file]\r\n{$outputURI}\r\n\r\n[Source ontology]\r\n{$ontology}\r\n\r\n[Low level source term URIs]\r\n{$term_iris}\r\n\r\n[Top level source term URIs and target direct superclass URIs]\r\n{$top_term_iris}\r\n\r\n[Source term retrieval setting]\r\n{$retrieval_setting}\r\n\r\n[Branch extractions from source term URIs and target direct superclass URIs]\r\n{$top_term_iris2}\r\n\r\n[Source annotation URIs]\r\n{$annotation_iris}";
print $str_inputs;
开发者ID:OntoZoo,项目名称:ontofox,代码行数:25,代码来源:getInput.php

示例2: Validation

Yongqun “Oliver” He - yongqunh@med.umich.edu
Unit for Laboratory Animal Medicine, Center for Computational Medicine & Bioinformatics
University of Michigan, Ann Arbor, MI 48109, USA
He Group:  http://www.hegroup.org
*/
/*
Author: Zuoshuang Xiang
The University Of Michigan
He Group
Date: June 2008 - March 2013
Purpose: Ontobee ontology browsing section ontology terms browsing page.
*/
ini_set('memory_limit', '2048M');
include_once '../inc/Classes.php';
$vali = new Validation($_REQUEST);
$o = $vali->getInput('o', 'Ontology', 1, 60, true);
$l = $vali->getInput('l', 'First Letter', 0, 60, true);
$currPage = $vali->getNumber('currPage', 'Current Page', 0, 5);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Ontobee: <?php 
echo $o;
?>
</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="shortcut icon" href="/favicon.ico" />
<link href="../css/styleMain.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:term.php

示例3: elseif

Date: June 2008 - March 2013
Purpose: Ontobee ontology browsing section rdf query page.
*/
$show_html = false;
if (strpos($_SERVER['HTTP_ACCEPT'], 'application/rdf+xml') === false && strpos($_SERVER['HTTP_ACCEPT'], 'application/xml') === false && strpos($_SERVER['HTTP_ACCEPT'], '*/*') === false) {
    $show_html = true;
} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'bot') || strpos($_SERVER['HTTP_USER_AGENT'], 'spider') || strpos($_SERVER['HTTP_USER_AGENT'], 'crawl') || strpos($_SERVER['HTTP_USER_AGENT'], 'search')) {
    $show_html = true;
}
if ($show_html) {
    include 'about.php';
} else {
    $time_start = microtime(true);
    include_once '../inc/Classes.php';
    $vali = new Validation($_REQUEST);
    $o = $vali->getInput('o', 'Ontology', 1, 60, true);
    if ($vali->getErrorMsg() == '') {
        $settings = getSettings($o);
        $num_queries = 0;
        if (!isset($settings['ns_main'])) {
            $vali->concatError('Invalid ontology specified.');
        }
    }
    if ($vali->getErrorMsg() == '') {
        $iri = $vali->getInput('iri', 'Term IRI', 2, 100, true);
        if (substr($iri, 0, 7) != 'http://') {
            $iri = 'http://purl.obolibrary.org/obo/' . $iri;
        }
        if ($vali->getErrorMsg() == '') {
            $iri = myUrlDecode($iri);
            $outputNSs = array();
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:rdf.php

示例4: getSettings

    $settings = getSettings($o);
    if (isset($settings['ontology_fullname'])) {
        ?>
  
<h3 align="center"><a href="index.php?o=<?php 
        echo $o;
        ?>
"> <?php 
        print $settings['ontology_fullname'];
        ?>
</a></h3>
<?php 
        $time_start = microtime(true);
        $num_queries = 0;
        $vali = new Validation($_REQUEST);
        $keywords = $vali->getInput('keywords', 'Kerwords', 0, 60, true);
        if ($vali->getErrorMsg() == '') {
            $db = ADONewConnection($driver);
            $db->Connect($host, $username, $password, $database);
            if ($keywords != '') {
                $array_property = array();
                $array_property[] = 'http://www.w3.org/2000/01/rdf-schema#label';
                $array_property[] = 'http://purl.obolibrary.org/obo/IAO_0000111';
                $array_property[] = 'http://purl.obolibrary.org/obo/IAO_0000118';
                if (preg_match('/[a-zA-Z]+[:_]\\d{7,}/', $keywords)) {
                    $search_term_url = 'http://purl.obolibrary.org/obo/' . preg_replace('/:/', '_', $keywords);
                    $querystring = "SELECT distinct ?s ?o\nfrom <{$settings['ns_main']}>\nWHERE{\n?s ?p ?o .\nfilter (?p in (<" . join('>,<', $array_property) . ">)).\nfilter (?s in (<{$search_term_url}>)).\n}\nORDER BY ?o\nlimit 5000\n";
                } else {
                    $querystring = "SELECT  distinct ?s ?o\nfrom <{$settings['ns_main']}>\nWHERE{\n?s ?p ?o .\nfilter (?p in (<" . join('>,<', $array_property) . ">)).\nFILTER (isIRI(?s)).\n?o bif:contains \"'{$keywords}*'\" OPTION (score ?sc)\n}\nORDER BY desc(?sc)\nlimit 5000\n";
                }
                print "<!--{$querystring}-->";
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:index.php

示例5: Validation

			dojo.byId("btnAddterm"+index).disabled=false;
			dojo.byId("btnShowterm"+index).disabled=false;
		}
	}
</script>
<!-- InstanceEndEditable -->
</head>

<body>
<div id="topbanner"><a href="/index.php"><img src="Images/logo.gif" alt="Logo" width="280" height="50" border="0"></a></div>
<div id="topnav"><a href="index.php" class="topnav">Home</a><a href="introduction.php" class="topnav">Introduction</a><a href="tutorial/index.php" class="topnav">Tutorial</a><a href="faqs.php" class="topnav">FAQs</a><a href="references.php" class="topnav">References</a><a href="links.php" class="topnav">Links</a><a href="contactus.php" class="topnav">Contact</a><a href="acknowledge.php" class="topnav">Acknowledge</a></div>
<div id="mainbody">
<!-- InstanceBeginEditable name="Main" -->
<?php 
$vali = new Validation($_REQUEST);
$GALAXY_URL = $vali->getInput('GALAXY_URL', 'GALAXY_URL', 0, 100, true);
if ($GALAXY_URL != '') {
    if (isset($_SESSION)) {
        $_SESSION['GALAXY_URL'] = $GALAXY_URL;
    }
}
$db = ADONewConnection($driver);
$db->Connect($host, $username, $password, $database);
$strSql = "select * from ontology where to_list='y' order by ontology_fullname";
$rs = $db->Execute($strSql);
?>
<form action="getExternal.php" method="post" enctype="multipart/form-data" name="formMain" target="_blank" id="formMain">
<table border="0">
	<tr>
		<td><p><strong>OntoFox</strong> is a web-based system to support ontology reuse. It  allows users to input terms, fetch selected properties, annotations, and certain classes of related terms from  source ontologies and save the results using the RDF/XML serialization of the OWL. OntoFox follows and expands the <a href="http://obi-ontology.org/page/MIREOT">MIREOT</a> principle. Inspired by existing ontology modularization techniques, OntoFox also develops a new SPARQL-based ontology term extraction algorithym that extracts terms related to a given set of signature terms. In addition, OntoFox provides an option to extract the hierarchy rooted at a specified ontology term. OntoFox is implemented using one of the following three methods, based on how data is input and whether the OntoFox web interface is used:</p>
		  	<p><span class="header_darkred">1. Data input using web forms:</span> 
开发者ID:OntoZoo,项目名称:ontofox,代码行数:31,代码来源:index.php

示例6: Validation

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body>
<div id="topbanner"><a href="/index.php" style="font-size:36px; color:#111144; text-decoration:none"><img src="../images/logo.gif" alt="Logo" width="280" height="49" border="0"></a></div>
<div id="topnav"><a href="../index.php" class="topnav">Home</a><a href="../introduction.php" class="topnav">Introduction</a><a href="../ontostat/index.php" class="topnav">Statistics</a><a href="../sparql/index.php" class="topnav">SPARQL</a><a href="../ontobeep/index.php" class="topnav">Ontobeep</a><a href="../tutorial/index.php" class="topnav">Tutorial</a><a href="../faqs.php" class="topnav">FAQs</a><a href="../references.php" class="topnav">References</a><a href="../links.php" class="topnav">Links</a><a href="../contactus.php" class="topnav">Contact</a><a href="../acknowledge.php" class="topnav">Acknowledge</a><a href="../news.php" class="topnav">News</a></div>
<div id="mainbody">
<!-- InstanceBeginEditable name="Main" -->
<?php 
include_once '../inc/Classes.php';
$vali = new Validation($_REQUEST);
$keywords = $vali->getInput('keywords', 'Keywords', 1, 60, true);
$ontology = $vali->getInput('ontology', 'Ontology', 0, 60, true);
$jason = array('identifier' => 'url', 'label' => 'name', 'items' => array());
$array_property = array();
$array_property[] = 'http://www.w3.org/2000/01/rdf-schema#label';
$array_property[] = 'http://purl.obolibrary.org/obo/IAO_0000111';
$array_property[] = 'http://purl.obolibrary.org/obo/IAO_0000118';
$db = ADONewConnection($driver);
$db->Connect($host, $username, $password, $database);
$strSql = "select * from ontology where loaded='y' order by ontology_fullname";
$rs = $db->Execute($strSql);
$array_ontology = array();
foreach ($rs as $row) {
    $array_ontology[$row['ontology_graph_url']] = $row['ontology_abbrv'];
}
?>
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:search.php

示例7: Validation

<!-- InstanceBeginEditable name="Main" -->

<p><span class="header_darkred">Retrieving Results</span></p>
<?php 
/**
 * Author: Zuoshuang Xiang
 * The University Of Michigan
 * He Group
 * Date: 2011-10-28
 *
 * Provide template based on selected ontology 
 */
require_once 'inc/Classes.php';
require_once 'inc/PHPExcel.php';
$vali = new Validation($_REQUEST);
$ontology = $vali->getInput('ontology', 'Ontology', 2, 128);
$a_signature_term_type = array();
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#ObjectProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#DatatypeProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#TransitiveProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#SymmetricProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#FunctionalProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#InverseFunctionalProperty';
if ($vali->getErrorMsg() == '') {
    $strSql = "select * from ontology where ontology_abbrv='{$ontology}'";
    $db = ADONewConnection($driver);
    $db->Connect($host, $username, $password, $database);
    $rs = $db->Execute($strSql);
    if (!$rs->EOF) {
        $filename = $ontology;
        //		print(filemtime("userfiles/$filename.xls") - time());
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:listTerms.php

示例8: Validation

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body>
<div id="topbanner"><a href="/index.php" style="font-size:36px; color:#111144; text-decoration:none"><img src="../images/logo.gif" alt="Logo" width="280" height="49" border="0"></a></div>
<div id="topnav"><a href="../index.php" class="topnav">Home</a><a href="../introduction.php" class="topnav">Introduction</a><a href="../ontostat/index.php" class="topnav">Statistics</a><a href="../sparql/index.php" class="topnav">SPARQL</a><a href="../ontobeep/index.php" class="topnav">Ontobeep</a><a href="../tutorial/index.php" class="topnav">Tutorial</a><a href="../faqs.php" class="topnav">FAQs</a><a href="../references.php" class="topnav">References</a><a href="../links.php" class="topnav">Links</a><a href="../contactus.php" class="topnav">Contact</a><a href="../acknowledge.php" class="topnav">Acknowledge</a><a href="../news.php" class="topnav">News</a></div>
<div id="mainbody">
<!-- InstanceBeginEditable name="Main" -->
<?php 
$vali = new Validation($_REQUEST);
$c_email = $vali->getEmail('c_email', 'Email Address', true);
$c_subject = $vali->getInput('c_subject', 'Subject', 2, 200);
$c_category = $vali->getInput('c_category', 'Category', 2, 45);
$c_body = $vali->getInput('c_body', 'Message body', 2, 6000);
$c_submit_ip = $_SERVER['REMOTE_ADDR'];
$resp = recaptcha_check_answer(RECAPTCHA_PRIVATEKEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
    ?>

      <p align="center"> Something wrong with your input. Please check the following fields:<br />
        <font color="red">The reCAPTCHA wasn't entered correctly.</font> <a href="javascript:history.go(-1);">Go back and try again</a>. </p>


<?php 
} elseif (strlen($vali->getErrorMsg()) > 0) {
    include '../inc/input_error.php';
} else {
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:feedback_submit.php

示例9: Validation

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<?php 
/**
* Author: Zuoshuang Xiang
* The University Of Michigan
* He Group
* Date: 2011-10-28
*
* Provide template based on selected ontology 
*/
ini_set('memory_limit', '2048M');
require_once 'inc/Classes.php';
$vali = new Validation($_REQUEST);
$o = $vali->getInput('o', 'Ontology', 2, 60, true);
?>
<url><loc>http://www.ontobee.org/browser/index.php?o=<?php 
echo $o;
?>
</loc></url>

<?php 
$a_signature_term_type = array();
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#Class';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#ObjectProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#DatatypeProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#TransitiveProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#SymmetricProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#FunctionalProperty';
$a_signature_term_type[] = 'http://www.w3.org/2002/07/owl#InverseFunctionalProperty';
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:sitemap.php

示例10: Validation

<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="shortcut icon" href="/favicon.ico" />
<link href="styleMain.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<div id="topbanner"><a href="/index.php"><img src="Images/logo.gif" alt="Logo" width="280" height="50" border="0"></a></div>
<div id="topnav"><a href="index.php" class="topnav">Home</a><a href="introduction.php" class="topnav">Introduction</a><a href="tutorial/index.php" class="topnav">Tutorial</a><a href="faqs.php" class="topnav">FAQs</a><a href="references.php" class="topnav">References</a><a href="links.php" class="topnav">Links</a><a href="contactus.php" class="topnav">Contact</a><a href="acknowledge.php" class="topnav">Acknowledge</a></div>
<div id="mainbody">
<!-- InstanceBeginEditable name="Main" -->

<?php 
include 'inc/functions.php';
$vali = new Validation($_REQUEST);
$f = $vali->getInput('f', 'F', 0, 128);
if ($f != '') {
    $tokens = preg_split('/,/', $f);
    foreach ($tokens as $token) {
        if (preg_match('/^[a-z0-9]+$/', $token)) {
            system("rm -f userfiles/{$token}.*");
        }
    }
}
?>

<p>Files have been destroyed!</p>

<!-- InstanceEndEditable -->
</div>
<div id="footer">
开发者ID:OntoZoo,项目名称:ontofox,代码行数:31,代码来源:remove.php

示例11: Validation

Unit for Laboratory Animal Medicine, Center for Computational Medicine & Bioinformatics
University of Michigan, Ann Arbor, MI 48109, USA
He Group:  http://www.hegroup.org
-->
<!--
Author: Zuoshuang Xiang
The University Of Michigan
He Group
Date: June 2008 - March 2013
Purpose: Web site page redirection.
-->

<?php 
include_once 'inc/Classes.php';
$vali = new Validation($_REQUEST);
$short_id = $vali->getInput('shortid', 'Short ID', 10, 20, true);
if (preg_match('/[a-zA-Z]+_\\d{7,}/', $short_id)) {
    header('Location: http://purl.obolibrary.org/obo/' . $short_id);
} else {
    ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Ontobee</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="shortcut icon" href="/favicon.ico" />
<link href="css/styleMain.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<script type="text/javascript">
开发者ID:e4ong1031,项目名称:ontobee,代码行数:30,代码来源:redirect.php

示例12: Validation

Unit for Laboratory Animal Medicine, Center for Computational Medicine & Bioinformatics
University of Michigan, Ann Arbor, MI 48109, USA
He Group:  http://www.hegroup.org
-->
<!--
Author: Zuoshuang Xiang
The University Of Michigan
He Group
Date: June 2008 - March 2013
Purpose: Ontobee Sparql query index page.
-->

<?php 
include_once '../inc/Classes.php';
$vali = new Validation($_REQUEST);
$query = $vali->getInput('query', 'query', 0, 1024 * 8, true);
$format = $vali->getInput('format', 'format', 0, 128, true);
$maxrows = $vali->getInput('maxrows', 'maxrows', 0, 128, true);
$go = $vali->getInput('go', 'go', 0, 128, true);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/default.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Ontobee SPARQL</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="shortcut icon" href="/favicon.ico" />
<link href="../css/styleMain.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->

<link rel="stylesheet" href="default.css" type="text/css"/>
开发者ID:e4ong1031,项目名称:ontobee,代码行数:31,代码来源:index.php


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