th {padding-top:3px;padding-bottom:3px; text-align:center;color:#000; background-color:#DCDCDC;font-size:1.1em;} //td { background-color:#FFDAB9;font-size:1.0em;} td { background-color:#FFFAF0;font-size:1.0em;}
"; while(odbc_fetch_row($cnt)){ $text .=""; } $text .= "
Report Name Results
".odbc_result($cnt,"Report name")."".odbc_result($cnt,"Result")."
"; return $text; } function rep_priority(){ global $db_conn; $sql = 'select * from "WhiteListing".get_rep_per_priority() as ("Report name" character varying(250),"Result" integer) '; $cnt = odbc_exec($db_conn, $sql); $text= "
"; while(odbc_fetch_row($cnt)){ $text .=""; } $text .= "
Report Name Results
".odbc_result($cnt,"Report name")."".odbc_result($cnt,"Result")."
"; return $text; } function rep_personal($range){ global $db_conn; $login = $_SESSION['login']; set_range($range); global $from; global $to; $sql = 'select * from "WhiteListing".get_personal_rep(\''.$from.'\',\''.$to.'\') as( "Analist" character varying, "Sha1_SiteNotFound" integer, "Sha1_Undecided" integer, "Sha1_Safe" integer,"Sha1_Reffered" integer, "Sha1_SiteInActive" integer,"AVlab" integer)'; $cnt = odbc_exec($db_conn, $sql); //$sql1 = "SELECT \"UserId\", \"Login\", \"UserName\", \"Email\", \"RoleId\", \"TeamId\",\"Coments\" FROM \"WhiteListing\".\"Users\" order by \"UserId\""; //$usr1 = odbc_exec($db_conn,$sql1); $text= "
"; $text .=" "; $snf=0; $undec=0; $safe=0; $reff=0; $inactive=0; $avlab=0; while(odbc_fetch_row($cnt)){ $snf +=odbc_result($cnt,"Sha1_SiteNotFound"); $undec +=odbc_result($cnt,"Sha1_Undecided"); $safe +=odbc_result($cnt,"Sha1_Safe"); $reff +=odbc_result($cnt,"Sha1_Reffered"); $inactive +=odbc_result($cnt,"Sha1_SiteInActive"); $avlab +=odbc_result($cnt,"AVLab"); $text .=""; } $text .= "
Analist Name Sha1 he marked as SiteNotFound Sha1 he marked as Undecided Sha1 he marked as Safe Sha1 he marked as Reffered Sha1 he marked as SiteInActive AVLab analyst marked from Referred to Lab-Completed-Safe or Lab-Completed-Malware
".odbc_result($cnt,"Analist")." ".odbc_result($cnt,"Sha1_SiteNotFound")." ".odbc_result($cnt,"Sha1_Undecided")." ".odbc_result($cnt,"Sha1_Safe")." ".odbc_result($cnt,"Sha1_Reffered")." ".odbc_result($cnt,"Sha1_SiteInActive")." ".odbc_result($cnt,"AVLab")."
Total $snf $undec $safe $reff $inactive $avlab
"; return $text; //return $sql; } function rep_class_site($range){ global $db_conn; set_range($range); global $from; global $to; $sql = 'select (SELECT count("SiteId") FROM "WhiteListing"."Sites" where "VerdictId" = 3 and "DateLastModified" between \''.$from.'\' and \''.$to.'\') as "Safe", (SELECT count("SiteId") FROM "WhiteListing"."Sites" where "VerdictId" = 4 and "DateLastModified" between \''.$from.'\' and \''.$to.'\') as "Malware", (SELECT count("SiteId") FROM "WhiteListing"."Sites" where "VerdictId" = 1 and "DateLastModified" between \''.$from.'\' and \''.$to.'\') as "Unknown", count("SiteId") as "Referred" FROM "WhiteListing"."Sites" where "VerdictId" = 4 and "DateLastModified" between \''.$from.'\' and \''.$to.'\''; $cl_site = odbc_exec($db_conn,$sql); $text= " "; while(odbc_fetch_row($cl_site)){ $text .=""; } $text .= "
Safe Malware Unknown Referred
".odbc_result($cl_site,"Safe")." ".odbc_result($cl_site,"Malware")." ".odbc_result($cl_site,"Unknown")." ".odbc_result($cl_site,"Referred")."
"; return $text; } function set_rep_personal(){ return "
Analist Name Sha1 he marked as SiteNotFound Sha1 he marked as Undecided Sha1 he marked as Safe Sha1 he marked as Reffered Sha1 he marked as SiteInActive AVLab analyst marked from Referred to Lab-Completed-Safe or Lab-Completed-Malware
"; } function set_rep_class_site(){ return "
Safe Malware Unknown Referred
"; } function lab_head(){ $text = "
LAB STATUS
"; return $text; } function crwl_head(){ $text = "
CRAWLER STATUS
"; return $text; } function rep_head($who){ $text = " "; switch ($who){ case 'user': // $text .="get_user_reports()"; break; case 'class_site': // $text .="get_site_class()"; break; case 'all_site': // $text .="get_all_site()"; break; case 'site_stat_chg': $text .=""; break; } $text .="
Lab/Crawler status changes  "; } function search_sha1_head(){ return "
"; } function set_search_sha1(){ return " "; } function search_sha1($sha1){ global $db_conn; $sql = "SELECT \"SiteURL\", \"PriorityDesc\" as \"Source\", \"VerdictDesc\", \"SiteId\", (select \"Login\" from \"WhiteListing\".\"Users\" where \"UserId\"=\"UserAdded\" )as \"User Added\", \"Sites\".\"DateAdded\", \"Sites\".\"Comments\" FROM \"WhiteListing\".\"FileSource\" join \"WhiteListing\".\"Sites\" as \"Sites\" using(\"SiteId\") join \"WhiteListing\".\"Verdicts\" using (\"VerdictId\") join \"WhiteListing\".\"Prioritytes\" using (\"PriorityId\") where \"SHA1\" ='$sha1'"; $site = odbc_exec($db_conn,$sql); $text = "
Site Name Source Verdict User Added Data Added Comments
"; while(odbc_fetch_row($site)){ $text .=""; $text .=""; $text .=""; $text .=""; $text .=""; $text .=""; } $text .="
Site Name Source Verdict User Added Data Added Comments
".odbc_result($site,"SiteURL")."".odbc_result($site,"Source")."".odbc_result($site,"VerdictDesc")."".odbc_result($site,"User Added")."".odbc_result($site,"DateAdded")."".odbc_result($site,"Comments")."
"; return $text; } ?>