Esempio n. 1
0
echo $student_id;
?>
">
                        <center><table width="80%" border="0" cellpadding="0" cellspacing="1">
                        <tr><td colspan="6">Strengths and Needs:</td></tr>
                        <?php 
$bgcolor = "#DFDFDF";
//print the header row...
echo "<tr><td bgcolor=\"#E0E2F2\">&nbsp;</td><td bgcolor=\"#E0E2F2\">UID</td><td align=\"center\" bgcolor=\"#E0E2F2\">Type</td><td align=\"center\" bgcolor=\"#E0E2F2\">Description (click to edit)</td><td align=\"center\" bgcolor=\"#E0E2F2\">Ongoing*</td></tr>\n";
while ($strength_row = mysql_fetch_array($strength_result)) {
    //current...
    echo "<tr>\n";
    echo "<td bgcolor=\"#E0E2F2\"><input type=\"checkbox\" name=\"" . $strength_row['uid'] . "\"></td>";
    echo "<td bgcolor=\"{$bgcolor}\" class=\"row_default\">" . $strength_row['uid'] . "</td>";
    echo "<td bgcolor=\"{$bgcolor}\" class=\"row_default\"><a href=\"" . IPP_PATH . "edit_strength_need.php?uid=" . $strength_row['uid'] . "\" class=\"editable_text\">" . $strength_row['strength_or_need'] . "</a></td>\n";
    echo "<td bgcolor=\"{$bgcolor}\" class=\"row_default\"><a href=\"" . IPP_PATH . "edit_strength_need.php?uid=" . $strength_row['uid'] . "\" class=\"editable_text\">" . checkSpelling($strength_row['description']) . "</a></td>\n";
    echo "<td bgcolor=\"{$bgcolor}\" class=\"row_default\"><center><a href=\"" . IPP_PATH . "edit_strength_need.php?uid=" . $strength_row['uid'] . "\" class=\"editable_text\">" . $strength_row['is_valid'] . "</a></center></td>\n";
    echo "</tr>\n";
    if ($bgcolor == "#DFDFDF") {
        $bgcolor = "#CCCCCC";
    } else {
        $bgcolor = "#DFDFDF";
    }
}
?>
                        <tr>
                          <td colspan="6" align="left">
                             <table>
                             <tr>
                             <td nowrap>
                                <img src="<?php 
Esempio n. 2
0
<?php

require_once 'document.class.php';
//USE THE DATABASE CLASS FOR SQL HANDLING
require_once 'database.class.php';
require_once 'decomposition.class.php';
$query = $_GET["query"];
$query = checkSpelling($query);
$query = decomposeQuery($query);
$query = applySearchHistory($query);
$results = retrieveFromIndex($query);
echo $query;
//Create the results page
//------------------- FUNCTIONS ---------------
function checkSpelling($query)
{
    return $query;
}
function decomposeQuery($query)
{
    $decomposition = new decomposition();
    $query = $decomposition->decompose($query);
    return $query;
}
function applySearchHistory($query)
{
    return $query;
}
function retrieveFromIndex($query)
{
    $results = array();
Esempio n. 3
0
function matchtime($string)
{
    echo "<br> {$string}";
    $string = str_ireplace("\\", "/", $string);
    $return_array[0] = $string;
    $isfound = false;
    $count = 0;
    while (!$isfound && $count < 2) {
        if ($count == 1) {
            $string = checkSpelling($string);
        }
        $count += 1;
        if (preg_match("~((\\d{1,2})([ :.,-/](\\d{1,2}))? ?(am|pm)?)~", $string, $match)) {
            $matched = $match[2];
            if ($match[4] == '') {
                $matched .= ":00";
            } else {
                if (strlen($match[4]) == 1) {
                    $matched .= ":0{$match['4']}";
                } else {
                    $matched .= ":{$match['4']}";
                }
            }
            if ($match[5] == '') {
                if ($match[2] < 10 && date('H') > 11) {
                    $matched .= ' pm';
                }
            } else {
                $matched .= " {$match['5']}";
            }
            echo $matched;
            $isfound = true;
            $return_array[0] = str_replace($match[0], '', $string);
            $return_array[1] = $match[0];
            $return_array[2] = strtotime($matched);
            echo '<br><b>' . date('h:i A', strtotime($matched)) . '</b>';
        }
    }
    echo "<br>";
    return $return_array;
}
Esempio n. 4
0
<?php

$spell = $_GET["s"];
include 'functions.php';
include 'lib/appconfigdb.php';
echo "<br>After spell checking : " . ($afterSpell = checkSpelling($spell));
Esempio n. 5
0
<?php

session_start();
#header("Content-Type: text/xml");
#$Mistakes = "<Mistakes>";
include_once "../lib/bloomfilter.php";
$UsedWords = array();
if (!isset($_SESSION['usedwords'])) {
    $UsedWords = array();
} else {
    $UsedWords = $_SESSION['usedwords'];
}
#Buffer to use  used words
$WordArray = file("../dictionary/bloomed.txt");
//echo 'BaseRange';
//print_r($WordArray);
include_once "checker.php";
$Content = $_POST['text'];
$Content = explode(' ', $Content);
foreach ($Content as $Word) {
    if (is_numeric($Word)) {
        continue;
    }
    if (checkSpelling(strtolower($Word), $WordArray, $UsedWords) == False) {
        echo $Word . "<br/>";
    }
    #$Mistakes = $Mistakes.'<Mistake>'.$Word.'</Mistake>';
}
#$Mistakes = $Mistakes.'</Mistakes>';
#echo $Mistakes;
Esempio n. 6
0
$truelogin = array("user" => array("1" => "api_shyam", "2" => "api_mithun016", "3" => "api_sucheth", "4" => "api_vijith"), "pass" => array("1" => "wpjce1hhm0ehc7j7", "2" => "tc2oeq3b4sl3dfnh", "3" => "qpu04p6xueuhka9h", "4" => "1h9beccwkii4p92r"));
$app_name = '';
$nextfree = 0;
include 'lib/appconfigdb.php';
//DECLARATIONS END
//mains
$numeric_in = $req;
$req = preg_replace("~^sms (dw|fs|fc|gc|rb|id|freedom|cri|movie|lyrics|train|weather|route|love|flames|recipe|stock|dict|photo|picture|news|trace|price|expand|horoscope|loc)~", "\$1", $req);
$req = preg_replace("~^(fs)\\b~", "friendship", $req);
$str_count = str_word_count($req);
if ($str_count > 2 && $str_count < 8) {
    $req = preg_replace("~^(fc)~", "calc friendship", $req);
}
$req = preg_replace("~(friendship )+~", "friendship ", $req);
echo "<br><h2>TIME before spell :" . (microtime(TRUE) - $time_start) . "</h2><br>";
$spell_checked_org = $spell_checked = checkSpelling($req);
$spell_checked = preg_replace("~\\?~", '', $spell_checked);
echo "<br><h2>TIME after spell :" . (microtime(TRUE) - $time_start) . "</h2><br>";
echo "<br> Spell Checked:::::{$spell_checked}<br>";
$arCacheData = array();
echo "<h1>Fetching Data</h1>";
$cache_content = getCacheData("ls" . $number);
if ($cache_content != 'not_found') {
    $arCacheData = json_decode($cache_content, true);
    $arCacheData = timeOutCheck($arCacheData);
}
var_dump($arCacheData);
if (preg_match("~(1?.?\\s?read more\$|1?.?\\s?next ?page\$)~i", $spell_checked)) {
    echo "<br>Matched for read more";
    $req = "more";
    $numeric_in = 1;