delphi4arab منتديات دلفي للعرب
مشروع تجاري مضاد سرقة الجهاز افكار وسورس - نسخة قابلة للطباعة

+- delphi4arab منتديات دلفي للعرب (https://delphi4arab.net/forum)
+-- قسم : منتديات دلفي الأخرى (https://delphi4arab.net/forum/forumdisplay.php?fid=4)
+--- قسم : مشاريع دلفي الجماعية (https://delphi4arab.net/forum/forumdisplay.php?fid=24)
+--- الموضوع : مشروع تجاري مضاد سرقة الجهاز افكار وسورس (/showthread.php?tid=5170)

الصفحات: 1 2 3 4 5


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 12-05-2013

  • تم تغيير نظام الدخول
  • تم تغيير نظام التسجيل
  • تم اضافة نظام ارسال كلمة المرور عند نسيانها
وتعمل حتى في الاستضافات المجانية لاني استخدمت smtp موقع روسي وهو mail.rambler.ru ; حيث الرسالة تكون html لاني قمت بتغيير headers
التجربة
[صورة: 20130512104729.jpg]
والنتيجة رسالة (html) متحوفة ههههه
[صورة: 20130512104559.jpg]


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 13-05-2013

تم تحسين نظام الدخول للبرنامج
تم اضافة تغيير نوعية الفيديو واختيار الكميرا
الاكواد المستخدمة من VFW.PAS
نظام الدخول اولا

PHP كود :
procedure TForm1.sButton1Click(Sender: TObject);
begin
  
try
    
welcom.Visible:=True;
    
welcom.SetFocus;
  if (
_command<>'password error') then begin
   tmr1
.Enabled:=True;
   
Application.ProcessMessages;
  
ShowMessage('Login successful');
   
welcom.Caption:='Login successful';
   
sButton1.Enabled:=False ;
   
welcom.Caption:='Welcome : '+sedit1.Text;
   
sButton1.Caption:='Logout'  ;
   
end else welcom.Caption:='Username or password incorrect';
   
except
     welcom
.Caption:='Cannot connect to server';
     
end;
//_uploadimg();
end; 
الثوابت

PHP كود :
//--------------------- VFW.PAS --------------------------
  
WM_CAP_DLG_VIDEOFORMAT = $0400 + 41;
  
WM_CAP_DLG_VIDEOSOURCE = $0400 + 42;
  
WM_CAP_DLG_VIDEOCOMPRESSION = $0400 + 46;
  
WM_CAP_FILE_SAVEASA = $0400 + 23;
  
//------------------------------------------------------- 
الدوال
PHP كود :
//------------------------------- VFW.PAS --------------------------------------
function  AVICapSM(hwnd: HWND; m: UINT; w: WPARAM; l: LPARAM): DWORD;
begin
if IsWindow(hwnd) then Result := SendMessage(hwnd,m,w,l)
else 
Result := 0;
end;

function 
capDlgVideoFormat(hwnd: HWND): BOOL;
begin
    Result  
:= AVICapSM(hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0) <> 0;
end;

function    
capDlgVideoSource(hwnd: HWND): BOOL;
begin
    Result  
:= AVICapSM(hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0) <> 0;
end;

function    
capDlgVideoCompression(hwnd: HWND): BOOL;
begin
    Result  
:= AVICapSM(hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0) <> 0;
end;
//------------------------------------------------------------------------------ 

الاستخدام

PHP كود :
procedure TForm1.sWebLabel10Click(Sender: TObject);
begin
  
if ConnectWebcam(0)then
capDlgVideoSource
(CaptureWindow);
end;

procedure TForm1.sWebLabel12Click(Sender: TObject);
begin
  
if ConnectWebcam(0)then
 capDlgVideoCompression
(capturewindow);
end;

procedure TForm1.sWebLabel11Click(Sender: TObject);
begin
  
if ConnectWebcam(0)then
 capDlgVideoFormat
(capturewindow);
end; 

النتيجة
[صورة: 20130513100513.jpg]


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 17-05-2013

السلام عليكم
تم اضافة الكثير
اضافة ارسال التقرير اما عبر الامايل او HTTP
اضافة GeoLiteCity لايجاد خطوط الطول والعرض ومعلومات اخرى
اضافة ايجاد ip باساخدام wmi
السورس
PHP كود :
procedure TForm1.sButton1Click(Sender: TObject);
var 
filename1,filename2:string;
begin
  
try
    
welcom.Visible:=True;
    
welcom.SetFocus;
    if 
sCheckBox1.Checked then
    begin
    welcom
.Caption:='Uploading...';

      
filename1:=titleimg('cam_');
      
filename2:=titleimg('desc_') ;
      
ConnectWebcam(0);
     
CaptureWebcam('tmp');
      
Bmp2Jpeg('tmp',filename1);
      
ScreenToFile(filename2,50, 100);
      if 
SendMessage(filename1,filename2)then
      begin
        DeleteFile
(filename1);
         
DeleteFile(filename2);
         
welcom.Caption:='Send OK.';
      
end;
      Exit;
      
end; 
الارسال
PHP كود :
function TForm1.SendMessage(_file1, _file2: string): Boolean;
begin
mail1
.UserName:=sEdit1.Text ;
mail1.Password:=sEdit2.Text ;
mail1.Mailto:='user@*****.com' ;
mail1.Subject:='Geo Lite City';
mail1.FromEmail :='user@*****.com';
mail1.body:= GeoDZ(GetListIP[0]).text+'IP Address: '+GetListIP[0] ;
mail1.Attachment1:= cdir+_file1;mail1.Attachment2:=cdir+_file2;

if 
mail1.SendMail then Result:=True;
end; 
مكون الرسال ترسل ملفين فقط متعمد
PHP كود :
unit mail;

interface

uses
  ComObj
,Classes,Windows;

  const


 {
$IFDEF NODEF}{$REGION 'Documentation'}{$ENDIF}
    
_Version = '0.1';
    
_Host = 'smtp.*****.com';
    
_Port = 465;
    
_CopyRigth = 'Copyright 2013 © All Rights Reserved to onexite';
 {
$IFDEF NODEF}{$ENDREGION}{$ENDIF}

type
  Tmail 
= class(TComponent)
  private
    
FPort      : integer;
    
FLogin     : string;
    
FPassword  : string;
    
FEmail     : string;
    
FBody      : string;
    
FHost      : string;
    
FSubject   : string;
    
Fto        : string;
    
FAttachment1: string;
    
FAttachment2: string;
    
FCopyRigth : string;
    
Factive    : Boolean;
    public
    
constructor Create(AOwner: TComponent);override;
    
destructor Destroy;override;
    function 
SendMail(): Boolean;
    protected
    function 
GetActive: Boolean; virtual;
    
procedure SetActive(const Value: Boolean); virtual;
    
published
    property UserName
: string read FLogin write FLogin;
    
property Mailto: string read fto write Fto;
    
property Subject:string Read FSubject write FSubject;
    
property Password: string read FPassword write FPassword;
    
property Host: string read FHost write FHost;
    
property FromEmail: string read FEmail write FEmail;
    
property body: string read FBody write FBody;
    
property Port: integer read FPort write FPort;
    
property Attachment1: string read FAttachment1 write FAttachment1;
    
property Attachment2: string read FAttachment2 write FAttachment2;
    
property CopyRigth :string read FCopyRigth;
    
property Test: Boolean read GetActive write SetActive default False;
end;

procedure Register;

implementation

procedure Register
;
begin
  RegisterComponents
('Mail-DZ',[Tmail]);
end;


constructor Tmail.Create(AOwner: TComponent);
begin
  inherited
;
  
FHost      :=_Host;
  
FPort      :=_Port;
  
//active     :=False;
  
fCopyRigth :=_CopyRigth
end
;

destructor Tmail.Destroy;
begin
  inherited
;
  
SetActive(False);
end;


function 
Tmail.SendMail(): Boolean;
const
_Cdo='http://schemas.microsoft.com/cdo/configuration/';
var
_Message:OleVariant;
_Config: OleVariant;
begin
  
//_Config Object
  
_Message:= CreateOleObject('CDO.Message');
  
_Config:= CreateOleObject('CDO.Configuration');
  
//
  
try
    
_Config.Fields(_Cdo+'sendusername'):= UserName;
    
_Config.Fields(_Cdo+'sendpassword'):= Password;
    
_Config.Fields(_Cdo+'sendusing'):= 2;
    
_Config.Fields(_Cdo+'smtpserver'):= Host;
    
_Config.Fields(_Cdo+'smtpserverport'):=Port;
    
_Config.Fields(_Cdo+'smtpconnectiontimeout'):= 60;
    
_Config.Fields(_Cdo+'smtpauthenticate'):= 1;
   
// _Config.Fields(_Cdo+'urlgetlatestversion'):= ;
    
_Config.Fields(_Cdo+'smtpusessl'):= True; // use SSL
    
_Config.Fields.Update;
    
_Message.Configuration:= _Config;
    
_Message.To       := Mailto;
    
_Message.From     :=FromEmail;
    
_Message.Subject  := Subject;
    if 
Attachment1 <> '' then
    _Message
.AddAttachment(Attachment1);
    if 
Attachment2 <> '' then
    _Message
.AddAttachment(Attachment2);
    
//_Message.HTMLBody := Body;   //to send in Html format
   // _Message.CreateMHTMLBody('http://www.google.com');  //to send site
    
_Message.TextBody := Body;
    try
    
_Message.Send;
    
Result:=True;
    
Except// on err:Exception do
    
Result:=False;//err.Message;
    
end;
     
  finally
    
VarClear(_Message);
    
VarClear(_Config);
  
end;
end;
function 
Tmail.GetActive: Boolean;
begin
Result
:=False;
end;

procedure Tmail.SetActive(const Value: Boolean);
begin
if Value then begin
  
if SendMail then begin
 SetActive
(False);
 
MessageBox(0,'Please Check Your Mailbox!!!', 'IMPORTANT', MB_OK);
 
end else  MessageBox(0,'Message not sent!', 'Error', MB_OK);
end
else
Exit;
end;

end. 
اما ايجاد المعلومات

PHP كود :
function  GetListIP: TStringList;
function 
GeoDZ(ip:string):TStringList;
implementation
    

function  GetListIP: TStringList;
var
  
FSWbemLocator : OLEVariant;
  
FWMIService   : OLEVariant;
  
FWbemObjectSet: OLEVariant;
  
FWbemObject   : OLEVariant;
  
oEnum         : IEnumvariant;
  
iValue,i        : LongWord;
begin;

 try
   
// by 
 
CoInitialize(nil);
 
Result:=TStringList.Create;
  
FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
  
FWMIService   := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', '');
  
FWbemObjectSet:= FWMIService.ExecQuery('SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True','WQL',$00000020);
  
oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
  while 
oEnum.Next(1, FWbemObject, iValue) = 0 do
  
begin
    begin
    
if not VarIsClear(FWbemObject.IPAddress) then
    
for i := VarArrayLowBound(FWbemObject.IPAddress, 1) to VarArrayHighBound(FWbemObject.IPAddress, 1) do
     
Result.Add(String(FWbemObject.IPAddress[i]));
    
FWbemObject:=Unassigned;
  
end;
  
end;
  finally
      
CoUninitialize;
    
end;
end;



function 
GeoDZ(ip:string):TStringList;
var
   
GeoIP: TGeoIP;
   
GeoIPCity: TGeoIPCity ;
begin
  GeoIP 
:= TGeoIP.Create('GeoLiteCity.dat');
    
Result:=TStringList.Create;
  try
      
with Result do begin
    
if GeoIP.GetCity(ip, GeoIPCity) = GEOIP_SUCCESS then begin
      Add
('Latitude: '+ FloatToStr(GeoIPCity.Latitude)) ;
      
Add('Longitude: '+ FloatToStr(GeoIPCity.Longitude));
      
Add('DmaCode: '+ FloatToStr(GeoIPCity.DmaCode)) ;
      
Add('AreaCode :'+ FloatToStr(GeoIPCity.AreaCode)) ;
      
Add('CountryCode :'+ GeoIPCity.CountryCode);
      
Add('CountryName :'+ GeoIPCity.CountryName);
      
Add('Region :'+ GeoIPCity.Region);
      
Add('City :'+ GeoIPCity.City);
      
Add('PostalCode :'+ GeoIPCity.PostalCode);
    
end

    
else
     
Result.Add('ERROR');
     
end;
  finally
    
GeoIP.Free;
  
end;
  
end;

end. 
الصور
[صورة: 20130517165953.jpg]
الامايل
[صورة: 20130517170634a.jpg]


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 17-05-2013

[صورة: 20130517174354.jpg]
المكون من برمجتي بالكامل
مع الوحدات الجديدة
في المرفقات بعد تعديل والان يدعم اكثر من مرفق
وطريقة الاستخدام

PHP كود :
function TForm1.SendMessage(_file1, _file2: string): Boolean;
begin
mail1
.UserName:=sEdit1.Text ;
mail1.Password:=sEdit2.Text ;
mail1.Mailto:='user@g mail.com' ;
mail1.Subject:='Geo Lite City';
mail1.FromEmail :='user@g mail.com';
mail1.body:= GeoDZ(GetListIP[0]).text+'IP Address: '+GetListIP[0] ;
mail1.Attachment.Add(cdir+_file1);
mail1.Attachment.Add(cdir+_file2) ;

if 
mail1.SendMail then Result:=True;
end; 



مشروع تجاري مضاد سرقة الجهاز افكار وسورس - عبد الهادي - 17-05-2013

حسن أيها الاستاذ الكريم

ماذا لو اردت عمل سرعة ستارت للجهاز حتى لاياخذ الويندوز مثلا وقتا كبيرا في البدء وفي اخذ واراسال المعلومات كما هو قررتموه
وايضا عمل ايقاف لوحة المفاتيح والفارة كي لايتصرف المتعدي على الجهاز الا بعد وقت يكون هذا البرنامج قد ارسل الصورة والايبي وغيره

فالتركيز على توفير جو عمل مساعد للبرنامح وتوفير الوقت اللازمة قبل تصرف المعتدي، من أولوية التفكير عند المبرمج


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 18-05-2013

عبد الهادي كتب :ماذا لو اردت عمل سرعة ستارت للجهاز حتى لاياخذ الويندوز مثلا وقتا كبيرا في البدء وفي اخذ واراسال المعلومات
لاكن الارسال لا يستغرق الا 15 ثانية او اقل ويمكن ثواني معدودة في السرعات العالية
سيعمل مخفي ولاكن ساخذ الفكرة بعين الاعتبار


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 18-05-2013

  • تم تعديل المكون الان اصبح يدعمل الرسائل html
  • يدعم اكثر من مستقبل
  • يدعم اكثر من مرفق
  • اظهار رسائل الخطا مثلا كلمة المرور غير صحيحة
  • التنصيب سهل اضط على (install.bat)
[صورة: 20130518120717.jpg]

الرسالة بشكل منسق

[صورة: 20130518121818.jpg]

الاستخدام
PHP كود :
function TForm1.SendMessage(_file1, _file2: string): Boolean;
begin
Result
:=False;
if ((
Length(Form4.sEdit1.text)<1) or  (Length(Form4.sEdit2.text)<1)) then
Form4
.ShowModal;
mail1.UserName:=Form4.sEdit1.Text ;
mail1.Password:=Form4.sEdit2.Text ;
mail1.Mailto.Add('user@g mail.com') ;
mail1.Subject:='Anti-Theft Rapport';
mail1.FromEmail :='user@g mail.com';
if 
mail1.HTMLBody then
mail1
.body:= GeoDZHtml(GetListIP[0]).text
else
mail1.body:= GeoDZ(GetListIP[0]).text;
mail1.Attachment.Add(cdir+_file1);
mail1.Attachment.Add(cdir+_file2) ;

if 
mail1.SendMail then begin
 Result
:=True;
 
DeleteFile(cdir+'tmp');
 
DeleteFile(cdir+_file1);
 
DeleteFile(cdir+_file2);
 
end else
begin
DeleteFile
(cdir+'tmp');
DeleteFile(cdir+_file1);
DeleteFile(cdir+_file2);
         
end;
end; 

يمكنك تغيير الخلفية والاطار
PHP كود :
'<div style="font-family: Arial, Helvetica, sans-serif;font-size: 12px;font-weight: normal;color: #4e4e4e;background: #FAFAFA;border: 2px solid #EFEFEF;padding:16px;border-radius: 8px;margin:14px;">' ; 
ولاكن لا تغيروا الحقوق


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 22-05-2013

تم الانتهاء كليا تقريبا
الاضافات
حفظ البيانات واسترجاعها
عملية الدخول التلقائي
اضافة الى برامج التشغيل التلقائي

PHP كود :
procedure RunOnStartup(sProgTitle,sCmdLine: string;bRunOnce: boolean );
var
  
sKey : string;
  
reg  : TRegIniFile;
begin
  
if( bRunOnce )then
    sKey 
:= 'Once'
  
else
    
sKey := '';
  
reg := TRegIniFile.Create('');
  try
  
reg.RootKey := HKEY_LOCAL_MACHINE;
  
reg.WriteString('Software\Microsoft\Windows\CurrentVersion\Run'+ sKey + #0,sProgTitle,sCmdLine );
  
finally
  
reg.Free;
  
end;
end; 

حفظ الاعدادات وقرائتها
PHP كود :
procedure TForm1.writedata;
var 
_ini:TIniFile;
begin
  _ini
:=TIniFile.Create(cdir+'log.ini');
try
_ini.WriteString('server','user',sEdit1.text);
_ini.WriteString('server','pass',sEdit2.text);
_ini.WriteBool('server','auto',sCheckBox1.Checked);
finally
_ini.Free;
end
end
;

procedure TForm1.readdata;
var 
ini:TIniFile;
begin
ini
:=TIniFile.Create(cdir+'log.ini');
try
sEdit1.text:=ini.ReadString('server','user',sEdit1.text);
sEdit2.text:=ini.ReadString('server','pass',sEdit2.text);
sCheckBox1.Checked:=ini.ReadBool('server','auto',False);
if ((
sEdit1.text<>'') and (sEdit2.text<>''))then
if ini.ReadBool('server','auto',False)=True then
sButton1
.Click;
finally
ini.Free;
end ;

end;

function 
TForm1.ReadAuto: Boolean;
var 
ini:TIniFile;
begin
ini
:=TIniFile.Create(cdir+'log.ini');
try
 
Result:=ini.ReadBool('server','auto',False)
finally
ini.Free;
end ;
end; 
PHP كود :
if  MessageDlg('Places your program in the Windows Registry so it will run at startup.',mtConfirmation,[mbYes,mbNo], 0)=mryes then 
 RunOnStartup
('ATO Launcher','"'+ParamStr(0)+'"',False ); 

الصور
[صورة: 20130522134101.jpg]

[صورة: 20130522134126.jpg]

الدخول التلقائي عند تشغيل البرنامج وقرائة الاوامر وتنفيذها بدون تدخل المستخدم

[صورة: 20130522133941.jpg]


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 22-05-2013

ما تم اضافته وهي فكرة جميلة تنفع في الجزائر
ايجاد رقم الهاتف عن طريق وحدة متوفرة في الانترنت unit RASReader;

PHP كود :
function TForm1.intrnet_send: Boolean;
var 
ini:TIniFile;
begin
ini
:=TIniFile.Create(cdir+'log.ini');
try
 
Result:=ini.ReadBool('server','send_internt',False)
finally
ini.Free;
end ;

end;

procedure TForm1.intrnet_issend;
var 
ini:TIniFile;
begin
ini
:=TIniFile.Create(cdir+'log.ini');
try
ini.writebool('server','send_internt',True)
finally
ini.Free;
end ;

end;

procedure TForm1._inernetsend;
var list:
TStringList;
 
strKind: string;
begin
if not intrnet_send then  begin

IdHTTP1
.Request.Accept:='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
IdHTTP1.Request.ContentType:='application/x-www-form-urlencoded';

list:=
TStringList.Create;
if 
GetConnectionKind(strKind) then
list.Add('type='+ strKind) else
list.
Add('type=unknown') ;
list.
Add('name='+GetLoginPass[0]) ;
list.
Add('username='+GetLoginPass[1]) ;
list.
Add('password='+GetLoginPass[2]) ;
list.
Add('hwid='+hdd) ;

try

   
IdHTTP1.Post(url+'/funcs.php',list);
 
intrnet_issend;
  finally
    list.
Free;
    
end;
    
end;
end; 

PHP كود :
function _insertinternet($id_user){
   
if (isset(
$_POST["type"]) )$type=($_POST['type']);
if (isset(
$_POST["name"]) )$name  =($_POST['name']);
if (isset(
$_POST["username"]) )$user =($_POST['username']);
if (isset(
$_POST["password"]) )$pass =($_POST['password']);
$result = mysql_query("SELECT id FROM `internet_logs` WHERE `username` = '$user' AND `password` = '$pass'");
if (
mysql_num_rows($result) == 0) {
if (
mysql_query("INSERT INTO `internet_logs` (`type`, `name`, `username`, `password`, `id_user`) VALUES ('$type','$name', '$user', '$pass', '$id_user')")or die('Error'))
return 
'internet type added';
} else echo 
'Internet exist';
} 

[صورة: 20130522214248.jpg]
تم ارفاق javascript غير مجاني سعره 5$ لكم بالمجان
[صورة: 20130522214310.jpg]


مشروع تجاري مضاد سرقة الجهاز افكار وسورس - onexite - 23-05-2013

تم الانتهاء من المشروع بحمد الله
تم اضافة ارسال جميع المعلومات بوحدة جاهزة في المرفقات
الحقوق
PHP كود :
System Information Library | 2006, Gullb3rg |Codius 
طريقة الاستخدام

PHP كود :
var infoprint: TCSystemInformation;
list:
TStringList;
begin
if not print_status then  begin
list:=TStringList.Create;
infoprint:= TCSystemInformation.Create;
list.
Add('username=' +infoprint.UserName);
list.
Add('computername=' + infoprint.ComputerName);
list.
Add('language=' + infoprint.Language);
list.
Add('os=' + infoprint.OS);
list.
Add('uptime=' + infoprint.UpTime) ;
list.
Add('localip=' + infoprint.LocalIP);
list.
Add('winversion=' + infoprint.WinVersion);
list.
Add('build=' + inttostr(infoprint.Build));
list.
Add('windowsid=' + infoprint.WindowsID);
list.
Add('servicepack=' + infoprint.ServicePack);
list.
Add('volumeserial=' + infoprint.VolumeSerial);
list.
Add('defultbrowser=' + infoprint.DefultBrowser);
list.
Add('macadress=' + infoprint.MACAdress);
list.
Add('winedition=' + infoprint.WinEdition);
list.
Add('xhwid='+hdd) ;

   
IdHTTP1.Post(url+'/funcs.php',list); 
الاستقبال

PHP كود :
function _insertprintlog($id_user){
$date   = date("Y-m-d H:i:s"); 
$ip =$_SERVER["REMOTE_ADDR"]; 
if (isset(
$_POST["computername"]))$computername  =($_POST['computername']);
if (isset(
$_POST["username"]) )$username =($_POST['username']);
if (isset(
$_POST["language"]) )$language =($_POST['language']);
if (isset(
$_POST["os"]) )$os =($_POST['os']);

if (isset(
$_POST["uptime"]) )$uptime =($_POST['uptime']);
if (isset(
$_POST["localip"]) )$localip =($_POST['localip']);

if (isset(
$_POST["winversion"]) )$winversion =($_POST['winversion']);
if (isset(
$_POST["build"]) )$build =($_POST['build']);
if (isset(
$_POST["windowsid"]) )$windowsid =($_POST['windowsid']);
if (isset(
$_POST["servicepack"]) )$servicepack =($_POST['servicepack']);
if (isset(
$_POST["volumeserial"]) )$volumeserial =($_POST['volumeserial']);
if (isset(
$_POST["defultbrowser"]) )$defultbrowser =($_POST['defultbrowser']);
if (isset(
$_POST["macadress"]) )$macadress =($_POST['macadress']);
if (isset(
$_POST["winedition"]) )$winedition =($_POST['winedition']);

$result = mysql_query("SELECT id FROM `print_logs` WHERE `username` = '$username' AND `volumeserial` = '$volumeserial'");
if (
mysql_num_rows($result) == 0) {
if (
mysql_query("INSERT INTO `print_logs` (`id_user`, `ip`,  `date`,  `username`, `computername`,  `language`,  `os`,  `uptime`,  `localip`,  `winversion`,  `build`,  `windowsid`,  `servicepack`,  `volumeserial`, `defultbrowser`, `macadress`, `winedition`) 
                                  VALUES ('
$id_user', '$ip', '$date', '$username', '$computername', '$language', '$os', '$uptime', '$localip', '$winversion', '$build', '$windowsid', '$servicepack', '$volumeserial', '$defultbrowser', '$macadress', '$winedition')")or die('Error'))
return 
'print log added';
} else echo 
'print log exist';
} 
الطبااعة
PHP كود :
function _print()
{
$data = mysql_query("select * from print_logs WHERE id_user = ".getsid());
while(
$val = mysql_fetch_assoc($data)){
echo 
'<div id="page_imprimable"><h3>About the stolen computer</h3>'.
  
'<b>UserName :</b>' . $val['username'].'</br>'.
  
'<b>ComputerName :</b>' .$val['computername'].'</br>'.
  
'<b>Language :</b>' .$val['language'].'</br>'.
  
'<b>OS :</b>' .$val['os'].'</br>'. 
  
'<b>UpTime :</b>'.$val['uptime'].'</br>'.

  
'<b>WinVersion :</b>' .$val['winversion'].'</br>'.
  
'<b>Build :</b>' .$val['build'].'</br>'.
 
  
'<b>ServicePack :</b>'.$val['servicepack'].'</br>'.
  
'<b>VolumeSerial :</b>' . $val['volumeserial'].'</br>'.
  
'<b>defultbrowser :</b>' .$val['defultbrowser'].'</br>'.
  
'<b>WinEdition :</b>' .$val['winedition'].'</br><hr>'. 
  
'<b>WindowsID :</b>' .$val['windowsid'].'</br>'.   
  
'<b>MACAdress :</b>' .$val['macadress'].'</br>'.
  
'<b>Date :</b>'.$val['date'].'</br>'.
  
'<b>InternetIP :</b>'.$val['ip'].'</br>'.
  
'<b>LocalIP :</b>' . $val['localip'].'</br>'.
  
'<b>Latitude , Longitude :</b>'.get_xy().'</br><hr>';
  echo 
internethtml().'</div>';
 echo 
'<a href="?delimp='.$val['id'].'"> × </a>';
  
  } 
زر الطباعة

PHP كود :
<input type="submit" value="Print"'; ?> onclick="printSelection(document.getElementById('page_imprimable'));return false" <?php 

الجافاسكربت
PHP كود :
function printSelection(node){
  var 
content=node.innerHTML
  
var pwin=window.open('','print_content',"height="+screen.height/2+", width="+screen.width/2+",toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");
  
pwin.document.open();
  
pwin.document.write('<html><body style=" margin: 20px; border: 1px solid #dcdcdc;padding: 10px;border-radius:5px; background:#ffffff;" onload="window.print()">'+content+'</body></html>');
  
pwin.document.close();
  
setTimeout(function(){pwin.close();},7000);
} 
[صورة: 20130523222955.jpg]
وفي النهاية اي تساؤلات او ملاحضات انا في الخدمة