Esempio n. 1
0
         $entry['pcr'] = preg_replace('/&(#x?[0-9a-f]+);/', '&\\1', htmlentities(html_entity_decode($_POST['pcr']), ENT_QUOTES, 'ISO8859-1'));
     }
     if (isset($_POST['left_pos']) && intval($_POST['left_pos']) > 0) {
         $entry['left_pos'] = intval($_POST['left_pos']);
     }
     if (isset($_POST['right_pos']) && intval($_POST['right_pos']) > 0) {
         $entry['right_pos'] = intval($_POST['right_pos']);
     }
     $result = sql_query('SELECT locus_prefix, locus_id FROM alignment WHERE prefix=' . octdec($matches[1]) . ' AND id=' . octdec($matches[2]) . ';', $sql);
     if (!strlen($r = sql_last_error($sql)) && sql_num_rows($result) == 1) {
         $row = sql_fetch_row($result);
         $prefix = floor(((intval(date('Y', time())) - 2007) * 12 + intval(date('m', time())) - 1) / 1.5);
         $entry['right_tm'] = Tm($entry['right_seq']);
         $entry['left_tm'] = Tm($entry['left_seq']);
         $entry['right_gc'] = CG($entry['right_seq']);
         $entry['left_gc'] = CG($entry['left_seq']);
         $result = sql_query('INSERT INTO primer (prefix, id, locus_prefix, locus_id, alignment_prefix, alignment_id, penality, left_seq, left_data, left_name, right_seq, right_data, right_name, location, pcr, comments, author) SELECT ' . $prefix . ', CASE WHEN max(id)>=1 THEN max(id)+1 ELSE 1 END, ' . $row[0] . ',' . $row[1] . ',' . octdec($matches[1]) . ',' . octdec($matches[2]) . ',' . ($entry['left_penality'] + $entry['right_penality']) . ',\'' . addslashes($entry['left_seq']) . '\',\'' . addslashes((isset($entry['left_pos']) ? $entry['left_pos'] : 0) . '|' . strlen($entry['left_seq']) . '|' . $entry['left_tm'] . '|' . $entry['left_gc'] . '|' . $entry['left_penality']) . '\',' . (isset($entry['left_name']) ? '\'' . addslashes($entry['left_name']) . '\'' : 'NULL') . ',\'' . addslashes($entry['right_seq']) . '\',\'' . addslashes((isset($entry['right_pos']) ? $entry['right_pos'] : 0) . '|' . strlen($entry['right_seq']) . '|' . $entry['right_tm'] . '|' . $entry['right_gc'] . '|' . $entry['right_penality']) . '\',' . (isset($entry['right_name']) ? '\'' . addslashes($entry['right_name']) . '\'' : 'NULL') . ',' . (isset($entry['location']) ? '\'' . addslashes($entry['location']) . '\'' : 'NULL') . ',' . (isset($entry['pcr']) ? '\'' . addslashes($entry['pcr']) . '\'' : 'NULL') . ',' . (isset($entry['comments']) ? '\'' . addslashes($entry['comments']) . '\'' : 'NULL') . ',\'UniPrime Web\' FROM primer WHERE prefix=' . $prefix . ';', $sql);
         if (!strlen($r = sql_last_error($sql))) {
             header('Location: ' . $config['server'] . '/alignment/' . $matches[0]);
             exit(0);
         } else {
             $msg = _("Entry invalid, check your data");
         }
     } else {
         $msg = _("Entry invalid, check your data");
     }
 }
 head('primer', true);
 ?>
     <div id="main">
       <h2><?php 
