Rev 3128 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3128 | Rev 3129 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | blink; |
6 | blink; |
7 | 7 | ||
Line 8... | Line 8... | ||
8 | char download_path[]="/rd/1/.download"; |
8 | char download_path[]="/rd/1/.download"; |
9 | char search_path[]="http://nigma.ru/index.php?s="; |
9 | char search_path[]="http://nigma.ru/index.php?s="; |
10 | char version[]=" Text-based Browser 0.98"; |
10 | char version[]=" Text-based Browser 0.98.2"; |
Line 11... | Line 11... | ||
11 | 11 | ||
12 | 12 | ||
13 | struct TWebBrowser { |
13 | struct TWebBrowser { |
Line 728... | Line 728... | ||
728 | if (!chTag("hr")) |
728 | if (!chTag("hr")) |
729 | { |
729 | { |
730 | TextGoDown(left1, top1, width1); |
730 | TextGoDown(left1, top1, width1); |
731 | TextGoDown(left1, top1 + 10, width1); |
731 | TextGoDown(left1, top1 + 10, width1); |
732 | IF(strcmp(#parametr, "color=") == 0) hr_color = GetColor(#options); |
732 | if (anchor) return; |
- | 733 | IF(strcmp(#parametr, "color=") == 0) hr_color = GetColor(#options); |
|
733 | ELSE hr_color = 0x999999; |
734 | ELSE hr_color = 0x999999; |
734 | IF(stroka > 0) DrawBar(left1, top1 + 14, width1 - 8, 1, hr_color); |
735 | IF(stroka > 0) DrawBar(left1, top1 + 14, width1 - 8, 1, hr_color); |
735 | } |
736 | } |
736 | if (!chTag("img")) |
737 | if (!chTag("input")) |
- | 738 | { |
|
- | 739 | do{ |
|
- | 740 | if (!strcmp(#parametr, "type=")) if ((!strcmp(#options, "radio")) || (!strcmp(#options, "checkbox"))) |
|
- | 741 | { |
|
- | 742 | if (!anchor) && (stroka > 0) CheckBox(stolbec*6 + left1,top1-2,10,10, 0, "\0", 0x888888, text_colors[text_color_index], 0); |
|
- | 743 | stolbec+=2; |
|
- | 744 | } |
|
- | 745 | if (!strcmp(#parametr, "type=")) if ((!strcmp(#options, "text")) || (!strcmp(#options, "password"))) |
|
- | 746 | { |
|
- | 747 | if (!anchor) && (stroka > 0) CheckBox(stolbec*6 + left1,top1-2,90,10, 0, "\0", 0x555555, 0, 0); |
|
- | 748 | stolbec+=16; |
|
- | 749 | } |
|
- | 750 | if (!strcmp(#parametr, "type=")) if ((!strcmp(#options, "button")) || (!strcmp(#options, "file")) || (!strcmp(#options, "submit"))) |
|
- | 751 | { |
|
- | 752 | if (!anchor) && (stroka > 0) DrawCaptButton(stolbec*6 + left1,top1-2,60,10, 0, 0xCCCccc, 0, "Button"); |
|
- | 753 | stolbec+=21; |
|
- | 754 | } |
|
- | 755 | } while(GetNextParam()); |
|
- | 756 | } |
|
- | 757 | if (!chTag("img")) |
|
737 | { |
758 | { |
738 | Images( left1, top1, width1); |
759 | Images( left1, top1, width1); |
739 | return; |
760 | return; |
740 | } |
761 | } |
741 | if (!chTag("meta")) || (!chTag("?xml")) |
762 | if (!chTag("meta")) || (!chTag("?xml")) |
Line 792... | Line 813... | ||
792 | { |
813 | { |
793 | int i; |
814 | int i; |
794 | for (i=0; i<=num_of_pics; i++) |
815 | for (i=0; i<=num_of_pics; i++) |
795 | { |
816 | { |
796 | mem_Free(pics[num_of_pics].image); |
817 | img_destroy stdcall (pics[num_of_pics].image); |
797 | pics[num_of_pics].path=NULL; |
818 | pics[num_of_pics].path = NULL; |
798 | } |
819 | } |
799 | num_of_pics=0; |
820 | num_of_pics=0; |
800 | } |
821 | } |
801 | 822 | ||
Line 814... | Line 835... | ||
814 | else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
835 | else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
815 | 836 | ||
Line 816... | Line 837... | ||
816 | if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0) |
837 | if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0) |
817 | { |
838 | { |
818 | img_path[strrchr(#img_path, '/')] = 0x00; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî / |
839 | img_path[strrchr(#img_path, '/')] = '\0'; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî / |
819 | strcat(#img_path, #options); |
840 | strcat(#img_path, #options); |
Line 820... | Line 841... | ||
820 | 841 | ||
821 | cur_pic=GetOrSetPicNum(#img_path); |
842 | cur_pic=GetOrSetPicNum(#img_path); |
822 | if (!pics[cur_pic].path) |
843 | if (!pics[cur_pic].path) |