Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 52.14.213.73
<?php
function saveexperiencedetails($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = stripslashes($aobj_context->mobj_data["appno"]);
$funivname = stripslashes($aobj_context->mobj_data["funivname"]);
$fdegncode = stripslashes($aobj_context->mobj_data["fdegncode"]);
$ffromdate = stripslashes($aobj_context->mobj_data["ffromdate"]);
$fstatus = stripslashes($aobj_context->mobj_data["fstatus"]);
$query = "delete from expdetl
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'present'";
$results =$aobj_context->mobj_db->Execute($query);
$query = "insert into expdetl(fuserid,fappno,funivname,fdegncode,fstatus,ffromdate,fenttype)
values('{$userid}','{$appno}','{$funivname}','{$fdegncode}','{$fstatus}',DATE_FORMAT(str_to_date('{$ffromdate}','%d/%m/%Y'),'%Y-%m-%d'),'present')";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$arr='Updated Successfuly';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr='Insertion Failed';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
function loadresearchdetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$userid = $_SESSION['userid'];
$appno = stripslashes($aobj_context->mobj_data["appno"]);
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcphd'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid1_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA1' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA1' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA2' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA3' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA4' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA5' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA6' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA7' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA31' value = '{$value[fjournalno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA8' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA8' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA9' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA10' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA32' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcoth'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table2 ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table2.="<tr style = 'width:90%'>";
$table2.="<td>";
$table2.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid2_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA11' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA11' name='fulltimeexp'>";
$table2.="</td>";
$table2.="<td>";
$table2.="<input type='text' style='width:90%;' disabled id = '{$i}RA12' value = '{$value[ftitle]}'/>";
$table2.="</td>";
$table2.="<td>";
$table2.="<input type='text' style='width:90%;' disabled id = '{$i}RA13' value = '{$value[fjournalname]}' />";
$table2.="</td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA14' value = '{$value[fyear]}'></td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA15' value = '{$value[fvolno]}' /></td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA16' value = '{$value[fpageno]}' /></td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA17' value = '{$value[fissnno]}' /></td>";
$table2.="<td><input type = 'hidden' id = '{$i}HRA18' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA20' value = '{$value[ffauthorname]}' /></td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA19' value = '{$value[fimpfact]}' /></td>";
$table2.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[fenclosureno]}' /></td>";
$table2.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch2(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch2(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table2.="</tr>";
$i++;
}
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as flevelname,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fautaddrs,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj'";
$results = $aobj_context->mobj_db->getAll($query);
//var_dump($query);
$i = 2;
$table3 ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table3.="<tr style = 'width:90%'>";
$table3.="<td>";
$table3.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid3_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA20' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA20' name='fulltimeexp'>";
$table3.="</td>";
$table3.="<td>";
$table3.="<input type='text' style='width:90%;' disabled id = '{$i}RA21' value = '{$value[ftitle]}'/>";
$table3.="</td>";
$table3.="<td>";
$table3.="<input type='text' style='width:90%;' disabled id = '{$i}RA22' value = '{$value[fjournalname]}' />";
$table3.="</td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA23' value = '{$value[fyear]}'></td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA24' value = '{$value[fpageno]}' /></td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA25' value = '{$value[fissnno]}' /></td>";
//$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA26' value = '{$value[frefereed]}' /></td>";
//$table3.="<td><input type = 'hidden' id = '{$i}HRA27' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA27' value = '{$value[flevelname]}' /></td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA28' value = '{$value[fautaddrs]}' /></td>";
$table3.="<td><input type = 'hidden' id = '{$i}HRA29' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA29' value = '{$value[ffauthorname]}' /></td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA30' value = '{$value[fpoints]}' /></td>";
$table3.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[fenclosureno]}' /></td>";
$table3.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch3(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch3(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table3.="</tr>";
$i++;
}
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as fflevelname,
fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj1'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table4 ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table4.="<tr style = 'width:90%'>";
$table4.="<td>";
$table4.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid4_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA32' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA32' name='fulltimeexp'>";
$table4.="</td>";
$table4.="<td>";
$table4.="<input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[ftitle]}'/>";
$table4.="</td>";
$table4.="<td>";
$table4.="<input type='text' style='width:90%;' disabled id = '{$i}RA34' value = '{$value[fissnno]}' />";
$table4.="</td>";
$table4.="<td><input type = 'hidden' id = '{$i}HRA35' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[ffauthorname]}' /></td>";
$table4.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA36' value = '{$value[fjournalname]}' /></td>";
$table4.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA37' value = '{$value[fyear]}'></td>";
$table4.="<td><input type = 'hidden' id = '{$i}HRA38' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA38' value = '{$value[fflevelname]}' /></td>";
$table4.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA39' value = '{$value[fpoints]}' /></td>";
$table4.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch4(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch4(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table4.="</tr>";
$i++;
}
$rst['table4'] = $table4;
$rst['table3'] = $table3;
$rst['table2'] = $table2;
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
function deleteresearch4($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = trim($aobj_context->mobj_data["appno"]);
$slno = trim($aobj_context->mobj_data["slno"]);
$query = "delete from researchexp where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$slno}' and fenttype = 'rcotj1'";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as fflevelname,
fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj1'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid4_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA32' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA32' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA34' value = '{$value[fissnno]}' />";
$table.="</td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA35' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA36' value = '{$value[fjournalname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA37' value = '{$value[fyear]}'></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA38' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA38' value = '{$value[fflevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA39' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch4(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch4(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function deleteresearch3($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = trim($aobj_context->mobj_data["appno"]);
$slno = trim($aobj_context->mobj_data["slno"]);
$query = "delete from researchexp where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$slno}' and fenttype = 'rcotj'";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as flevelname,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fautaddrs,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid3_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA20' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA20' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA21' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA22' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA23' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA24' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA25' value = '{$value[fissnno]}' /></td>";
//$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA26' value = '{$value[frefereed]}' /></td>";
//$table.="<td><input type = 'hidden' id = '{$i}HRA27' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA27' value = '{$value[flevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA28' value = '{$value[fautaddrs]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA29' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA29' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA30' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch3(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch3(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function deleteresearch2($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = trim($aobj_context->mobj_data["appno"]);
$slno = trim($aobj_context->mobj_data["slno"]);
$query = "delete from researchexp where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$slno}' and fenttype = 'rcoth'";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcoth'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid2_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA11' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA11' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA12' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA13' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA14' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA15' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA16' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA17' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA18' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA20' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA19' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch2(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch2(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function deleteresearch($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = trim($aobj_context->mobj_data["appno"]);
$slno = trim($aobj_context->mobj_data["slno"]);
$query = "delete from researchexp where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$slno}' and fenttype = 'rcphd'";
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcphd'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid1_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA1' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA1' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA2' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA3' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA4' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA5' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA6' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA7' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA31' value = '{$value[fjournalno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA8' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA8' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA9' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA10' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA32' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function saveresearch($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fpublication = trim($aobj_context->mobj_data["fpublication"]);
$ftitle = trim($aobj_context->mobj_data["ftitle"]);
$fjournalname = trim($aobj_context->mobj_data["fjournalname"]);
$fyear = trim($aobj_context->mobj_data["fyear"]);
$fvolno = trim($aobj_context->mobj_data["fvolno"]);
$fpageno = trim($aobj_context->mobj_data["fpageno"]);
$fissnno = trim($aobj_context->mobj_data["fissnno"]);
$fjournalno = trim($aobj_context->mobj_data["fjournalno"]);
$fimpfact = trim($aobj_context->mobj_data["impfact"]);
$fauthor = trim($aobj_context->mobj_data["fauthor"]);
$fpoints = trim($aobj_context->mobj_data["fpoints"]);
$fenclosureno = trim($aobj_context->mobj_data["fenclosureno"]);
$RA1 = trim($aobj_context->mobj_data["RA1"]);
$appno = trim($aobj_context->mobj_data["appno"]);
if($RA1 == 'I')
{
$query = "insert into researchexp(fuserid,fappno,fpublication,ftitle,fjournalname,fyear,fvolno,fpageno,fissnno,fjournalno,fimpfact,fauthor,fpoints,fenclosureno,fenttype)
values('{$userid}','{$appno}','{$fpublication}','{$ftitle}','{$fjournalname}','{$fyear}','{$fvolno}','{$fpageno}'
,'{$fissnno}','{$fjournalno}','{$fimpfact}','{$fauthor}','{$fpoints}','{$fenclosureno}','rcphd')";
$results = $aobj_context->mobj_db->Execute($query);
}
else
{
$query = "update researchexp set fpublication = '{$fpublication}',ftitle = '{$ftitle}',
fjournalname = '{$fjournalname}',fyear = '{$fyear}',fvolno ='{$fvolno}',fjournalno = '{$fjournalno}',
fpageno='{$fpageno}',fissnno = '{$fissnno}',fimpfact = '{$fimpfact}',
fauthor = '{$fauthor}',fpoints = '{$fpoints}',fenclosureno = '{$fenclosureno}'
where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$RA1}'";
$results = $aobj_context->mobj_db->Execute($query);
}
//var_dump($query);
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcphd'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid1_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA1' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA1' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA2' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA3' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA4' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA5' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA6' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA7' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA31' value = '{$value[fjournalno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA8' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA8' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA9' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA10' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA32' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}else
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fjournalno,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcphd'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid1_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA1' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA1' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA2' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA3' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA4' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA5' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA6' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA7' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA31' value = '{$value[fjournalno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA8' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA8' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA9' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA10' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA32' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function saveresearch2($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fpublication = trim($aobj_context->mobj_data["fpublication"]);
$ftitle = trim($aobj_context->mobj_data["ftitle"]);
$fjournalname = trim($aobj_context->mobj_data["fjournalname"]);
$fyear = trim($aobj_context->mobj_data["fyear"]);
$fvolno = trim($aobj_context->mobj_data["fvolno"]);
$fpageno = trim($aobj_context->mobj_data["fpageno"]);
$fissnno = trim($aobj_context->mobj_data["fissnno"]);
$fimpfact = trim($aobj_context->mobj_data["fimpfact"]);
$fauthor = trim($aobj_context->mobj_data["fauthor"]);
$fenclosureno = trim($aobj_context->mobj_data["fenclosureno"]);
//$fpoints = trim($aobj_context->mobj_data["fpoints"]);
$RA1 = trim($aobj_context->mobj_data["RA1"]);
$appno = trim($aobj_context->mobj_data["appno"]);
if($RA1 == 'I')
{
$query = "insert into researchexp(fuserid,fappno,fpublication,ftitle,fjournalname,fyear,fvolno,fpageno,fissnno,fimpfact,fauthor,fpoints,fenclosureno,fenttype)
values('{$userid}','{$appno}','{$fpublication}','{$ftitle}','{$fjournalname}','{$fyear}','{$fvolno}','{$fpageno}'
,'{$fissnno}','{$fimpfact}','{$fauthor}','{$fpoints}','{$fenclosureno}','rcoth')";
$results = $aobj_context->mobj_db->Execute($query);
}
else
{
$query = "update researchexp set fpublication = '{$fpublication}',ftitle = '{$ftitle}',
fjournalname = '{$fjournalname}',fyear = '{$fyear}',fvolno ='{$fvolno}',fenclosureno = '{$fenclosureno}',
fpageno='{$fpageno}',fissnno = '{$fissnno}',fimpfact = '{$fimpfact}',
fauthor = '{$fauthor}',fpoints = '{$fpoints}'
where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$RA1}'";
$results = $aobj_context->mobj_db->Execute($query);
}
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcoth'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid2_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA11' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA11' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA12' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA13' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA14' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA15' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA16' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA17' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA18' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA20' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA19' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch2(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch2(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}else
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcoth'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid2_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA11' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA11' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA12' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA13' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA14' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA15' value = '{$value[fvolno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA16' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA17' value = '{$value[fissnno]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA18' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA20' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA19' value = '{$value[fimpfact]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch2(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch2(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function saveresearch3($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fpublication = trim($aobj_context->mobj_data["fpublication"]);
$ftitle = trim($aobj_context->mobj_data["ftitle"]);
$fjournalname = trim($aobj_context->mobj_data["fjournalname"]);
$fyear = trim($aobj_context->mobj_data["fyear"]);
$fenclosureno = trim($aobj_context->mobj_data["fenclosureno"]);
$fpageno = trim($aobj_context->mobj_data["fpageno"]);
$fissnno = trim($aobj_context->mobj_data["fissnno"]);
//$frefereed = trim($aobj_context->mobj_data["frefereed"]);
$fautaddrs = trim($aobj_context->mobj_data["fautaddrs"]);
$fauthor = trim($aobj_context->mobj_data["fauthor"]);
$fpoints = trim($aobj_context->mobj_data["fpoints"]);
$RA1 = trim($aobj_context->mobj_data["RA1"]);
$appno = trim($aobj_context->mobj_data["appno"]);
if($RA1 == 'I')
{
$query = "insert into researchexp(fuserid,fappno,fpublication,ftitle,fjournalname,fyear,flevel,fpageno,fissnno,frefereed,fautaddrs,fauthor,fpoints,fenclosureno,fenttype)
values('{$userid}','{$appno}','{$fpublication}','{$ftitle}','{$fjournalname}','{$fyear}','{$flevel}','{$fpageno}'
,'{$fissnno}','{$frefereed}','{$fautaddrs}','{$fauthor}','{$fpoints}','{$fenclosureno}','rcotj')";
$results = $aobj_context->mobj_db->Execute($query);
}
else
{
$query = "update researchexp set fpublication = '{$fpublication}',ftitle = '{$ftitle}',
fjournalname = '{$fjournalname}',fyear = '{$fyear}',flevel ='{$flevel}',
fpageno='{$fpageno}',fissnno = '{$fissnno}',fautaddrs = '{$fautaddrs}',
fauthor = '{$fauthor}',fpoints = '{$fpoints}',frefereed = '{$frefereed}',fenclosureno = '{$fenclosureno}'
where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$RA1}'";
$results = $aobj_context->mobj_db->Execute($query);
}
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as flevelname,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fautaddrs,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid3_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA20' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA20' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA21' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA22' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA23' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA24' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA25' value = '{$value[fissnno]}' /></td>";
//$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA26' value = '{$value[frefereed]}' /></td>";
//$table.="<td><input type = 'hidden' id = '{$i}HRA27' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA27' value = '{$value[flevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA28' value = '{$value[fautaddrs]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA29' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA29' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA30' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch3(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch3(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}else
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as flevelname,
fvolno,fpageno,fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints,fimpfact,fautaddrs,fenclosureno
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid3_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA20' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA20' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA21' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA22' value = '{$value[fjournalname]}' />";
$table.="</td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA23' value = '{$value[fyear]}'></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA24' value = '{$value[fpageno]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA25' value = '{$value[fissnno]}' /></td>";
//$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA26' value = '{$value[frefereed]}' /></td>";
//$table.="<td><input type = 'hidden' id = '{$i}HRA27' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA27' value = '{$value[flevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA28' value = '{$value[fautaddrs]}' /></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA29' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA29' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA30' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[fenclosureno]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch3(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch3(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
function saveresearch4($aobj_context)
{
session_start();
$userid = $_SESSION['userid'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fpublication = trim($aobj_context->mobj_data["fpublication"]);
$ftitle = trim($aobj_context->mobj_data["ftitle"]);
$fjournalname = trim($aobj_context->mobj_data["fjournalname"]);
$fyear = trim($aobj_context->mobj_data["fyear"]);
$fissnno = trim($aobj_context->mobj_data["fissnno"]);
$flevel = trim($aobj_context->mobj_data["flevel"]);
$fauthor = trim($aobj_context->mobj_data["fauthor"]);
$fpoints = trim($aobj_context->mobj_data["fpoints"]);
$RA1 = trim($aobj_context->mobj_data["RA1"]);
$appno = trim($aobj_context->mobj_data["appno"]);
if($RA1 == 'I')
{
$query = "insert into researchexp(fuserid,fappno,fpublication,ftitle,fjournalname,fyear,fissnno,flevel,fauthor,fpoints,fenttype)
values('{$userid}','{$appno}','{$fpublication}','{$ftitle}','{$fjournalname}','{$fyear}'
,'{$fissnno}','{$flevel}','{$fauthor}','{$fpoints}','rcotj1')";
$results = $aobj_context->mobj_db->Execute($query);
}
else
{
$query = "update researchexp set fpublication = '{$fpublication}',ftitle = '{$ftitle}',
fjournalname = '{$fjournalname}',fyear = '{$fyear}',
fissnno = '{$fissnno}',flevel = '{$flevel}',
fauthor = '{$fauthor}',fpoints = '{$fpoints}'
where fuserid = '{$userid}' and fappno = '{$appno}' and fslno = '{$RA1}'";
$results = $aobj_context->mobj_db->Execute($query);
}
if($results)
{
$query = "select fslno,fpublication,r1.freasonname as fpublicationname, ftitle,fjournalname,fyear,flevel,r3.freasonname as fflevelname,
fissnno,frefereed,r2.freasonname as ffauthorname, fauthor,fpoints
from researchexp
left join reason r1 on researchexp.fpublication = r1.freasoncode
left join reason r2 on researchexp.fauthor = r2.freasoncode
left join reason r3 on researchexp.flevel = r3.freasoncode
where fuserid = '{$userid}' and fappno = '{$appno}' and fenttype = 'rcotj1'";
$results = $aobj_context->mobj_db->getAll($query);
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid4_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA32' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA32' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA34' value = '{$value[fissnno]}' />";
$table.="</td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA35' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA36' value = '{$value[fjournalname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA37' value = '{$value[fyear]}'></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA38' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA38' value = '{$value[fflevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA39' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch4(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch4(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}else
{
$i = 2;
$table ='';
foreach($results as $value)
{
$slno = $value[fslno];
$table.="<tr style = 'width:90%'>";
$table.="<td>";
$table.="<input type = 'hidden' value = '{$value[fslno]}' id='rechid4_{$i}'/><input type='hidden' style='width:90%;' disabled value = '{$value[fpublication]}' id = '{$i}HRA32' name='fulltimeexp'><input type='text' style='width:90%;' disabled value = '{$value[fpublicationname]}' id = '{$i}RA32' name='fulltimeexp'>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA33' value = '{$value[ftitle]}'/>";
$table.="</td>";
$table.="<td>";
$table.="<input type='text' style='width:90%;' disabled id = '{$i}RA34' value = '{$value[fissnno]}' />";
$table.="</td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA35' value = '{$value[fauthor]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA35' value = '{$value[ffauthorname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA36' value = '{$value[fjournalname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA37' value = '{$value[fyear]}'></td>";
$table.="<td><input type = 'hidden' id = '{$i}HRA38' value = '{$value[flevel]}' ><input type='text' style='width:90%;' disabled id = '{$i}RA38' value = '{$value[fflevelname]}' /></td>";
$table.="<td><input type='text' style='width:90%;' disabled id = '{$i}RA39' value = '{$value[fpoints]}' /></td>";
$table.="<td><input type='submit' class='btn btn_3 btn btn-info' value = 'Edit' onclick = 'editresearch4(\"$slno\",\"$i\")' id='{$i}BT9' style='width:90%;' ><br><br><input type='submit' value = 'delete' class='btn btn_3 btn btn-danger' onclick = 'deleteresearch4(\"$slno\",\"$i\")' id='{$i}BT10' style='width:90%;' ></td>";
$table.="</tr>";
$i++;
}
$rst['table'] = $table;
echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
}
}
?>
|