if (!empty($data['sub'])) { foreach ($data['sub'] as $data) { echo display_entry(' ', $data, $ents); } } } echo "</table>\n"; echo import_module_select_form(); echo "<hr/>\n"; case 'edit': $scid = isset($_GET['scid']) ? intval($_GET['scid']) : 0; $res = $xoopsDB->query('SELECT * FROM ' . SHORT . ' WHERE scid=' . $scid); if ($res && $xoopsDB->getRowsNum($res)) { $data = $xoopsDB->fetchArray($res); } else { $data = post_vars(); } $xoopsTpl->assign('link', $data); $xoopsTpl->assign('pscrefs', root_links(0, $scid)); $xoopsTpl->assign('active_status', explode(',', _MD_FORM_ACTIVE_VALUE)); echo $xoopsTpl->fetch("db:shortcut_register.html"); break; case 'del': $scid = intval($_GET['scid']); $res = $xoopsDB->query('SELECT cutid, url, title FROM ' . SHORT . ' WHERE scid=' . $scid); list($cutid, $url, $title) = $xoopsDB->fetchRow($res); $res = $xoopsDB->query('SELECT count(scid) FROM ' . SHORT . ' WHERE pscref=' . $scid); list($sub) = $xoopsDB->fetchRow($res); echo "<div class='confirm'><p>" . _AM_SHORTCUT_TITLE . " " . htmlspecialchars($title) . " ({$cutid})<br />" . _AM_SHORTCUT_URL . ' ' . htmlspecialchars(eval_url($url)) . "</p>"; if ($sub) { echo "<p>" . _AM_SHORTCUT_SUBLINKS . " {$sub}</p>";
<input type='hidden' name='PME_sys_rec' value='{$this->rec}'/> <input type='hidden' name='action' value='REMOVE_FILE_SEQ'/> <input type='button' name='send' value='Remove' onclick='if(confirm("Are you sure that you want to remove file, filename and sequence for this plasmid?")){this.form.submit()}else{return false;}'/> </form> EOD; } $imgurl = seq2png($plasmid->sequence, PLASMAPPER_SERVER); $plasmapper_output = <<<EOD <center> <img src="{$imgurl}"> <br/> <textarea readonly rows="10" cols="100">{$plasmid->sequence}</textarea></center> </center> EOD; $wwwblast_url = WWWBLAST_SERVER . "blast.cgi"; $resp = post_vars($wwwblast_url, array("DATALIB" => "plfeatstock_db", "PROGRAM" => "blastn", "EXPECT" => 10, "OOF_ALIGN" => 0, "OVERVIEW" => "on", "ALIGNMENT_VIEW" => 0, "DESCRIPTIONS" => 100, "ALIGNMENTS" => 50, "COLOR_SCHEMA" => 0, "SEQUENCE" => $plasmid->sequence)); $blast_output = preg_replace("/nph-viewgif.cgi/", WWWBLAST_SERVER . "nph-viewgif.cgi", $resp); } else { if ($in_edit_mode) { $add_gbgz_form = <<<EOD <div class="centered_form"> <i>Add a <b>.gb</b> or a <b>.gb.gz</b> file to this plasmid</i> <br/> <br/> <form action='' method='post' enctype='multipart/form-data'> <fieldset> <legend>Upload .gb File</legend> <input type='hidden' name='action' value='ADD_GB_GZ_FILE'/> <input type='hidden' name='PME_sys_operation' value='PME_op_Change'/> <input type='hidden' name='PME_sys_rec' value='{$this->rec}'/> <input name='userfile' type='file' size='10'/>