Autor Zpráva
anonymny
Profil *
zdravim
mam ip kameru ktora mi uklada videa na sd kartu. ja by som tieto videa obcas potreboval stiahnut. kamera sa ovlada cez webove rozhranie a videa sa stahuju po jednom. chcem sa spytat ci sa da z uvedeneho kodu prerobit aplikacia ktora by mi stiahla vsetky videa.
toto je original zdrojovy kod z kamery http://192.168.1.51/asp/recording.asp cez ktory sa to deje:

<html>
<head>
<meta http-equiv="Expires" content="Tue, 12 May 1962 1:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-type" CONTENT="text/html; charset=UTF-8">
<meta http-equiv="Content-language" CONTENT="en">
<script type="text/javascript" src="/js/function.js"></script>
<script type="text/javascript" src="/js/variable_6.js"></script>
<script>
  var cookie_language = getCookie("ipcam_language");
  if (cookie_language == "")
    cookie_language = "English";
  document.write("<scr"+"ipt type=\"text/javascript\" src=\"/js/language_" + cookie_language + ".js\"></scr"+"ipt>");
  if (cookie_language == "Persian")
    document.write("<link rel='stylesheet' type='text/css' href='/css/style_Persian.css'>");
  else
    document.write("<link rel='stylesheet' type='text/css' href='/css/style_6.css'>");
</script>
</head>
<body  class="content_style">
<form name="form" method="GET" action="/cgi-bin/admin/config.cgi" class="cssform" >
<fieldset>
<table border="1">
   <tr>
      <td style="direction:ltr; text-align:left;">
<script>
   var value = getPaddedString(language[394], 20, true);
   document.write("<font style=\"font-family:Courier New; font-size: 9pt; font-weight: bold;\">" + value + "<br>");
</script>         
         <SELECT style="direction:ltr; width:150px;" size=20 name="Recording_date" onchange="getRecordingDate(this);">
         </SELECT>
      </td>
      <td style="direction:ltr; text-align:left;">
<script>
   var value = getPaddedString(language[395], 27, true);
   value += getPaddedString(language[397], 13, true);
   value += getPaddedString(language[396], 10, true);
   document.write("<font style=\"font-family:Courier New; font-size: 9pt; font-weight: bold;\">" + value + "<br>");
</script>
         <div id="filelist">
            <select size=20 style="direction:ltr;width:500px;"></select>
         </div>
      </td>
   </tr>
   <tr>
      <td>
<script>
   document.write("<input type='button' value='" + language_button[5] + "' onclick='window.location.reload();'>");
</script>
      </td>
      <td align="center">
<script>
   document.write("<input type='button' value='" + language_button[21] + "' name='Play' onclick='RecordingPlay();'></input>");
   document.write("<input type='button' value='" + language_button[22] + "' name='Remove' onclick='RecordingRemove();'></input>");
</script>
      </td>
   </tr>
   </table>
</fieldset>
</form>
<script defer>
var index = 0;
var dateindex = 0;
var fileindex = 0;
var record;
var recordid;
var recordsize;
var recorddate;
var recordtype;
var recordinglist = new Array();
var xmlObj;

recordinglist[dateindex] = new Array();
get_recording_list();

function get_recording_list()
{
   xml_get("list.cgi?recordingid=all", test);
}
function test(xmldoc)
{
   document.form.Recording_date.length = 0;
   index = 0;
   xmlObj = xmldoc;
   setTimeout("parse_recording_list()", 1000);
}
function parse_recording_list()
{
   count = 0;   
   while (1) {
      record = xmlObj.getElementsByTagName("recording")[index];
      if (record && count < 1000) {
         recordid = record.getAttribute('recordingid');
         recordsize = record.getAttribute('size');
         recorddate = record.getAttribute('date');
         recordtype = record.getAttribute('recordingtype');
         if (recordinglist[dateindex][0] != recorddate) {
            if (dateindex != 0 || fileindex != 0) {
               dateindex++;
               recordinglist[dateindex] = new Array();
            }
            fileindex = 1;
            recordinglist[dateindex][0] = recorddate;
            document.form.Recording_date.options[document.form.Recording_date.length] = new Option(recorddate, recorddate);
         }
         value = recordid + " " + recordtype + " " + recordsize;
         label = recordid + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + recordtype + "&nbsp;&nbsp;&nbsp;" + recordsize;

         recordinglist[dateindex][fileindex] = "<option value=\"" + value + "\">" + label + "</option>";
         fileindex++;
         index++;
         count++;
      }
      else {
         break;
      }
   }

   if(record)
      setTimeout("parse_recording_list()", 1000);
}
function getRecordingDate(theSelect)
{
   var index = 1;
   var fileid;
   var arr = recordinglist[theSelect.selectedIndex];
   document.getElementById("filelist").innerHTML = "<select style=\"direction:ltr;width:500px;\" multiple=\"multiple\" size=20 id=\"Recording_file\">" + arr.join() + "</select>";
}
function RecordingPlay()
{
   if (document.form.Recording_file == null || document.form.Recording_file.selectedIndex == null)
      return;

   if(document.form.Recording_file.selectedIndex < 0)
      return;
      
   var value = document.form.Recording_file.options[document.form.Recording_file.selectedIndex].value.split(" ");
   var recordid = value[0];
   var cgi = "play.cgi?recordingid=" + value[0];
   var someFeatures = 'scrollbars=yes,toolbar=0,location=no,directories=0,status=0,menubar=0,resizable=1,width=0,height=0';
   var aPopUpWin = window.open(cgi, '', someFeatures);
   if (navigator.appName == "Netscape") {
      aPopUpWin.focus();
   }   
}
function RecordingRemove()
{
   if (document.form.Recording_file == null || document.form.Recording_file.selectedIndex == null)
      return;

   if(document.form.Recording_file.selectedIndex < 0)
      return;
      
   var filelist = "";
   var idselect = document.getElementById("Recording_file") ;
   for(var i=idselect.length-1; i>=0; i--)
   {
      if(idselect.options[i].selected)
      {
         if (filelist.length >= 1000)
            break;
         var value = idselect.options[i].value.split(" ");
         filelist += value[0] + " ";
         idselect.options[i]=null;
      }
      
   }
   var cgi = "remove.cgi?recordingid=" + filelist;
   xml_get(cgi, null);
}
</script>
</body>
</html>

ked stlacim Play video sa mi stiahne takze to bude asi function RecordingPlay() ... nerozumiem co je v tom kode napisane a tympadom ani neviem ako to prerobit a takisto ani neviem ci mi bude aplikacia s koncovkou .asp fungovat na lokalnom kompe.
myslite ze by sa s tym dalo nieco spravit?

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: