コード例 #1
0
ファイル: icrtrain.php プロジェクト: ddrmoscow/queXF
    $desc = T_("Chars") . " {$ccs} " . T_("from") . " " . $qd['description'];
    $db->StartTrans();
    //Generate KB from posted text
    $sql = "INSERT INTO ocrkb (kb,description)\r\n\t\tVALUES (NULL,'{$desc}')";
    $db->Execute($sql);
    $kb = $db->Insert_ID();
    $sql = "SELECT '{$kb}',b.bid as bid, c.val, f.fid, c.vid \r\n\t\tFROM formboxverifychar as c\r\n\t\tJOIN boxes as b ON (b.bid = c.bid)\r\n\t\tJOIN formpages as f ON (f.fid = c.fid AND f.pid = b.pid)\r\n\t\tJOIN boxgroupstype as bg ON (bg.bgid = b.bgid and (bg.btid = 3 or bg.btid = 4))\r\n\t\tJOIN forms AS fm ON fm.fid = f.fid\r\n\t\tLEFT JOIN ocrtrain as oc ON (oc.fid = f.fid AND oc.vid = c.vid AND oc.bid = b.bid)\r\n\t\tWHERE fm.qid = '{$qid}'\r\n\t\t{$verifiers}\r\n\t\t{$chars}\r\n\t\tAND oc.ocrtid IS NULL";
    $rs = $db->GetAll($sql);
    foreach ($rs as $r) {
        $sql = "INSERT INTO ocrprocess (kb,bid,val,fid,vid)\r\n\t\t\tVALUES ('{$kb}','{$r['bid']}','{$r['val']}','{$r['fid']}','{$r['vid']}')";
        $db->Execute($sql);
    }
    $db->CompleteTrans();
    //Now start process and die
    include_once "../functions/functions.process.php";
    $pid = start_process(realpath(dirname(__FILE__) . "/processicr.php") . " {$kb}", 2);
    print "<a href='icrmonitor.php?p='{$pid}'>" . T_("Started training process") . "</a>";
    //link to monitor ICR process
} else {
    if (isset($_GET['char'])) {
        $char = $_GET['char'];
        $qid = intval($_GET['qid']);
        $verifiers = " AND (";
        $vv = 0;
        foreach ($_GET as $key => $val) {
            if (substr($key, 0, 4) == 'vid_') {
                $vv = 1;
                $verifiers .= " fm.assigned_vid = {$val} OR";
            }
        }
        if ($vv) {
コード例 #2
0
ファイル: import.directory.php プロジェクト: ddrmoscow/queXF
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *	
 *	You should have received a copy of the GNU General Public License
 *	along with queXF; if not, write to the Free Software
 *	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
include "../functions/functions.import.php";
include "../functions/functions.xhtml.php";
include "../functions/functions.process.php";
if (isset($_POST['dir']) && isset($_POST['watch'])) {
    $dir = $_POST['dir'];
    //start watching process
    start_process(realpath(dirname(__FILE__) . "/process.php") . " {$dir}");
}
$p = is_process_running();
if ($p) {
    if (isset($_GET['kill'])) {
        kill_process($p);
    }
    if (isset($_GET['force_kill'])) {
        end_process($p);
    }
    xhtml_head(T_("Import a directory of PDF files"), true, array("../css/table.css"), false, false);
    print "<h1>" . T_("Process") . " {$p} " . T_("running...") . "</h1>";
    if (is_process_killed($p)) {
        print "<h3>" . T_("Kill signal sent: Please wait...") . "</h3>";
        print "<p><a href='?force_kill'>" . T_("Mark the proces as killed (i.e. when the server is rebooted)") . "</a></p>";
    } else {
コード例 #3
0
ファイル: startvoipprocess.php プロジェクト: ddrmoscow/queXS
 * 
 */
if (php_sapi_name() !== "cli") {
    die;
}
/**
 * Configuration file
 */
include realpath(dirname(__FILE__) . "/../config.inc.php");
/**
 * Database file
 */
include realpath(dirname(__FILE__) . "/../db.inc.php");
/**
 * Process
 */
include realpath(dirname(__FILE__) . "/../functions/functions.process.php");
//end any other process
$p = is_process_running(2);
if ($p) {
    kill_process($p);
    end_process($p);
}
start_process(realpath(dirname(__FILE__) . "/../admin/systemsortprocess.php"), 2);
$p = is_process_running();
if ($p) {
    kill_process($p);
    end_process($p);
}
start_process(realpath(dirname(__FILE__) . "/../admin/process.php"));
コード例 #4
0
ファイル: systemsort.php プロジェクト: ddrmoscow/queXS
include "../db.inc.php";
/**
 * Authentication file
 */
require "auth-admin.php";
/**
 * Process
 */
include "../functions/functions.process.php";
/**
 * XHTML functions
 */
include "../functions/functions.xhtml.php";
if (isset($_GET['watch'])) {
    //start watching process
    start_process(realpath(dirname(__FILE__) . "/systemsortprocess.php"), 2);
}
$p = is_process_running(2);
if ($p) {
    if (isset($_GET['kill'])) {
        if ($_GET['kill'] == "force") {
            end_process($p);
        } else {
            kill_process($p);
        }
        set_setting('systemsort', false);
    }
    xhtml_head(T_("Monitor system wide case sorting"), true, array("../include/bootstrap/css/bootstrap.min.css", "../css/custom.css"), false, false, false, true);
    print "<h2>" . T_("Running process:") . " {$p}</h2>";
    if (is_process_killed($p)) {
        print "<h3>" . T_("Kill signal sent: Please wait...") . "</h3>";