예제 #1
0
//include_once("../lib/php/verbs.php");
include_once HEADER;
#include_once("../lib/php/search_engines.php");
$cfg = new ItalyDAO($_REQUEST);
$regular = "";
$irregular = "";
$reflexive = "";
$simple = "";
$compound = "";
if (isset($_POST['name'])) {
    $regular = $_POST['regular'];
    $irregular = $_POST['irregular'];
    $reflexive = $_POST['reflexive'];
    $simple = $_POST['simple'];
    $compound = $_POST['compound'];
    $cfg->conjugateVerb();
}
?>

  <div id="text">
    <h3>I Verbi</h3>
    <form id="verbTypesForm" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
      <p>
        <strong>Select a verb:</strong>
        <?php 
$cfg->getList("regular", $regular);
$cfg->getList("irregular", $irregular);
$cfg->getList("reflexive", $reflexive);
예제 #2
0
<?php

function __autoload($class)
{
    require_once "/home/benjamin/public_html/italy/lib/php/classes/{$class}.php";
}
$cfg = new ItalyDAO();
switch ($_GET['function']) {
    case "check_email":
        $cfg->checkEmail($_GET['email']);
        break;
    case "conjugate_verb":
        $cfg->conjugateVerb($_GET['verb'], $_GET['tense']);
        break;
    case "random_word":
        $cfg->getRandomWord();
        break;
}