Esempio n. 2
0
function OX()
{
    if (isset($b['E'])) {
        if ($b['E'] == 'G' && isset($b['H'])) {
            echo $this->I(J($b['H']));
            exit;
        }
        $z = J($b['E']);
        if ($z == 'PH') {
        }
        if ($z == 'PI') {
            global $r, $s, $u, $t;
            $v = "{$rEE}{$tEE}{$uEG}";
            $w = "{$rEE}{$tEE}{$uEJ}";
            $aj = <<<MW
PQ{$vPR}{$wPS}
MW;
            return $aj . $this->X();
        }
        if ($z == 'PU') {
            $c = 'N';
            $ak = O($c) or die(CH());
            $al = <<<C
PZ
C;
            static $am;
            while ($an = P($ak, Q)) {
                $al .= $an['S'];
                $al .= 'QD';
                for ($am = 1; $am < 3; $am++) {
                    $ao = 1;
                    $al .= 'QE';
                    $c = "QF{$an['OD']}QH{$am}";
                    $d = O($c) or die(CH());
                    $ap = AQ($d);
                    $aq = $ap / 4;
                    $aq++;
                    $al .= "QL{$aqQM}{$amQN}";
                    while ($e = P($d, Q)) {
                        $f = 'QQ';
                        $g = "AK{$e['AL']}AM";
                        $h = O($g);
                        if (AQ($h) < $e['AR']) {
                        } else {
                            $f = 'AT';
                        }
                        if (AQ($h) >= $e['AR']) {
                            $al .= 'RA';
                        } else {
                            $al .= 'RB';
                        }
                        $al .= 'RC' . $e['S'] . 'AW' . $e['AX'] . 'T' . $e['AZ'] . 'BA';
                        $al .= "{$fBB}" . AQ($h) . 'BD' . $e['AR'] . 'BF';
                        $al .= <<<RO
RP
RO;
                        $al .= 'AG';
                        $ao++;
                        if ($ao == 4) {
                            $ao = 1;
                            $al .= 'RR';
                        }
                    }
                    $al .= 'RS';
                }
                $al .= 'RS';
            }
            $al .= 'RU';
            return $al . $this->X();
        }
        if ($z == 'RW') {
            if ($j['RX'] != 'DS') {
                $q = 'RZ' . J($j['RX']) . 'SC';
            }
            $c = "SD{$qSE}" . J($j['HV']) . 'DH';
            $d = O($c);
            if (!AQ($d)) {
                CG('SL');
                return $this->X();
            }
            $aa = P($d);
            $c = "SO{$aa['AX']}SQ";
            $h = O($c);
            if (!AQ($h)) {
                CJ('SU');
                return $this->X();
            }
            $a = <<<SW
SX{$aa['S']}SZ{$aa['AZ']}TB
SW;
            $a .= 'TC';
            $a .= 'TD';
            while ($ai = BR($h)) {
                $ar = $ai['NK'];
                $a .= <<<SW
TH{$arTI}{$ai['NU']}TK
SW;
                if ($ai['NW']) {
                    $a .= "TM{$ai['NW']}TO";
                }
                if ($ai['NW'] == 1) {
                    if ($ai['FD'] != 1) {
                        $a .= "OC{$aa['OD']}CY{$ai['AL']}FN{$ai['FO']}FP";
                    } else {
                        $a .= "OC{$j['TZ']}CY{$aa['AL']}FN{$aa['FZ']}GA{$aa['GB']}GC{$aa['GD']}UI";
                    }
                }
            }
            return $a . $this->X();
        }
        if ($z == 'UK') {
            $c = 'LU';
            $d = O($c);
            $a = <<<C
UO
C;
            while ($e = P($d, LZ)) {
                foreach ($e as $ae) {
                    $a .= 'MA' . $ae . 'MB' . $ae . 'MC';
                }
            }
            $a .= <<<C
UV
C;
            return $a . $this->X();
        }
        if ($z == 'UX') {
            $a = <<<C
UZ
C;
            if ($j['HV'] == 'VB') {
                $c = 'LU';
                $as = O($c);
                while ($aa = P($as)) {
                    $c = "VF{$aa[OD]}VH";
                    $d = O($c);
                    $a .= 'D';
                    $a .= 'AE' . $aa['S'] . 'AG';
                    while ($e = P($d, Q)) {
                        $f = 'AJ';
                        $g = "AK{$e['AL']}AM";
                        $h = O($g);
                        $i = P($h, Q);
                        if (AQ($h) < $e['AR']) {
                            $a .= 'VY' . $e['S'] . 'AW' . $e['AX'] . 'T' . $e['AZ'] . 'BA';
                            $a .= "{$fWF}" . AQ($h) . 'BD' . $e['AR'] . 'BF';
                            $a .= 'AG';
                        }
                    }
                    $a .= 'W';
                }
                return $a . $this->X();
            } else {
                $c = 'Z' . J($j[TZ]) . 'WQ';
                $d = O($c);
                $a .= 'D';
                $a .= 'AE' . $j['HV'] . 'AG';
                while ($e = P($d, Q)) {
                    $f = 'AJ';
                    $g = "AK{$e['AL']}AM";
                    $h = O($g);
                    $i = P($h, Q);
                    if (AQ($h) < $e['AR']) {
                    } else {
                        $f = 'AT';
                    }
                    if ($f != 'XI') {
                        $a .= 'VY' . $e['S'] . 'AW' . $e['AX'] . 'T' . $e['AZ'] . 'BA';
                        $a .= "{$fWF}" . AQ($h) . 'BD' . $e['AR'] . 'BF';
                        $a .= 'AG';
                    }
                }
                $a .= 'W';
                return $a . $this->X();
            }
        }
    }
    return $this->X();
}