Jump to content

kairno

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Everything posted by kairno

  1. http://htmlgoodies.com/ started with this one... some nice examples also http://www.tizag.com/ nice site, very nice
  2. this is the source of the homepage : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv=Content-Type content="text/html; charset=UTF-8"> <script language=javascript src=var.js></script> <script language=javascript src=common.js></script> <script>CONTENT_PAGE="main.htm";InitLoad();</script> <script>WriteHtmlHead(null,null,null,"CallOnUnload","CallOnResize");</script><OBJECT CLASSID="CLSID:F47E687B-551F-4043-89B3-F6E3F5DAD01E" CODEBASE="/VDControl.CAB#version=1,0,2,8" width=0 height=0></OBJECT> <script>var tick=0;var xhttp=null;var daylight="1";var audioSupport="1";var useActiveX="0";var timerID=null;var timeFormat=parseInt("0");var camDate;var imagesource="1";var timerID2=null;var mySize=new SIZE(g_viewXSize,g_viewYSize);var DCL_1={zoom:"1",width:"<%jpegxsize.1%>",height:"<%jpegysize.1%>"};var DCL_2={zoom:"1",width:"<%jpegxsize.2%>",height:"<%jpegysize.2%>"};var DCL_3={zoom:"1",width:"<%jpegxsize.3%>",height:"<%jpegysize.3%>"};var DCL_4={zoom:"1",width:"<%jpegxsize.4%>",height:"<%jpegysize.4%>"};if(Is2114()){DCL_1.height*=2;DCL_2.height*=2;DCL_3.height*=2;DCL_4.height*=2;} if(IsMpeg4()){AddLightBtn("audioBtn",-100,-100,15,18,"on.gif","off.gif",AudioProcess,GL("audio_switch"));AddLightBtn("recBtn",-100,-100,15,18,"onRec.gif","offRec.gif",RecProcess,GL("record_switch"));AddLightBtn("speedBtn",-100,-100,15,18,"lowSpeed.gif","highSpeed.gif",SpeedProcess,GL("speed_switch"));} function SIZE(w,h){this.w=parseInt(w);this.h=parseInt(h);} function AudioProcess(){StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));} function RecProcess(){if(IsMpeg4()){var ctrl=GE(AxID);if(ctrl!=null){if(GetLight("recBtn")==1){var y,M,d,h,m,s;y=FixNum(camDate.getYear(),2);M=FixNum(camDate.getMonth()+1,2)=FixNum(camDate.getDate(),2);h=FixNum(camDate.getHours(),2);m=FixNum(camDate.getMinutes(),2);s=FixNum(camDate.getSeconds(),2);var filename="Clip_D4_"+y+M+d+h+m+s+".avi";ctrl.RecordStart(filename);} else{ctrl.RecordStop();}}}} function SpeedProcess(){StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));} function ChangeDateFormat(){timeFormat++;if(timeFormat>2) timeFormat=0;} function GetCHSize(){var w=myDCL.width;var h=myDCL.height;if((w>700||w==640)&&(h==240||h==288))h*=2;return new SIZE(w,h);} function MY_CH_CHANGE(){myDCL=eval("DCL_"+g_CHID);mySize=GetCHSize();FixZoomPos();SetValue("zoomSel",myDCL.zoom);CtrlSizeChange(0,0,mySize.w*myDCL.zoom,mySize.h*myDCL.zoom);} function MY_ONLOAD(){var obj=GE("viewCHSel");if(obj!=null){obj.options[0].text="ALL";} LoadClock();CallOnResize();SetLight("audioBtn",0);SetLight("recBtn",0);SetLight("speedBtn",0);if(useActiveX==1||IsMpeg4()){if(IsVS()){if(g_CHID==0){for(var i=1;i<=g_maxCH;i++){StartActiveXEx(0,0,i,i);}} else{MY_CH_CHANGE();}} else{StartActiveXEx(GetLight("speedBtn"),GetLight("audioBtn"));}} else{imgFetcher.RunDms();} g_lockLink=false;} function MY_ONUNLOAD(){clearTimeout(timerID);clearTimeout(timerID2);StopActiveX();var obj=GE("viewCHSel");if(obj!=null){obj.options[0].text="---";}} function MY_ONRESIZE(){FixButtonPos();} function GetZoomHtml(){var o='';o+='<div id="zoomLayer" class="cssViewChLayer">';o+='</div>';return o;} function GetZoomCtx(){var o='';o+=GL('zoom')+': ';o+="<select onChange='ZoomChange(this.value)' id='zoomSel' class='m1'>";o+="<option value='1' selected >1X</option>";if(mySize.w<600)o+="<option value='2' >2X</option>";if(mySize.w<300)o+="<option value='4' >4X</option>";o+="</select>";return o;} function ZoomChange(z){z=parseInt(z);if(IsVS()){myDCL.zoom=z;CtrlSizeChange(0,0,mySize.w*z,mySize.h*z);} else{CtrlSizeChange(GetLight("speedBtn"),GetLight("audioBtn"),mySize.w*z,mySize.h*z);}} function CtrlSizeChange(iframe,audio,w,h){var exID=(IsVS()?"1":"");var ax=(IsMpeg4()||useActiveX==1);try{GE(AxID+exID).ForceStop();GE(AxID+exID).width=w;GE(AxID+exID).height=h;}catch(e){};if(ax){timerID2=setTimeout("StartActiveXEx("+iframe+","+audio+(IsVS()?",g_CHID,1":"")+")",500);}} function FixZoomPos(){var halfWidth=document.body.offsetWidth/2;var obj=GE("zoomLayer");if(obj!=null){if((IsVS()&&g_CHID==0)||(mySize.w>=600)){obj.style.left=-600;} else{obj.style.left=halfWidth+70;obj.style.top=40;obj.innerHTML=GetZoomCtx();}}} function FixButtonPos(){var halfWidth=document.body.offsetWidth/2;SetLightPos("audioBtn",halfWidth+280,10);SetLightPos("recBtn",halfWidth+340,10);SetLightPos("speedBtn",halfWidth+310,10);var obj=GE("timeLayer");if(obj!=null){obj.style.left=halfWidth-140;} FixZoomPos();} function LoadClock(){xhttp=InitXHttp();xhttp.onreadystatechange=OnReadyClockProcess;try{xhttp.open("GET","datetime.htm",true);xhttp.send(null);}catch(e){};} function OnReadyClockProcess(){if(xhttp.readyState==4&&xhttp.status==200){camDate=new Date(xhttp.responseText);RunClock();}} function RunClock(){if(tick>150){tick=0;LoadClock();} else{ShowClock();timerID=setTimeout("RunClock()",1000);camDate.setTime(camDate.getTime()+1000);} tick++;} function ShowClock(){var o=GiveMeDateTimeString(camDate,timeFormat,daylight);if(daylight!=1){o=" "+o;} GE("currentCameraTime").value=o;} DW(GetZoomHtml());</script> <div id=timeLayer class=cssTimerLayer align=right> <a href="javascript:ChangeDateFormat()" onMouseMove="WS(GL('click_to_change_mode'));" onMouseLeave="WS();"> <input id=currentCameraTime class=watch alt='{$click_to_change_mode}' disabled size=24> </a></div> <center> <script>var o="";if(IsVS()){useActiveX=1;} if(IsMpeg4()||useActiveX==1){if(IsVS()){if(g_CHID==0){o+="<table><tr><td>";o+=GetTagAX1AndFixSize(1);o+="</td><td>";o+=GetTagAX1AndFixSize(2);o+="</td></tr><tr><td>";o+=GetTagAX1AndFixSize(3);o+="</td><td>";o+=GetTagAX1AndFixSize(4);o+="</td></tr></table>";} else{o+="<table ><tr><td height='480' valign='middle'>";o+=GetTagAX1AndFixSize(1);o+="</td><td></table>";}} else{o+="<table ><tr><td height='480' valign='middle'>";o+=GetTagAX1AndFixSize();o+="</td><td></table>";}} else{DW('<table ><tr><td height="480" valign="middle" ><table bordercolor="#99CCFF" border="3"><tr><td>');DW(imgFetcher.GetDmsImgStr("<%jpegxsize%>","<%jpegysize%>"));DW("</td></tr></table></td></tr></table>");} DW(o);</script> <script>ALC();</script> <script>WriteBottom();</script></html> found out how to connect to the cameras with vlc : http://user:pass@ip/appro-cgi/mpeg4.cgi does anyone know how to connect to this link or use vlc as a server and stream from there ?
  3. the whole page is generated via javascript... it's not my strong-point... i'd use reg-ex but i really can't debug the code... also, the pages have a software that can connect to 4+ cameras, but i can't get anything to connect to them... the cameras have 3 ports open, http, ssl and annother one i forgot... since the software can connect to the cameras, i'm not sure they need a streaming server... or the software can be used as a server we have 2 models , the LC-7222E and LC-7224E the producer link is : http://www.approtech.com/product_tree.php?cPath=42_53_81 i'm stunned.. i really have no idea what to do... currently i'm researching some broadcasting solutions... but can't find any that work... any help would be appreciated...
  4. ok, i have to make a website that gets the info from our internal surveilance system... the cameras are set to show a video stream of what's happening and record when there's movement. i was thinking of streaming the video from the camera and display it. my issues : i can't connect to the cameras, either with html / php either with vlc media player, so i might do something wrong also, the camera has a website of it's own and shows the image, but i need to show more cameras in the same window, and i can't make the users open different browsers. also, the camera website gives more info than i need, so frames aren't usefull... the code i was using : <center> <object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="500" height="500" type="application/x-oleobject"> <param name="autostart" value="false"> <param name="filename" value="sample.avi"> <param name="showcontrols" value="true"> <param name="ShowStatusBar" value="true"> <embed type="application/x-mplayer2" src="sample.avi" width="500" height="500" autostart="1" showcontrols="1" showstatusbar="1"></embed> </object> <object id="MediaPlayer2" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="500" height="500" type="application/x-oleobject"> <param name="autostart"value="true"> <param name="filename" value="http://194.113.165.178"> <param name="showcontrols" value="true"> <param name="ShowStatusBar" value="true"> <EMBED src="http://194.113.165.178" width=300 height=225></EMBED> </object> <hr> <object id="MediaPlayer2" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" width="500" height="500" type="application/x-oleobject"> <param name="autostart"value="true"> <param name="filename" value="http://194.113.165.178&StreamMode=HTTP&MimeType=video/msvideo"> <param name="showcontrols" value="true"> <param name="ShowStatusBar" value="true"> <EMBED src="http://194.113.165.178:80&StreamMode=HTTP&MimeType=video/msvideo" width=300 height=225 ></EMBED> </object> <!--- BEGIN PLAYER ---> <!-- webbot bot="HTMLMarkup" startspan ----> <object ID="MediaPlayer" WIDTH="500" HEIGHT="500" CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> <param name="autoStart" value="True"> <param name="filename" value="sample.avi"> <param NAME="ShowControls" VALUE="true"> <param NAME="ShowStatusBar" VALUE="true"> <embed TYPE="application/x-mplayer2" SRC="194.113.165.178:80" NAME="MediaPlayer" WIDTH="500" HEIGHT="500" autostart="1" showcontrols="1"></embed></object> <!-- webbot bot="HTMLMarkup" endspan ----> <!--- end PLAYER ---> </object> the code with "sample.avi" works, the one with the ip doesn't... i'm guessing you'll need more info than this, so tell me what you need to know
  5. sorry for the delay happy the answer is this {as far as the latest posts on several forums } there's a software called sql-proxy it's soewhat of an interface... it can {supposedly} intercept queries and "do something" and that to me means : do the requested queries and then WRITE A FILE on the server... and that's precisely what i need. instead of requesting and doing queries on the database every second i'm only doing them when the file says there's beed activity wish me luck .. it might be just crazy enough to work Edit : i'll set the topic as solved if the sql proxy thing works
  6. Hi, i'm using Xavier Noguer's php version of John McNamara's perl excell class... my problem is : although i use a 24-bit image {they specificaly ask for one} i can't insert it into the sheet... it gives me the error : "aaa.bmp isn't a 24bit true color bitmap." i created the image in mspaint and saved it as 24-bit... has anyone encountered something like this ?
  7. @ PHP_PhREEEk found a perl script that can handle events through a unix pipe, but i have no idea on how to refresh the pages ... ajax is too resource consuming ( the code i have now ), but i'll try different codes... @pierre well... the session count might be helpfull... thanks i've been searching for a solution for this problem for about 2 weeks... but nothing...
  8. well...since it's a forum, don't you have any connection between the topic and post ? somehing like "topic_id" or something, for posts... i assume you have an unique id for the posts if you do, just ose 'select <fields> from <post table> where topic_id="<the one you're interested in>" order by ID DESC' and check the first id that shows, that is the last one inserted in the database on that topic for the page number, do a select count with with the same "where" clause, but without the "order by" and check the integer part of the result, there is a function, but i forgot it... ex : 30/20=1.5 so page number 1 {assuming you start from page 0, if not, just add "1" to the result}
  9. you can do a javascript check and see if there are any empty fields... then point them out before you send the page...
  10. Well... all you can do as far as i see it is to check if the value is over 60 ... but then again 60 miles is a long way... you could do a page that writes the info they passed so they can validate it... otherwise i don't know any way of checking...
  11. that i know... i was wondering if there's a way to "tell" the script to check the database >only< when an event occurs {a user loggs in / out} the issue is that the application i'm developing is more complex than a forum , and i need to update a page when an event occurs on the database, and not check it every second ... just to pin-point the issue i'm having ...
  12. as i said, i didn't understand the problem.. sorry
  13. you know the online user feature in the forums.. i need to make something like that but almost real-time. i now have an ajax script that checks the database every second, as you know it's not efective, and also take s about 405 of my cpu for 1 user... i'd like to know if there's a way to lower the cpu usage... any and all help will be appreciated...
  14. from http://www.php.net/preg_replace Example#5 Strip whitespace This example strips excess whitespace from a string. <?php $str = 'foo o'; $str = preg_replace('/\s\s+/', ' ', $str); // This will be 'foo o' now echo $str; ?> not sure if i understood you rignt, you want to insert the data you take from a database into a csv. the function works, tested it. now you can do a str_replace(" ","<your delimiter>","$string) and write it into the csv... if i understood wrong, please correct me
  15. Hi, i doubt the title is very explicit so here's what i want to do : i have an SQL database {MySQL to be precise} and i want to update a queue in a page without constantly query-ing the database, i'm using ajax now, but the traffic on the server is killing me... in short : a new user visits my site the event is transmitted to a perl script through an unix pipe the perl script inserts data in my database an ajax script checks the database every secont for new users and updates a queue line for some admins as far as i can see it, the best way to acheve the updated list is to have the ajax script check the database on a certain event..but i have no idea on how to do this... as you can see, executing a query every second for every logged admin is not the best solution.. but i don't know any other...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.