kanber_kav
29-09-2010, 11:01 PM
Status ok.
Readers ok.
User ok.
Online Cardlist ok.
Plugins %100 Complate...
final oscaminfo.c
/*
* By Kanber KAV
*
* Oscam info plugins.
*/
#define MWINCLUDECOLORS
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include </root/microwin/src/include/nano-X.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
/*#include <time.h> //Zamanlayıcı için*/
static GR_WINDOW_ID main_window;
static GR_GC_ID main_gc;
static char message1[100] = "--- MultiMenu --- Beta V1.1 By Kanber_KAV";
char menux[20][500] ;
char menuResim[10][500] ;
char Mesaj[100][500] ;
char Mesaj2[5000][500] ;
char ara***le[500];
char karakter;
int kartim,say,ToplamSatir,KontrolMen u,atla1,menuid;
#define WIDTH 960
#define HEIGHT 540 //CÄ°ZÄ°M ALANI BELÄ°RLE
char Adress[1000];
//aRAMA dEÄÄ°ÅKEN
char Adres[5001][500];
char hafiza[500];
int d,k,Secim;
int bekle,kontrolp, Kontrolp;
char komut[255];
static int restat,Goruntu;
static void draw_menu_key();
int kontrol,adim;
//map
int menuatla,renkli,carpan;
char *isim,*secim;
char hata[250];
char *ilkkelime,*sonkelime,*ilkkelime1 ,*sonkelime1,Card[5000][250];
int ToplamBulunan;
struct ToplamVeri {
char PID[100];
char TYPE[100];
char ID[100];
char LABEL[100];
char AU[100];
char CRYPTED[100];
char ADDRESS[100];
char PORT[100];
char PROTOCOL[100];
char LDATA[100];
char LTIME[100];
char ONLINE[100];
char CAID[100];
char CHANNEL[100];
char LBVALUE[100];
char IDLE[100];
char STATUS[100];
char EMMERROR[100];
char EMMWRITTEN[100];
char EMMSKIPPED[100];
char EMMBLOCKED[100];
char OK[100];
char NOK[100];
char IGN[100];
char TOUT[100];
char CACHE[100];
char TUN[100];
char EOK[100];
char ENOK[100];
};
struct ToplamVeri Veri[1000];
#define FONTNAME ""
#define FILE_IMAGE ""
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif
static GR_FONT_ID font;
static GR_IMAGE_ID Menu_Resim ;
#define ROW1_X 100
#define ROW1_Y 400
#define ROW1_H 15
///
static void ResimYukle(void)
{
Menu_Resim =GrLoadImageFromFile(menuResim[1],FALSE);
}
static void ResimHafiza(void)
{
GrFreeImage(Menu_Resim);
}
typedef struct {
const char *name;
int mode;
int count;
int key[2];
unsigned short mwkey;
}keys_map_td210;
#define MAX_KEY 60
keys_map_td210 keys_td210[MAX_KEY] = {
{ "MWKEY_ASCII_0", 0, 3, { 0, 4 }, '0'}, // 0 T0
{ "MWKEY_ASCII_1", 0, 3, { 1, 5 }, '1'}, // 1 T1
{ "MWKEY_ASCII_2", 0, 3, { 2, 6 }, '2'}, // 2 T2
{ "MWKEY_ASCII_3", 0, 3, { 3, 7 }, '3'}, // 3 T3
{ "MWKEY_ASCII_4", 0, 3, { 4, 8 }, '4'}, // 4 T4
{ "MWKEY_ASCII_5", 0, 3, { 5, 9 }, '5'}, // 5 T5
{ "MWKEY_ASCII_6", 0, 3, { 6, 10 }, '6'}, // 6 T6
{ "MWKEY_ASCII_7", 0, 3, { 7, 11 }, '7'}, // 7 T7
{ "MWKEY_ASCII_8", 0, 3, { 8, 12 }, '8'}, // 8 T8
{ "MWKEY_ASCII_9", 0, 3, { 9, 13 }, '9'}, // 9 T9
{ "MWKEY_CHANNEL_UP", 0, 3, { 10, 16 }, MWKEY_CHANNEL_UP}, // A CHUP
{ "MWKEY_CHANNEL_DOWN", 0, 3, { 11, 17 }, MWKEY_CHANNEL_DOWN}, // B CHDOWN
{ "Not Allowed", 0, 3, { 12, 18 }, 0}, // C VOLDOWN
{ "Not Allowed", 0, 3, { 13, 19 }, 0}, // D VOLUP
{ "Not Allowed", 2, 6, { 14, 20 }, 0}, // E MUTE
{ "MWKEY_UNKNOWN", 0, 3, { 15, 0 }, MWKEY_UNKNOWN}, // F NONE
{ "MWKEY_ENTER", 0, 3, { 16, 21 }, MWKEY_ENTER}, // 10 OK
{ "MWKEY_MENU", 0, 3, { 17, 22 }, MWKEY_MENU}, // 11 MENU
{ "MWKEY_UP", 0, 3, { 18, 23 }, MWKEY_UP}, // 12 UP
{ "MWKEY_DOWN", 0, 3, { 19, 24 }, MWKEY_DOWN}, // 13 DOWN
{ "MWKEY_LEFT", 0, 3, { 20, 25 }, MWKEY_LEFT}, // 14 LEFT
{ "MWKEY_RIGHT", 0, 3, { 21, 26 }, MWKEY_RIGHT}, // 15 RIGHT
{ "MWKEY_ESCAPE", 0, 3, { 22, 28 }, MWKEY_ESCAPE}, // 16 EXIT
{ "MWKEY_REWIND", 0, 3, { 23, 34 }, MWKEY_REWIND}, // 17 REW
{ "MWKEY_STOP", 0, 3, { 24, 35 }, MWKEY_STOP}, // 18 STOP
{ "MWKEY_PLAY", 0, 3, { 25, 36 }, MWKEY_PLAY}, // 19 PLAY
{ "MWKEY_FAST_FWD", 0, 3, { 26, 37 }, MWKEY_FAST_FWD}, // 1A FWD
{ "MWKEY_TRACK_PREV", 0, 3, { 27, 38 }, MWKEY_TRACK_PREV}, // 1B PREV
{ "MWKEY_TRACK_NEXT", 0, 3, { 28, 39 }, MWKEY_TRACK_NEXT}, // 1C NEXT
{ "MWKEY_RECORD", 0, 3, { 29, 40 }, MWKEY_RECORD}, // 1D RECORD
{ "MWKEY_BACKSPACE", 0, 3, { 30, 14 }, MWKEY_BACKSPACE}, // 1E DEL
{ "MWKEY_UNKNOWN", 0, 3, { 31, 0 }, MWKEY_UNKNOWN}, // 1F NONE
{ "MWKEY_CAPSLOCK", 0, 3, { 32, 15 }, MWKEY_CAPSLOCK}, // 20 CAPS
{ "MWKEY_COLORED_KEY_0", 0, 3, { 33, 58 }, MWKEY_COLORED_KEY_0}, // 21 RED
{ "MWKEY_COLORED_KEY_1", 0, 3, { 34, 59 }, MWKEY_COLORED_KEY_1}, // 22 GREEN
{ "MWKEY_COLORED_KEY_2", 0, 3, { 35, 60 }, MWKEY_COLORED_KEY_2}, // 23 YELLOW
{ "MWKEY_COLORED_KEY_3", 0, 3, { 36, 61 }, MWKEY_COLORED_KEY_3}, // 24 BLUE
{ "MWKEY_GUIDE", 0, 3, { 37, 41 }, MWKEY_GUIDE}, // 25 Guide
{ "MWKEY_F1", 0, 3, { 38, 30 }, MWKEY_F1}, // 26 CHECK
{ "Not Allowed", 0, 3, { 39, 56 }, 0}, // 27 RESOL
{ "MWKEY_INFO", 0, 3, { 40, 47 }, MWKEY_INFO}, // 28 INFO
{ "MWKEY_F2", 0, 3, { 41, 57 }, MWKEY_F2}, // 29 TVRADIO
{ "MWKEY_UNKNOWN", 2, 7, { 42, 1 }, MWKEY_UNKNOWN}, // 2A Power
{ "MWKEY_HOME", 2, 3, { 43, 46 }, MWKEY_HOME}, // 2B Home
{ "Not Allowed", 0, 3, { 44, 53 }, 0}, // 2C UHF
{ "Not Allowed", 0, 3, { 45, 54 }, 0}, // 2D AUX
{ "Not Allowed", 0, 3, { 46, 55 }, 0}, // 2E USB Eject
{ "MWKEY_F3", 0, 3, { 47, 29 }, MWKEY_F3}, // 2F Search
/* New Key */
{ "MWKEY_ESCAPE", 0, 3, { 48, 63 }, MWKEY_ESCAPE}, // 30 UTUBE
{ "MWKEY_ESCAPE", 0, 3, { 49, 64 }, MWKEY_ESCAPE}, // 31 WWW
{ "MWKEY_ESCAPE", 0, 3, { 50, 65 }, MWKEY_ESCAPE}, // 32 EMAIL
/* Front Key */
{ "MWKEY_UP", 0, 3, { 51, 44 }, MWKEY_UP}, // 33 ---UP
{ "MWKEY_DOWN", 0, 3, { 52, 45 }, MWKEY_DOWN}, // 34 ---DOWN
{ "MWKEY_LEFT", 3, 3, { 53, 42 }, MWKEY_LEFT}, // 35 ---LEFT
{ "MWKEY_RIGHT", 3, 3, { 54, 43 }, MWKEY_RIGHT}, // 36 ---RIGHT
{ "MWKEY_HOME", 0, 3, { 55, 46 }, MWKEY_HOME}, // 37 ---LAN(HOME)
//{ "K_LAN__", 0, 3, { 55, 62 }, }, // 37 ---LAN(HOME)
/* Virtual Key */
{ "MWKEY_ESCAPE", 0, 3, { 56, 49 }, MWKEY_ESCAPE}, // 38 SLEEP
{ "MWKEY_ESCAPE", 0, 3, { 57, 50 }, MWKEY_ESCAPE}, // 39 WAKEUP
{ "", 0, 3, { 58, 51 }, MWKEY_UNKNOWN}, // 40 VSLEEP
{ "", 0, 3, { 59, 52 }, MWKEY_UNKNOWN}, // 41 VWAKEUP
};
/* A counter - used so you can see the display being updated. */
static int getSerialNumber(void)
{
static int serial = 0;
if (++serial >= 1000)
serial = 0;
return serial;
}
/* If a character is ASCII, return it, else return a question mark. */
static char keyToChar(int key)
{
if ((key >= 32) && (key <= 127)) {
return (char)key;
} else {
return '?';
}
}
/* Makes a GrGrabKey() type paramater into a human-readable string */
static const char *grabKindName(int kind)
{
switch (kind) {
case GR_GRAB_HOTKEY_EXCLUSIVE:
return "GR_GRAB_HOTKEY_EXCLUSIVE";
case GR_GRAB_HOTKEY:
return "GR_GRAB_HOTKEY";
case GR_GRAB_EXCLUSIVE:
return "GR_GRAB_EXCLUSIVE";
case GR_GRAB_EXCLUSIVE_MOUSE:
return "GR_GRAB_EXCLUSIVE_MOUSE";
default:
return "Invalid GR_GRAB_ mode";
}
}
static void MesajYAZ()
{
int art,ekle,eklex;
art=17;
ekle=305;
eklex=500;
GrSetGCForeground(main_gc, GR_RGB(100,0,0));//Arka Renk
GrFillRect(main_window,main_gc,49 5,290 ,410,210);
GrSetGCForeground(main_gc, GR_RGB(100,90,100));//Arka Renk
GrFillRect(main_window,main_gc,50 0,295 ,400,200);
font = GrCreateFont(menuResim[0], 15, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCForeground(main_gc, GR_RGB(255,255,0)); //yazi rengi
GrText(main_window, main_gc,eklex,ekle,Mesaj[0], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+1*art ,Mesaj[1], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+2*art, Mesaj[2], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+3*art, Mesaj[3], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+4*art, Mesaj[4], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+5*art, Mesaj[5], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+6*art, Mesaj[6], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+7*art, Mesaj[7], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+8*art, Mesaj[8], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+9*art, Mesaj[9], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+10*art, Mesaj[10], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+11*art, Mesaj[11], -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
font = GrCreateFont(menuResim[0], 10, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrDestroyFont(font);
}
/* Repaint a specified area of the window */
int repaint(int x, int y, int width, int height)
{ //Sistem ekrana yazırılıyor
font = GrCreateFont(menuResim[0], 25, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
int art,ekle,eklex;
art=45;
ekle=75;
eklex=100;
GrSetGCForeground(main_gc, GR_RGB(150,90,255));//Arka Renk
GrFillRect(main_window,main_gc,0, 0 ,WIDTH,HEIGHT);
GrSetGCForeground(main_gc, GR_RGB(255,0,100));
GrText(main_window, main_gc,250,50,menux[0], -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(0,100,0));
font = GrCreateFont(menuResim[0], 10, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,700,50,message1, -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrRect(main_window, main_gc,eklex-5,ekle+0*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+1*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+2*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+3*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+4*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+5*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+6*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+7*art,350,35);
GrRect(main_window, main_gc,eklex-5,ekle+8*art,350,35);
GrSetGCForeground(main_gc, GR_RGB(0,0,100));
GrFillRect(main_window, main_gc,eklex-5,ekle+menuatla*art,350,35);
//GrDrawImageToFit(main_window,main _gc,550,75 ,300,200,Menu_Resim);
font = GrCreateFont(menuResim[0], 15, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
draw_menu_key();
}
/* Repaint the entire window */
static void repaintAll(void)
{
repaint(0,0,WIDTH,HEIGHT);
}
static void Resim_Init(void)
{
ResimYukle();
}
int
main(int argc,char **argv)
{
GR_EVENT event;
GR_WM_PROPERTIES props;
int grabResult;
int key = 'a';
int grabKind = GR_GRAB_HOTKEY_EXCLUSIVE;
//kontrol=0;
//Ekranla bağlantı kur
if (GrOpen() < 0) {
printf("Can't open graphics\n");
exit(1);
}
/* pass errors through main loop*/
MenuAD();
MenuResim();
MenuMesaj();
GrSetErrorHandler(NULL);
main_window = GrNewWindow(GR_ROOT_WINDOW_ID, 20, 20, WIDTH, HEIGHT,
0, GREEN, RED);
props.flags = GR_WM_FLAGS_PROPS | GR_WM_FLAGS_TITLE;
props.props = GR_WM_PROPS_NOBACKGROUND;
//props.title = "Nano-X GrabKey Demo";
//GrSetWMProperties(main_window, &props);
main_gc = GrNewGC();
grabResult = GrGrabKey(main_window, key, grabKind);
//printf("%d\n", grabResult);
GrSelectEvents(main_window, GR_EVENT_MASK_EXPOSURE | GR_EVENT_MASK_CLOSE_REQ
| GR_EVENT_MASK_KEY_DOWN | GR_EVENT_MASK_KEY_UP);
GrMapWindow(main_window);
GrSetFocus(main_window);
for (;;) {
GrGetNextEvent(&event);
//GrGetNextEventTimeout(&event,100);
switch (event.type)
{
case GR_EVENT_TYPE_EXPOSURE:
repaint(event.exposure.x, event.exposure.y,
event.exposure.width, event.exposure.height);
break;
case GR_EVENT_TYPE_CLOSE_REQ:
GrClose();
exit(0);
break;
case GR_EVENT_TYPE_ERROR:
printf("\7grabdemo: Error (%s) ", event.error.name);
printf(nxErrorStrings[event.error.code],event.error.id);
break;
case GR_EVENT_TYPE_KEY_DOWN:
karakter=keyToChar(event.keystrok e.ch);
int keys;
keys=event.keystroke.ch;
if (keys==27) // çıkış
{sprintf(komut,"./MultiMenu.sh menu9 &");
system(komut);
}
Kodisle (keys,kontrol);
break;
}
}
ResimHafiza();
GrClose();
return 0;
}
//Kod isleme
int Kodisle(int Kod,int Kontrol)
{
if (Kontrol==0)
{
////////////////////////////////
if (Kod==63490)
{
//Tus-1-Yukarı
menuatla=menuatla-1;
if (menuatla<0) menuatla=8 ;
ResimHafiza();
ResimYukle();
repaintAll();
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63491)
{
//Tus-2-Aşagı
menuatla=menuatla+1;
if (menuatla>8) menuatla=0;
ResimHafiza();
ResimYukle();
repaintAll();
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63488)
{
//Tus-3-sol
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63489)
{
//Tus-4-sag
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==13)
{
//Tus-5 (Ok tusu)
kontrolp=0;
kartim=0;
if(menuatla==0)
{ system("rm /tmp/status.html");
sprintf(Adress,"%s:%s/status.html",menux[13],menux[12]);
sprintf(hata,"Server connection..");
Bekle(hata);
Bekle(hata);
Bilgial("/tmp/status.html");
sleep (1);
AramaDosya0();
if(kontrolp==0)
{sprintf(hata,"Server cannot connection.");
Bekle(hata);
Bekle(hata); }
}
if(menuatla==1)
{system("rm /tmp/readers.html");
sprintf(Adress,"%s:%s/readers.html",menux[13],menux[12]);
printf("kk1=%d \n",kontrolp);
sprintf(hata,"Server connection..");
Bekle(hata);
Bekle(hata);
Bilgial("/tmp/readers.html");
sleep (1);
AramaDosya1();
if(kontrolp==0)
{sprintf(hata,"Server cannot connection.");
Bekle(hata);
Bekle(hata); }
}
if(menuatla==2)
{ system("rm /tmp/userconfig.html");
sprintf(Adress,"%s:%s/userconfig.html",menux[13],menux[12]);
sprintf(hata,"Server connection..");
Bekle(hata);
Bekle(hata);
Bilgial("/tmp/userconfig.html");
sleep (1);
AramaDosya2();
if(kontrolp==0)
{sprintf(hata,"Server cannot connection.");
Bekle(hata);
Bekle(hata); }
}
if(menuatla==3)
{sprintf(komut,"./MultiMenu.sh menu4 &");
system(komut);
}
if(menuatla==4)
{sprintf(komut,"./MultiMenu.sh menu5 &");
system(komut);
}
if(menuatla==5)
{sprintf(komut,"./MultiMenu.sh menu6 &");
system(komut);
}
//eklendi
if(menuatla==6)
{sprintf(komut,"./MultiMenu.sh menu7 &");
system(komut);
}
if(menuatla==7)
{sprintf(komut,"./MultiMenu.sh menu8 &");
system(komut);
}
if(menuatla==8)
{sprintf(komut,"./MultiMenu.sh menu9 &");
system(komut);
}
if (menuatla>2)
{
kontrolp=0;
bekle=0;
int sayu=0;
devam2:printf("");
sleep(1);
bekle=bekle+1;
sayu=bekle;
if (bekle>5) sayu=10-bekle;
Karasimsek(sayu);
Karasimsek(sayu);
printf("bekle=%d \n",bekle);
if (bekle >= 10 || kontrolp==1)
{goto devam;}
else
{DKontrol();goto devam2; }
devam:printf("");
Oku2();
}
if(kontrolp==1)
{
if (menuatla==0) Listele0();
if (menuatla==1) Listele1();
if (menuatla==2) Listele2();
if (KontrolMenu==2) Listele3();
if (menuatla>2) Listele();
kontrol=2;
Kod=0;
}
else
{
repaintAll();
}
//MenuMesaj();
// printf("Kod=%d kontrol=%d menu=%d kartim=%d\n",Kod,kontrol,menuatla,kartim);
goto atlama;
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63590)
{
//Tus-6
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63591)
{
//Tus-7
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63566) //sol MWKEY_COLORED_KEY_0
{
}
////////////////////////////////////////////////////////////////////////////////
if (Kod==63567) //saÄŸ MWKEY_COLORED_KEY_1
{
}
/////////////////////////////////////////////////////////
if (Kod==63568) // MWKEY_COLORED_KEY_2
{
//Tus
}
/////////////////////////////////////////////////////////////////
if (Kod==63569)// MWKEY_COLORED_KEY_3
{
//Tus
}
//////////////////////////////////////////////////////////////////////////
if (menuatla==0) secim=menux[0];kartim=0;
if (menuatla==1) secim=menux[1];kartim=0;
if (menuatla==2) secim=menux[2];kartim=0;
if (menuatla==3) secim=menux[3];kartim=0;
if (menuatla==4) secim=menux[4];kartim=0;
if (menuatla==5) secim=menux[5];kartim=0;
if (menuatla==6) secim=menux[6];kartim=0;
if (menuatla==7) secim=menux[7];kartim=0;
if (menuatla==8) secim=menux[8];kartim=0;
atlama:printf("");
} //Kontrol==0 bitis
if (Kontrol==2)
{
/////////////////////////////
//kartları goster
//63567
if (Kod=='1')
{
YesilTus();
}
if (Kod==63567) //saÄŸ MWKEY_COLORED_KEY_1
{
YesilTus();
}
/////////////////////////////////////////////////////////////////////
if (Kod==63490)
{
// kartim=kartim-12;
// if (kartim<0) kartim=0;
if (KontrolMenu==1)
{
atla1=atla1-1;
if (atla1<0) atla1=0;
}
}
///////////////////////////////////////////////////////////////////////////////
if (Kod==63491)
{
// kartim=kartim+12;
// if (kartim>1500) kartim=1500;
if (KontrolMenu==1)
{
atla1=atla1+1;
if (atla1>11) atla1=11;
}
}
///////////////////////////////////////////////////////////////////////////////
if (Kod==63488)
{
kartim=kartim-12;
atla1=0;
if (kartim<0) kartim=0;
}
///////////////////////////////////////////////////////////////////////////////
if (Kod==63489)
{//key saÄŸ
atla1=0;
kartim=kartim+12;
if (kartim>1500) kartim=1500;
}
///////////////////////////////////////////////////////////////////////////////
if (Kod==13)
{
kartim=0;
k=0;
if (KontrolMenu==2)
{KontrolMenu=0;
menuatla=1;
system("rm /tmp/readers.html");
sprintf(Adress,"%s:%s/readers.html",menux[13],menux[12]);
sprintf(hata,"Server connection..");
Bekle(hata);
Bekle(hata);
Bilgial("/tmp/readers.html");
AramaDosya1();
printf("kk=%d \n",kontrolp);
if(kontrolp!=0)
{sprintf(hata,"Server cannot connection.");
Bekle(hata);
Bekle(hata);}
if (menuatla==1) Listele1();
}
else
{
kontrol=0;
repaintAll();
goto hop; //break görevi
}
}
///////////////////////////////////////////////////////////////////////
if(kontrolp==1)
{
if (menuatla==0) Listele0();
if (menuatla==1) Listele1();
if (menuatla==2) Listele2();
if (KontrolMenu==2) Listele3();
if (menuatla>2) Listele();
}
}
hop:printf("");
} /////son
//Bekleme
int Karasimsek(int say)
{font = GrCreateFont(menuResim[0], 25, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
// GrDrawImageToFit(main_window,main _gc,250,200 ,200,50,PopupBox);
GrFillRect(main_window, main_gc,WIDTH/2-180,HEIGHT/2-100, 50*6+70,30);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
GrText(main_window, main_gc, WIDTH/2-60,HEIGHT/2-110, "Bekleyin..", -1, GR_TFASCII);
GrFillRect(main_window, main_gc,WIDTH/2-150+say*50,HEIGHT/2-95, 50,20);
GrDestroyFont(font);
}
//Bekleme
int Bekle(char *hata2)
{font = GrCreateFont(menuResim[0], 25, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
// GrDrawImageToFit(main_window,main _gc,250,200 ,200,50,PopupBox);
GrFillRect(main_window, main_gc,WIDTH/2-150,HEIGHT/2-100, 350,30);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
GrText(main_window, main_gc, WIDTH/2-100,HEIGHT/2-80, hata2, -1, GR_TFASCII);
GrDestroyFont(font);
}
// Menu OluÅŸtur
static void draw_menu_key()
{int art,ekle,eklex;
art=45;
ekle=100;
eklex=130;
font = GrCreateFont(menuResim[0], 25, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCForeground(main_gc, GR_RGB(100,200,240)); //yazi rengi
GrText(main_window, main_gc,eklex,ekle,menux[1], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+1*art ,menux[2], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+2*art, menux[3], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+3*art, menux[4], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+4*art, menux[5], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+5*art, menux[6], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+6*art, menux[7], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+7*art, menux[8], -1, GR_TFASCII);
GrText(main_window, main_gc, eklex,ekle+8*art, menux[9], -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
font = GrCreateFont(menuResim[0], 10, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrDestroyFont(font);
//MesajYAZ();
}
/*
int DKontrol()
{ FILE *fp1;
char birkelime[500];
char *c;
fp1 = fopen(isim,"r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosyam bulunamadı..\n");}
else
{ c = fgets(birkelime,500,fp1);
if (c == NULL)
{ kontrolp=0;
fclose(fp1);}
else
{ kontrolp=1;
fclose(fp1);}
}
}
*/
int MenuAD()
{ FILE *fp1;
char birkelime[500];
char *c;
int df,uz,uzunluk;
df=0;
fp1 = fopen("menuname.txt","r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosya bulunamadı..\n");}
else
{ do {
c = fgets(birkelime,500,fp1); /* bir satir okuyalim */
if (birkelime[0]=='#') goto aciklama;
if (c != NULL)
{
for(uz=0;uz<500;uz++)
{
if (birkelime[uz]=='\0')
{ uzunluk=uz;
goto atla;
}
}
atla:printf;//("isim=%d \n",uzunluk);
sprintf( menux[df],"%s",birkelime);
menux[df][uzunluk-1]='\0';
df=df+1;
}
aciklama:printf("");
} while (c != NULL);
}
int mk;
for (mk=0;mk<df;mk++)
{ printf("%d=%s\n",mk, menux[mk]); }
}
int MenuResim()
{ FILE *fp1;
char birkelime[500];
char *c;
int df,uz,uzunluk;
df=0;
fp1 = fopen("menuresim.txt","r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosya bulunamadı..\n");}
else
{ do {
c = fgets(birkelime,500,fp1); /* bir satir okuyalim */
if (birkelime[0]=='#') goto aciklama;
if (c != NULL)
{
for(uz=0;uz<500;uz++)
{
if (birkelime[uz]=='\0')
{ uzunluk=uz;
goto atla;
}
}
atla:printf;//("isim=%d \n",uzunluk);
sprintf( menuResim[df],"%s",birkelime);
menuResim[df][uzunluk-1]='\0';
df=df+1;
}
aciklama:printf("");
} while (c != NULL);
}
}
int MenuMesaj()
{ int gg;
//Mesajı temizle
gg=0;
for(gg=0;gg<12;gg++)
{
Mesaj[gg][0]='\0';
}
FILE *fp1;
char birkelime[500];
char *c;
int df,uz,uzunluk;
df=0;
fp1 = fopen("mesaj.txt","r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosyam bulunamadı..\n");}
else
{ do {
c = fgets(birkelime,500,fp1); /* bir satir okuyalim */
if (birkelime[0]=='#') goto aciklama;
if (c != NULL)
{
for(uz=0;uz<500;uz++)
{
if (birkelime[uz]=='\0')
{ uzunluk=uz;
goto atla;
}
}
atla:printf;//("isim=%d \n",uzunluk);
sprintf( Mesaj[df],"%s",birkelime);
Mesaj[df][uzunluk-1]='\0';
df=df+1;
}
aciklama:printf("");
} while (c != NULL);
}
}
/////////////////////////////77
/////////////////////////////7
/////////////////////////////
////////////////yeni arama2 /////////////
int MenuMesaj2(char *isim)
{ int gg;
ToplamSatir=0;
kontrolp=1;
//Mesajı temizle
gg=0;
for(gg=0;gg<5000;gg++)
{
Mesaj2[gg][0]='\0';
}
//Dosya okuma
FILE *fp1;
char birkelime[500];
char *c;
int df,uz,uzunluk;
df=0;
fp1 = fopen(isim,"r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosyamm bulunamadı..\n");
sprintf(komut,"echo \"Dosya Bulunamadı..\" **** %s &",isim);
system(komut);
goto cik;
}
else
{ do {
c = fgets(birkelime,500,fp1); /* bir satir okuyalim 2000 karekter max*/
if (birkelime[0]=='#') goto aciklama;
if (birkelime[0]=='\n') goto aciklama;
if (c != NULL)
{//if (birkelime==' ') goto atla;
uzunluk=strlen(birkelime);
sprintf( Mesaj2[df],"%s",birkelime);
Mesaj2[df][uzunluk-1]='\0';
df=df+1;
atla:printf;//("isim=%d \n",uzunluk);
// if (Mesaj2[df]=='<DIV class="log">') goto cik;
}
aciklama:printf;
} while (c != NULL);
}
fclose(fp1);
cik:printf;
int aa;
ToplamSatir=df-1;
int mk;
printf("aa=%d\n",ToplamSatir); //Dosya okuma kontrol terminal.
/* for (mk=0;mk<ToplamSatir;mk++)
{ printf("%d=%s\n",mk, Mesaj2[mk]); }*/
return 0;
}
int AramaDosya0 ()
{
MenuMesaj2("/tmp/status.html");
Sifirla();
Arama0();
//Listele3();
return 0;
}
int AramaDosya1 ()
{KontrolMenu=1;
MenuMesaj2("/tmp/readers.html");
Sifirla();
Arama1();
//Listele3();
return 0;
}
int AramaDosya2 ()
{//KontrolMenu=3;
MenuMesaj2("/tmp/userconfig.html");
Sifirla();
Arama2();
return 0;
}
int AramaDosya3 ()
{KontrolMenu=2;
MenuMesaj2("/tmp/card.html");
// Sifirla();
Arama3();
return 0;
}
int ***leAra(char str[],char * aranan)
{//char str[] ="This is a simple string";
int d;
char * pch;
pch = strstr (str,aranan);
Kontrolp=0;
//d=strlen(pch);
if (pch!='\0')
{Kontrolp=1;
// printf("pchhh %s\n",pch);
}
//printf("Kontrol %d\n",Kontrolp);
return 0;
}
Arama0() //status
{
int yaz;
int B;
B=0;
for(yaz=0;yaz<ToplamSatir;++yaz)
{
ilkkelime="TR class=\"p\"";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1) goto bak;
////
// ilkkelime="TR class=\"s\"";
// ***leAra(Mesaj2[yaz],ilkkelime);
// if (Kontrolp==1) goto bak;
///
ilkkelime="TR class=\"c\"";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1) goto bak;
///
// ilkkelime="TR class=\"h\"";
// ***leAra(Mesaj2[yaz],ilkkelime);
bak:printf;
if (Kontrolp==1)
{
///Yapilacaklar
//printf("Bulduumm ..... %d\n",yaz);
ilkkelime1="<TD align=\"center\">";
sonkelime1= " <A";
SatirTara (Mesaj2[yaz+4],ilkkelime1,sonkelime1,0);
// printf( "Mesaj2 %s\n",Mesaj2[yaz+4]);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].PID ,"%s",ara***le);
//printf( "Veri %s\n",Veri[B].PID);
}
// Veri.TYPE;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+6],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].TYPE ,"%s",ara***le);
}
// Veri.ID;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+7],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].ID ,"%s",ara***le);
}
//Veri.LABEL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+8],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LABEL ,"%s",ara***le);
Veri[B].LABEL[10]='\0';
}
//Veri.AU;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+9],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].AU ,"%s",ara***le);
}
//Veri.CRYPTED;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+10],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].CRYPTED ,"%s",ara***le);
}
//Veri.ADDRESS;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+11],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].ADDRESS ,"%s",ara***le);
}
//Veri.PORT;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+12],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].PORT ,"%s",ara***le);
}
//Veri.PROTOCOL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+13],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].PROTOCOL ,"%s",ara***le);
}
//Veri.LDATA;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+14],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LDATA ,"%s",ara***le);
}
//Veri.LTIME;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+15],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LTIME ,"%s",ara***le);
}
//Veri.ONLINE;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+16],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].ONLINE ,"%s",ara***le);
}
//Veri.CAID;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+17],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].CAID ,"%s",ara***le);
}
//Veri.CHANNEL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+18],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].CHANNEL ,"%s",ara***le);
Veri[B].CHANNEL[30]='\0';
}
// Veri.LBVALUE;
ilkkelime1="\"Reset statistics for this reader/ proxy\">";
sonkelime1= "</A></TD>";
SatirTara (Mesaj2[yaz+19],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LBVALUE ,"%s",ara***le);
}
//Veri.IDLE;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+20],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].IDLE ,"%s",ara***le);
}
// Veri.STATUS;
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+21],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].STATUS ,"%s",ara***le);
}
//yaz=yaz+20;
Kontrolp=0;
B=B+1;
}
}
}
/////////////////////////////
////////////////////////////7
Arama1() ///Readers
{
int yaz;
int B;
B=0;
for(yaz=0;yaz<ToplamSatir;++yaz)
{
ilkkelime="Delete Reader";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1)
{
///Yapilacaklar
//printf("Bulduumm ..... %d\n",yaz);
//Veri.LABEL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+1],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LABEL ,"%s",ara***le);
Veri[B].LABEL[10]='\0';
}
//Veri.PROTOCOL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+2],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].PROTOCOL ,"%s",ara***le);
}
//Veri.EMMERROR
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+3],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].EMMERROR ,"%s",ara***le);
}
//Veri.EMMWRITTEN
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+4],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].EMMWRITTEN ,"%s",ara***le);
}
//Veri.EMMSKIPPED
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+5],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].EMMSKIPPED ,"%s",ara***le);
}
//Veri.EMMBLOCKED
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+6],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].EMMBLOCKED ,"%s",ara***le);
}
Kontrolp=0;
B=B+1;
}
}
}
/////////////////////////////
////////////////////////////7
Arama2() ///usersconfig
{
int yaz;
int B;
B=0;
for(yaz=0;yaz<ToplamSatir;++yaz)
{
ilkkelime="ALT=\"disable this account\"/></A></TD>";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1)
{
///Yapilacaklar
//printf("Bulduumm ..... %d\n",yaz);
//Veri.LABEL;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+1],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LABEL ,"%s",ara***le);
Veri[B].LABEL[10]='\0';
}
//Veri.STATUS;
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+2],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
if (strcmp("<b>online</b>",ara***le)==0)
{sprintf(Veri[B].STATUS ,"online");}
else
{
sprintf(Veri[B].STATUS ,"%s",ara***le);
}
}
//Veri.PROTOCOL
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+3],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].PROTOCOL ,"%s",ara***le);
}
//Veri.CHANNEL
ilkkelime1="<TD>";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+4],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].CHANNEL ,"%s",ara***le);
Veri[B].CHANNEL[25]='\0';
}
//Veri.IDLE
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+5],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].IDLE ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+6],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].OK ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+7],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].NOK ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+8],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].IGN ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+9],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].TOUT ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+10],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].CACHE ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+11],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].TUN ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+12],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].LTIME ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+13],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].EOK ,"%s",ara***le);
}
//Veri............
ilkkelime1="<TD align=\"center\">";
sonkelime1= "</TD>";
SatirTara (Mesaj2[yaz+14],ilkkelime1,sonkelime1,0);
if (strlen(ara***le) > 0)
{
sprintf(Veri[B].ENOK ,"%s",ara***le);
}
Kontrolp=0;
B=B+1;
}
}
}
Arama3() ///usersconfig
{
int yaz,Basla,Son;
int B,h;
B=0;
for (h=0;h<5000;h++)
{
Card[h][0]='\0';
}
for(yaz=0;yaz<ToplamSatir;++yaz)
{
ilkkelime="<DIV class=\"log\">";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1)
{
Basla=yaz+1;
}
ilkkelime="</DIV>";
***leAra(Mesaj2[yaz],ilkkelime);
if (Kontrolp==1)
{
Son=yaz;
}
}
for(yaz=Basla;yaz<Son;++yaz)
{
// ilkkelime="<DIV class=\"log\">";
// ***leAra(Mesaj2[yaz],ilkkelime);
// if (Kontrolp==1)
// {
ilkkelime1=" ";
AraSil (Mesaj2[yaz],ilkkelime1);
sprintf(Mesaj2[yaz],"%s",ara***le);
ilkkelime1="<BR>";
AraSil (Mesaj2[yaz],ilkkelime1);
sprintf(Card[B],"%s",ara***le);
printf("%s \n",Card[B]);
Kontrolp=0;
B=B+1;
}
// }
}
//Listeleme Status
int Listele0()
{ int uzak;
uzak=28;
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
//BUSEKÄ°LDEDE YAZILABÄ°LÄ°R GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,HEIGHT);
GrSetGCForeground(main_gc, GR_RGB(100,100,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,70);
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrText(main_window, main_gc,400,30,"Back Ok Button", -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 15, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,25,60,"PID-Type-ID-Label-Au-Cryp-Address-Port-Protocal - L.Date-L.Time - CAID:SRVID - Current Channel - LB Val. - Status", -1, GR_TFASCII);
int ktm,adim2=1;
char sira[100];
adim=60;
char kj[20];
for (k=kartim;k<kartim+12;k++)
{
adim=adim+35;
adim2=-adim2;
if (adim2==-1)
{
GrSetGCForeground(main_gc, GR_RGB(100,100,100));
GrFillRect(main_window, main_gc,0,adim+10, WIDTH ,35);
}
***leAra (Veri[k].STATUS,"OFF");
if (Kontrolp== 1)
{
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
font = GrCreateFont(menuResim[0], 13, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
}
else
{
GrSetGCForeground(main_gc, GR_RGB(0,255,0));
font = GrCreateFont(menuResim[0], 13, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
}
// GrSetGCForeground(main_gc, GR_RGB(255,255,255));
sprintf(sira,"%d-",k+1);
GrText(main_window, main_gc,0,adim,sira, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak-5,adim,Veri[k].PID, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*2+10,adim,Veri[k].TYPE, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*3-5,adim,Veri[k].ID, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*4-15,adim,Veri[k].LABEL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*5+20,adim,Veri[k].AU, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*6+10,adim,Veri[k].CRYPTED, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*7,adim,Veri[k].ADDRESS, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*8+70,adim,Veri[k].PORT, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*9+80,adim,Veri[k].PROTOCOL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*10+120,adim,Veri[k].LDATA, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*11+150,adim,Veri[k].LTIME, -1, GR_TFASCII);
//GrText(main_window, main_gc,uzak*12+180,adim,Veri[k].ONLINE, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*12+180,adim,Veri[k].CAID, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*14+210,adim,Veri[k].CHANNEL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*15+410,adim,Veri[k].LBVALUE, -1, GR_TFASCII);
//GrText(main_window, main_gc,uzak*16+390,adim,Veri[k].IDLE, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*17+400,adim,Veri[k].STATUS, -1, GR_TFASCII);
}
}
////////////////////////////////////////////////
/////////////////////////////////////////////////
//Listeleme Readers
int Listele1()
{ int uzak;
uzak=32;
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
//BUSEKÄ°LDEDE YAZILABÄ°LÄ°R GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,HEIGHT);
GrSetGCForeground(main_gc, GR_RGB(100,100,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,70);
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrText(main_window, main_gc,340,30,"Ok Button Back-Green Button Cardlist", -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,25,60,"Reader Protocol EMM error EMM written EMM skipped EMM blocked", -1, GR_TFASCII);
int ktm,adim2=1;
adim=60;
char kj[20];
menuid=0;
for (k=kartim;k<kartim+12;k++)
{
adim=adim+35;
adim2=-adim2;
if (adim2==-1)
{
GrSetGCForeground(main_gc, GR_RGB(100,100,100));
GrFillRect(main_window, main_gc,0,adim+10, WIDTH ,35);
}
if (menuid==atla1){ //2. menu icin
Secim= k;
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrFillRect(main_window, main_gc,0,70+(atla1)*35, WIDTH,35);
GrSetGCForeground(main_gc, GR_RGB(100,0,0));
}
menuid=menuid+1; //2. menu icin
GrSetGCForeground(main_gc, GR_RGB(100,255,255));
font = GrCreateFont(menuResim[0], 15, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
// GrSetGCForeground(main_gc, GR_RGB(255,255,255));
char sira[100];
sprintf(sira,"%d-",k+1);
GrText(main_window, main_gc,0,adim,sira, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak,adim,Veri[k].LABEL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*5,adim,Veri[k].PROTOCOL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*10,adim,Veri[k].EMMERROR, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*15,adim,Veri[k].EMMWRITTEN, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*20,adim,Veri[k].EMMSKIPPED, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*25,adim,Veri[k].EMMBLOCKED, -1, GR_TFASCII);
}
}
////////////////////////////////////////////////
/////////////////////////////////////////////////
//Listeleme userconfig
int Listele2()
{ int uzak;
uzak=32;
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
//BUSEKÄ°LDEDE YAZILABÄ°LÄ°R GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,HEIGHT);
GrSetGCForeground(main_gc, GR_RGB(100,100,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,70);
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrText(main_window, main_gc,400,30,"Ok Button Back", -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 13, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,25,60,"Label Status Protocol Last Channel Idle OK NOK IGN TOUT CACHE TUN LTIME EOK ENOK", -1, GR_TFASCII);
int ktm,adim2=1;
menuid=0; //2. menu icin
adim=60;
char kj[20];
for (k=kartim;k<kartim+12;k++)
{
adim=adim+35;
adim2=-adim2;
if (adim2==-1)
{
GrSetGCForeground(main_gc, GR_RGB(100,100,100));
GrFillRect(main_window, main_gc,0,adim+10, WIDTH ,35);
}
***leAra (Veri[k].STATUS,"offline");
if (Kontrolp== 1)
{
GrSetGCForeground(main_gc, GR_RGB(255,0,0));
font = GrCreateFont(menuResim[0], 13, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
}
else
{
GrSetGCForeground(main_gc, GR_RGB(0,255,0));
font = GrCreateFont(menuResim[0], 13, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
}
;
// GrSetGCForeground(main_gc, GR_RGB(255,255,255));
char sira[100];
sprintf(sira,"%d-",k+1);
GrText(main_window, main_gc,0,adim,sira, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak,adim,Veri[k].LABEL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*4,adim,Veri[k].STATUS, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*7,adim,Veri[k].PROTOCOL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*9,adim,Veri[k].CHANNEL, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*14,adim,Veri[k].IDLE, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*16,adim,Veri[k].OK, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*18,adim,Veri[k].NOK, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*20,adim,Veri[k].IGN, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*21,adim,Veri[k].TOUT, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*23,adim,Veri[k].CACHE, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*25,adim,Veri[k].TUN, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*26,adim,Veri[k].LTIME, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*28,adim,Veri[k].EOK, -1, GR_TFASCII);
GrText(main_window, main_gc,uzak*29,adim,Veri[k].ENOK, -1, GR_TFASCII);
}
}
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>
/*
* This is an example showing how to get a single file from an FTP server.
* It delays the actual destination file creation until the first write
* callback so that it won't create an empty file in case the remote file
* doesn't exist or something else fails.
*/
struct FtpFile {
const char *filename;
FILE *stream;
};
static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
{
struct FtpFile *out=(struct FtpFile *)stream;
if(out && !out->stream) {
/* open file for writing */
out->stream=fopen(out->filename, "wb");
if(!out->stream)
return -1; /* failure, can't open file to write */
}
return fwrite(buffer, size, nmemb, out->stream);
}
int Bilgial(char *isim)
{
CURL *curl;
CURLcode res;
struct FtpFile ftpfile={ isim,NULL };
curl_global_init(CURL_GLOBAL_DEFA ULT);
curl = curl_easy_init();
if(curl) {
/*
* Get curl 7.9.2 from sunet.se's FTP site. curl 7.9.2 is most likely not
* present there by the time you read this, so you'd better replace the
* URL with one that works!
*/
char userpass[200];
sprintf(userpass,"%s:%s",menux[10],menux[11]);
/* Define our callback to get called when there's data to be written */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); // Allow redirection
curl_easy_setopt(curl,CURLOPT_COO KIEFILE, "cookie.txt");
curl_easy_setopt(curl,CURLOPT_REF ERER, "http://www.google.com");
curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
// curl_easy_setopt(curl, CURLOPT_HEADER, 0);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt( curl, CURLOPT_USERPWD, userpass);
curl_easy_setopt(curl, CURLOPT_URL,Adress);
// curl_easy_setopt(curl,CURLOPT_POS T, 1);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH,CURLAUTH_ANY);
/* Set a pointer to our struct to pass to the callback */
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
curl_easy_setopt(curl,CURLOPT_CON NECTTIMEOUT,30);
/* Switch on full protocol/debug output */
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
if(CURLE_OK != res) {
/* we failed */
fprintf(stderr, "curl told us %d\n", res);
}
}
if(ftpfile.stream)
fclose(ftpfile.stream); /* close the local file */
curl_global_cleanup();
return 0;
}
SatirTara(char str[],char *arananbas,char *arananson,int Sil)
{
char * ilk,* ikinci,uzunlukm,m,uzm;
int bas,son,uzbas,uzson,artis, arac,ekleh,v;
char Sbas[100],Sson[100];
sprintf(hafiza,"%s",str);
ilk = strstr (str,arananbas);
ara***le[0]='\0';
sprintf(Sbas,"%d",ilk-str);
yeniden:printf;
ikinci = strstr (str,arananson);
sprintf(Sson,"%d",ikinci-str);
bas=atoi(Sbas)+strlen(arananbas);
son=atoi(Sson)-1;
int buraya;
if (son < 0 || bas < 0)
{Kontrolp=0;
return 0;
}
else
{
if (son < bas)
{ekleh=0;
buraya=strlen(arananson);
for(ekleh=son;ekleh<=son+buraya;ekleh=++ekleh)
{
str[ekleh]='$';
}
goto yeniden;
}
}
arac=0;
for(artis=bas;artis<=son;++artis)
{
ara***le[arac]=str[artis];
arac=arac+1;
}
sprintf(str,"%s",hafiza);
for(artis=bas-strlen(arananbas);artis<=son+strlen(arananson);++artis)
{
if (Sil==1)
{
str[artis]='#';
}
}
ara***le[arac]='\0';
if (strlen(ara***le)>0) Kontrolp=1;
return 0;
}
int Sifirla()
{int n;
for (n=0;n<1000;n++)
{
Veri[n].PID[0]='\0';
Veri[n].TYPE[0]='\0';
Veri[n].ID[0]='\0';
Veri[n].LABEL[0]='\0';
Veri[n].AU[0]='\0';
Veri[n].CRYPTED[0]='\0';
Veri[n].ADDRESS[0]='\0';
Veri[n].PORT[0]='\0';;
Veri[n].PROTOCOL[0]='\0';
Veri[n].LDATA[0]='\0';
Veri[n].LTIME[0]='\0';
Veri[n].ONLINE[0]='\0';
Veri[n].CAID[0]='\0';
Veri[n].CHANNEL[0]='\0';
Veri[n].LBVALUE[0]='\0';
Veri[n].IDLE[0]='\0';
Veri[n].STATUS[0]='\0';
Veri[n].EMMERROR[0]='\0';
Veri[n].EMMWRITTEN[0]='\0';
Veri[n].EMMSKIPPED[0]='\0';
Veri[n].EMMBLOCKED[0]='\0';
Veri[n].OK[0]='\0';
Veri[n].NOK[0]='\0';
Veri[n].IGN[0]='\0';
Veri[n].TOUT[0]='\0';
Veri[n].CACHE[0]='\0';
Veri[n].TUN[0]='\0';
Veri[n].EOK[0]='\0';
Veri[n].ENOK[0]='\0';
}
return 0;
}
AraSil(char str[],char *aranan)
{
char * ilk;
int nm,uzunlukc,bas;
uzunlukc=strlen(aranan);
char Sbas[100],Sson[100];
ara***le[0]='\0';
yeniden:printf;
ilk = strstr (str,aranan );
sprintf(Sbas,"%d",ilk-str);
bas=atoi(Sbas);
//printf("bbb=%d--uzunlukc=%d \n",bas,uzunlukc);
if (bas<0) goto kac;
for(nm=bas;nm<bas+uzunlukc;nm++)
{
str[nm]=' ';
}
if(ilk!=0) goto yeniden;
kac:printf;
uzunlukc=strlen(str);
for(nm=0;nm<uzunlukc;nm++)
{
ara***le[nm]=str[nm];
ara***le[nm+1]='\0';
}
if (strlen(ara***le)>0) Kontrolp=1;
return 0;
}
int Listele3()
{ int uzak;
uzak=32;
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
//BUSEKÄ°LDEDE YAZILABÄ°LÄ°R GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,HEIGHT);
GrSetGCForeground(main_gc, GR_RGB(100,100,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,70);
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrText(main_window, main_gc,400,30,"Back Ok Button", -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,250,50,"<------------------Card List------------------>", -1, GR_TFASCII);
int ktm,adim2=1;
menuid=0; //2. menu icin
adim=60;
char kj[20];
for (k=kartim;k<kartim+12;k++)
{
adim=adim+35;
adim2=-adim2;
if (adim2==-1)
{
GrSetGCForeground(main_gc, GR_RGB(100,100,100));
GrFillRect(main_window, main_gc,0,adim+10, WIDTH ,35);
}
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 17, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrText(main_window, main_gc,uzak,adim,Card[k], -1, GR_TFASCII);
}
}
int YesilTus()
{
menuatla=-1;
if (KontrolMenu==1)
{
//http://192.168.2.2:83/entitlements.html?reader=caossat
system("rm /tmp/card.html");
sprintf(Adress,"%s:%s/entitlements.html?reader=%s",menux[13],menux[12],Veri[Secim].LABEL);
sprintf(hata,"Server connection..");
Bekle(hata);
Bekle(hata);
Bilgial("/tmp/card.html");
sleep (1);
AramaDosya3();
if(kontrolp==0)
{sprintf(hata,"Server cannot connection.");
Bekle(hata);
Bekle(hata); }
}
}
int Listele()
{
GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
//BUSEKÄ°LDEDE YAZILABÄ°LÄ°R GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
GrSetGCForeground(main_gc, GR_RGB(0,0,0));
GrFillRect(main_window, main_gc,0,0, WIDTH,HEIGHT);
font = GrCreateFont(menuResim[0], 20, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
GrSetGCForeground(main_gc, GR_RGB(0,0,255));
GrText(main_window, main_gc,400,30,"Back Ok Button", -1, GR_TFASCII);
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
int ktm;
GrSetGCForeground(main_gc, GR_RGB(255,255,255));
font = GrCreateFont(menuResim[0], 15, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
adim=30;
char kj[5];
for (k=kartim;k<kartim+20;k++)
{ adim=adim+20;
GrText(main_window, main_gc,30,adim,Adres[k], -1, GR_TFASCII);
}
}
int Oku2()
{ FILE *fp1;
char birkelime[500];
char *c;
int x,h,uz,uzunluk;
for (h=0;h<5000;h++)
{
Adres[h][0]='\0';
}
d=0;
fp1 = fopen("/tmp/multimenu.tmp","r");
if (fp1 == NULL)
{ printf("Dosya yok");}
else
{
do {
c = fgets(birkelime,500,fp1); /* bir satir okuyalim */
if (c != NULL)
{
for(uz=0;uz<500;uz++)
{
Adres[d][uz]='\0';
}
for(uz=0;uz<500;uz++)
{
if (birkelime[uz]=='\0')
{
uzunluk=uz;
goto atla;
}
}
atla:printf("");
for(x=0;x<uzunluk;x++)
{
Adres[d][x]=birkelime[x];
}
Adres[d][x-1]= '\0';
d=d+1;
/// okuma olayı
}
} while (c != NULL);
d=d-1;
fclose(fp1);
/*
int y;
for (y=d;y<2000;y++)
{
for(uz=0;uz<500;uz++)
{
Adres[y][uz]='\0';
} }
for(x=0;x<d;x++)
{ printf("%s",Adres[x],x);
}*/
}}
int DKontrol()
{ FILE *fp1;
kontrolp=1;
char birkelime[500];
char *c;
fp1 = fopen("/tmp/multimenu.tmp","r");
if (fp1 == NULL)
{kontrolp=0;
printf("Dosya bulunamadı..\n");}
else
{ c = fgets(birkelime,500,fp1); /* bir satir okuyalim */
if (c == NULL)
{ kontrolp=0;
fclose(fp1);}
else
{ kontrolp=1;
fclose(fp1);}
}
}
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.