Редакция 192 | Редакция 194 | К новейшей редакции | Только различия | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 192 | Редакция 193 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | 2 | ||
3 | class Core { |
3 | class Core { |
4 | 4 | ||
5 | function getRepList($distro,$version,$dblink) { |
5 | function getRepList($distro,$version,$dblink) { |
6 | $query =& $dblink->query("SELECT * FROM settings"); |
6 | $query =& $dblink->query("SELECT * FROM settings"); |
7 | $settings = array(); |
7 | $settings = array(); |
8 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
8 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
9 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
9 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
10 | }; |
10 | }; |
11 | $query =& $dblink->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$distro' AND v.version_id='$version'"); |
11 | $query =& $dblink->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$distro' AND v.version_id='$version'"); |
12 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
12 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
13 | $query =& $dblink->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE v.ver_id='$version' AND r.rtype_id!=3 ORDER BY r.rtype_id, r.scheme_id ASC"); |
13 | $query =& $dblink->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE v.ver_id='$version' AND r.rtype_id!=3 ORDER BY r.rtype_id, r.scheme_id ASC"); |
14 | $pre=-1; |
14 | $pre=-1; |
15 | while ($query->fetchInto($resinfo, DB_FETCHMODE_ASSOC)) { |
15 | while ($query->fetchInto($resinfo, DB_FETCHMODE_ASSOC)) { |
16 | $repscheme = stripslashes($resinfo["scheme"]); |
16 | $repscheme = stripslashes($resinfo["scheme"]); |
17 | 17 | ||
18 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE |
18 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE |
19 | r.rep_id='$resinfo[rep_id]'"); |
19 | r.rep_id='$resinfo[rep_id]'"); |
20 | $sections = ""; |
20 | $sections = ""; |
21 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
21 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
22 | $sections .= stripslashes($section["sectname"])." "; |
22 | $sections .= stripslashes($section["sectname"])." "; |
23 | }
|
23 | }
|
24 | 24 | ||
25 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |
25 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |
26 | $repscheme = str_replace("{PROTO}",$settings["proto"],$repscheme); |
26 | $repscheme = str_replace("{PROTO}",$settings["proto"],$repscheme); |
27 | $repscheme = str_replace("{URL}",$settings["url"],$repscheme); |
27 | $repscheme = str_replace("{URL}",$settings["url"],$repscheme); |
28 | $repscheme = str_replace("{REP}",stripslashes($resinfo["repname"]),$repscheme); |
28 | $repscheme = str_replace("{REP}",stripslashes($resinfo["repname"]),$repscheme); |
29 | $repscheme = str_replace("{DIST}",stripslashes($infodist["vcodename"]),$repscheme); |
29 | $repscheme = str_replace("{DIST}",stripslashes($infodist["vcodename"]),$repscheme); |
30 | $repscheme = str_replace("{SECT}",$sections,$repscheme); |
30 | $repscheme = str_replace("{SECT}",$sections,$repscheme); |
31 | $repscheme = str_replace("{ROOT}",stripslashes($resinfo["root_folder"]),$repscheme); |
31 | $repscheme = str_replace("{ROOT}",stripslashes($resinfo["root_folder"]),$repscheme); |
32 | 32 | ||
33 | if($pre != $resinfo["orig_id"]) { |
33 | if($pre != $resinfo["orig_id"]) { |
34 | $result .= "### ".$resinfo["origin"]."( ".$resinfo["desk"]." ) - ".$resinfo["homeurl"]." ###\n"; |
34 | $result .= "### ".$resinfo["origin"]."( ".$resinfo["desk"]." ) - ".$resinfo["homeurl"]." ###\n"; |
35 | }
|
35 | }
|
36 | $pre = $resinfo["orig_id"]; |
36 | $pre = $resinfo["orig_id"]; |
37 | 37 | ||
38 | $result .= "# ".stripslashes($resinfo["repdescribe"])."\n".$repscheme."\n\n"; |
38 | $result .= "# ".stripslashes($resinfo["repdescribe"])."\n".$repscheme."\n\n"; |
39 | }
|
39 | }
|
40 | //////////////////////////////////////////
|
- | |
41 | ////
|
- | |
42 | /////////////////////////////////////////
|
- | |
43 | //////////////////////////////////////////
|
- | |
44 | ////
|
40 | |
45 | /////////////////////////////////////////
|
- | |
46 | if (count($_GET)>3){ |
41 | if (count($_GET)>3){ |
47 | $addsreps=array_values($_GET); |
42 | $addsreps=array_values($_GET); |
48 | for ($i=3;$i<count($addsreps);$i++){ |
43 | for ($i=3;$i<count($addsreps);$i++){ |
49 | $pre=-1; |
44 | $pre=-1; |
50 | $id=(int)$addsreps[$i]; |
45 | $id=(int)$addsreps[$i]; |
51 | $sql =& $dblink->query('SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE r.rep_id='.$id); |
46 | $sql =& $dblink->query('SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE r.rep_id='.$id); |
52 | $sql->fetchInto($resinfo, DB_FETCHMODE_ASSOC); |
47 | $sql->fetchInto($resinfo, DB_FETCHMODE_ASSOC); |
53 | 48 | ||
54 | $repscheme = stripslashes($resinfo["scheme"]); |
49 | $repscheme = stripslashes($resinfo["scheme"]); |
55 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE |
50 | $querysect =& $dblink->query("SELECT * FROM section s JOIN sect2rep r ON s.sect_id=r.sect_id WHERE |
56 | r.rep_id='$resinfo[rep_id]'"); |
51 | r.rep_id='$resinfo[rep_id]'"); |
57 | $sections = ""; |
52 | $sections = ""; |
58 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
53 | while ($querysect->fetchInto($section,DB_FETCHMODE_ASSOC)) { |
59 | $sections .= stripslashes($section["sectname"])." "; |
54 | $sections .= stripslashes($section["sectname"])." "; |
60 | }
|
55 | }
|
61 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |
56 | $repscheme = str_replace("{TYPE}",stripslashes($infodist["type"]),$repscheme); |
62 | $repscheme = str_replace("{PROTO}",$settings["proto"],$repscheme); |
57 | $repscheme = str_replace("{PROTO}",$settings["proto"],$repscheme); |
63 | $repscheme = str_replace("{URL}",$settings["url"],$repscheme); |
58 | $repscheme = str_replace("{URL}",$settings["url"],$repscheme); |
64 | $repscheme = str_replace("{REP}",stripslashes($resinfo["repname"]),$repscheme); |
59 | $repscheme = str_replace("{REP}",stripslashes($resinfo["repname"]),$repscheme); |
65 | $repscheme = str_replace("{DIST}",stripslashes($infodist["vcodename"]),$repscheme); |
60 | $repscheme = str_replace("{DIST}",stripslashes($infodist["vcodename"]),$repscheme); |
66 | $repscheme = str_replace("{SECT}",$sections,$repscheme); |
61 | $repscheme = str_replace("{SECT}",$sections,$repscheme); |
67 | $repscheme = str_replace("{ROOT}",stripslashes($resinfo["root_folder"]),$repscheme); |
62 | $repscheme = str_replace("{ROOT}",stripslashes($resinfo["root_folder"]),$repscheme); |
68 | if($pre != $resinfo["orig_id"]) { |
63 | if($pre != $resinfo["orig_id"]) { |
69 | $result .= "### ".$resinfo["origin"]."( ".$resinfo["desk"]." ) - ".$resinfo["homeurl"]." ###\n"; |
64 | $result .= "### ".$resinfo["origin"]."( ".$resinfo["desk"]." ) - ".$resinfo["homeurl"]." ###\n"; |
70 | }
|
65 | }
|
71 | $pre = $resinfo["orig_id"]; |
66 | $pre = $resinfo["orig_id"]; |
72 | $result .= "# ".stripslashes($resinfo["repdescribe"])."\n".$repscheme."\n\n"; |
67 | $result .= "# ".stripslashes($resinfo["repdescribe"])."\n".$repscheme."\n\n"; |
73 | }
|
68 | }
|
74 | }
|
69 | }
|
75 | //////////////////////////////////////////
|
- | |
76 | ////
|
- | |
77 | /////////////////////////////////////////
|
- | |
78 | //////////////////////////////////////////
|
- | |
79 | ////
|
- | |
80 | /////////////////////////////////////////
|
- | |
81 | - | ||
82 | 70 | ||
83 | return $result; |
71 | return $result; |
84 | }
|
72 | }
|
85 | 73 | ||
86 | function getInfo($message,$dblink){ |
74 | function getInfo($message,$dblink){ |
87 | $answer = array(); |
75 | $answer = array(); |
88 | 76 | ||
89 | if (preg_match("/linux/i",$message)) { |
77 | if (preg_match("/linux/i",$message)) { |
90 | $dist_id = 0; |
78 | $dist_id = 0; |
91 | $dist_info = ""; |
79 | $dist_info = ""; |
92 | $vers_id = 0; |
80 | $vers_id = 0; |
93 | $vers_info = ""; |
81 | $vers_info = ""; |
94 | $qd =& $dblink->query("SELECT * FROM distribution"); |
82 | $qd =& $dblink->query("SELECT * FROM distribution"); |
95 | while ($qd->fetchInto($res, DB_FETCHMODE_ASSOC)) { |
83 | while ($qd->fetchInto($res, DB_FETCHMODE_ASSOC)) { |
96 | if (preg_match("/".stripslashes($res["distua"])."/i",$message)) { |
84 | if (preg_match("/".stripslashes($res["distua"])."/i",$message)) { |
97 | $dist_id = $res["dist_id"]; |
85 | $dist_id = $res["dist_id"]; |
98 | $dist_info = stripslashes($res["distname"]); |
86 | $dist_info = stripslashes($res["distname"]); |
99 | $qv =& $dblink->query("SELECT * FROM version WHERE dist_id='$dist_id'"); |
87 | $qv =& $dblink->query("SELECT * FROM version WHERE dist_id='$dist_id'"); |
100 | while($qv->fetchInto($rev, DB_FETCHMODE_ASSOC)) { |
88 | while($qv->fetchInto($rev, DB_FETCHMODE_ASSOC)) { |
101 | if (preg_match("/".stripslashes($rev["vcodename"])."/i",$message)) { |
89 | if (preg_match("/".stripslashes($rev["vcodename"])."/i",$message)) { |
102 | $vers_id = $rev["version_id"]; |
90 | $vers_id = $rev["version_id"]; |
103 | $vers_info = stripslashes($rev["version"])." “".stripslashes($rev["vname"])."”"; |
91 | $vers_info = stripslashes($rev["version"])." “".stripslashes($rev["vname"])."”"; |
104 | }
|
92 | }
|
105 | }
|
93 | }
|
106 | }
|
94 | }
|
107 | }
|
95 | }
|
108 | $answer[] = "Linux"; |
96 | $answer[] = "Linux"; |
109 | $answer[] = "Судя по всему у Вас операционная система "; |
97 | $answer[] = "Судя по всему у Вас операционная система "; |
110 | if ($dist_id!=0) { |
98 | if ($dist_id!=0) { |
111 | $answer[] = $dist_id; |
99 | $answer[] = $dist_id; |
112 | $answer[] = $dist_info; |
100 | $answer[] = $dist_info; |
113 | }
|
101 | }
|
114 | if ($vers_id!=0) { |
102 | if ($vers_id!=0) { |
115 | $answer[] = $vers_id; |
103 | $answer[] = $vers_id; |
116 | $answer[] = $vers_info; |
104 | $answer[] = $vers_info; |
117 | }
|
105 | }
|
118 | 106 | ||
119 | } else { |
107 | } else { |
120 | $answer[] = "unknown"; |
108 | $answer[] = "unknown"; |
121 | $answer[] = "Ресурс рассчитан явно не на Вашу операционную систему!"; |
109 | $answer[] = "Ресурс рассчитан явно не на Вашу операционную систему!"; |
122 | }
|
110 | }
|
123 | 111 | ||
124 | return $answer; |
112 | return $answer; |
125 | }
|
113 | }
|
126 | 114 | ||
127 | function getInterfacesList($current,$dblink) { |
115 | function getInterfacesList($current,$dblink) { |
128 | $url = parse_url($current); |
116 | $url = parse_url($current); |
129 | $path = array(); |
117 | $path = array(); |
130 | $path = split("/",$url["path"]); |
118 | $path = split("/",$url["path"]); |
131 | $currentIF = str_replace(".php","",$path[count($path)-1]); |
119 | $currentIF = str_replace(".php","",$path[count($path)-1]); |
132 | $req =& $dblink->query("SELECT * FROM interfaces WHERE interface NOT LIKE '$currentIF'"); |
120 | $req =& $dblink->query("SELECT * FROM interfaces WHERE interface NOT LIKE '$currentIF'"); |
133 | $iflist = "<a href='./'>Интерфейсы</a>: "; |
121 | $iflist = "<a href='./'>Интерфейсы</a>: "; |
134 | while ($req->fetchInto($if, DB_FETCHMODE_ASSOC)) { |
122 | while ($req->fetchInto($if, DB_FETCHMODE_ASSOC)) { |
135 | $iflist .= "<a href='./".stripslashes($if["interface"]).".php'>".strtolower(stripslashes($if["interfaceinfo"]))."</a>, "; |
123 | $iflist .= "<a href='./".stripslashes($if["interface"]).".php'>".strtolower(stripslashes($if["interfaceinfo"]))."</a>, "; |
136 | }
|
124 | }
|
137 | $iflist = substr($iflist, 0, strlen($iflist)-2); |
125 | $iflist = substr($iflist, 0, strlen($iflist)-2); |
138 | return $iflist; |
126 | return $iflist; |
139 | }
|
127 | }
|
140 | 128 | ||
141 | function getCSSList($dblink) { |
129 | function getCSSList($dblink) { |
142 | $req =& $dblink->query("SELECT * FROM distribution"); |
130 | $req =& $dblink->query("SELECT * FROM distribution"); |
143 | if ($req->numRows()>0) { |
131 | if ($req->numRows()>0) { |
144 | $css = "<style type=\"text/css\">\n"; |
132 | $css = "<style type=\"text/css\">\n"; |
145 | while ($req->fetchInto($dist, DB_FETCHMODE_ASSOC)) { |
133 | while ($req->fetchInto($dist, DB_FETCHMODE_ASSOC)) { |
146 | if ($dist["distlogo"]) { |
134 | if ($dist["distlogo"]) { |
147 | $css .= ".".stripslashes($dist["distua"])." { display: inline; padding-left: 15px; background: transparent url(./img/logo/".stripslashes($dist["distua"]).".png) top left no-repeat; }\n"; |
135 | $css .= ".".stripslashes($dist["distua"])." { display: inline; padding-left: 15px; background: transparent url(./img/logo/".stripslashes($dist["distua"]).".png) top left no-repeat; }\n"; |
148 | $css .= ".".stripslashes($dist["distua"])."-em { display: inline; padding-left: 30px; background: transparent url(./img/logo/".stripslashes($dist["distua"])."-em.png) top left no-repeat; }\n"; |
136 | $css .= ".".stripslashes($dist["distua"])."-em { display: inline; padding-left: 30px; background: transparent url(./img/logo/".stripslashes($dist["distua"])."-em.png) top left no-repeat; }\n"; |
149 | } else { |
137 | } else { |
150 | $css .= ""; |
138 | $css .= ""; |
151 | }
|
139 | }
|
152 | }
|
140 | }
|
153 | $css .= "</style>"; |
141 | $css .= "</style>"; |
154 | } else { |
142 | } else { |
155 | $css = ""; |
143 | $css = ""; |
156 | }
|
144 | }
|
157 | return $css; |
145 | return $css; |
158 | }
|
146 | }
|
159 | 147 | ||
160 | function getSetting($setting, $dblink) { |
148 | function getSetting($setting, $dblink) { |
161 | $query =& $dblink->query("SELECT * FROM settings WHERE opt LIKE '".$setting."'"); |
149 | $query =& $dblink->query("SELECT * FROM settings WHERE opt LIKE '".$setting."'"); |
162 | $query->fetchInto($sett, DB_FETCHMODE_ASSOC); |
150 | $query->fetchInto($sett, DB_FETCHMODE_ASSOC); |
163 | return stripslashes($sett["optvalue"]); |
151 | return stripslashes($sett["optvalue"]); |
164 | }
|
152 | }
|
165 | 153 | ||
166 | function getUUID($param) { |
154 | function getUUID($param) { |
167 | $param_s = md5($param); |
155 | $param_s = md5($param); |
168 | $time_low = bin2hex(substr($param_s,0, 4)); |
156 | $time_low = bin2hex(substr($param_s,0, 4)); |
169 | $time_mid = bin2hex(substr($param_s,4, 2)); |
157 | $time_mid = bin2hex(substr($param_s,4, 2)); |
170 | $time_hi_and_version = bin2hex(substr($param_s,6, 2)); |
158 | $time_hi_and_version = bin2hex(substr($param_s,6, 2)); |
171 | $clock_seq_hi_and_reserved = bin2hex(substr($param_s,8, 2)); |
159 | $clock_seq_hi_and_reserved = bin2hex(substr($param_s,8, 2)); |
172 | $node = bin2hex(substr($param_s,10, 6)); |
160 | $node = bin2hex(substr($param_s,10, 6)); |
173 | 161 | ||
174 | $time_hi_and_version = hexdec($time_hi_and_version); |
162 | $time_hi_and_version = hexdec($time_hi_and_version); |
175 | $time_hi_and_version = $time_hi_and_version >> 4; |
163 | $time_hi_and_version = $time_hi_and_version >> 4; |
176 | $time_hi_and_version = $time_hi_and_version | 0x4000; |
164 | $time_hi_and_version = $time_hi_and_version | 0x4000; |
177 | 165 | ||
178 | $clock_seq_hi_and_reserved = hexdec($clock_seq_hi_and_reserved); |
166 | $clock_seq_hi_and_reserved = hexdec($clock_seq_hi_and_reserved); |
179 | $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved >> 2; |
167 | $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved >> 2; |
180 | $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved | 0x8000; |
168 | $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved | 0x8000; |
181 | 169 | ||
182 | return sprintf('%08s-%04s-%04x-%04x-%012s',$time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node); |
170 | return sprintf('%08s-%04s-%04x-%04x-%012s',$time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node); |
183 | }
|
171 | }
|
184 | 172 | ||
185 | 173 | ||
186 | function getAddsRepList($distro,$version,$dblink) { |
174 | function getAddsRepList($distro,$version,$dblink) { |
187 | $query =& $dblink->query("SELECT * FROM settings"); |
175 | $query =& $dblink->query("SELECT * FROM settings"); |
188 | $settings = array(); |
176 | $settings = array(); |
189 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
177 | while ($query->fetchInto($setting, DB_FETCHMODE_ASSOC)) { |
190 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
178 | $settings[stripslashes($setting["opt"])] = stripslashes($setting["optvalue"]); |
191 | }; |
179 | }; |
192 | $query =& $dblink->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$distro' AND v.version_id='$version'"); |
180 | $query =& $dblink->query("SELECT * FROM version v JOIN distribution d ON d.dist_id=v.dist_id JOIN dtype p ON d.disttype=p.type_id WHERE v.dist_id='$distro' AND v.version_id='$version'"); |
193 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
181 | $query->fetchInto($infodist, DB_FETCHMODE_ASSOC); |
194 | $query =& $dblink->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE v.ver_id='$version' AND r.rtype_id=3 ORDER BY r.rtype_id, r.scheme_id ASC"); |
182 | $query =& $dblink->query("SELECT * FROM repository r JOIN ver2rep v ON r.rep_id=v.rep_id JOIN origin o ON o.orig_id=r.orig_id JOIN version v2 ON v.ver_id=v2.version_id JOIN scheme s ON s.scheme_id=r.scheme_id JOIN root r2 ON r2.root_id=r.root_id WHERE v.ver_id='$version' AND r.rtype_id=3 ORDER BY r.rtype_id, r.scheme_id ASC"); |
195 | $result.='Включить дополнительные репозитории:<form action='.$_SERVER['PHP_SELF'].' method="get">'; |
- | |
196 | $result.='<input type="hidden" name="step" value="2"> |
- | |
197 | <input type="hidden" name="d" value="'.$_GET['d'].'"> |
183 | $result.='<input type="hidden" name="d" value="'.$_GET['d'].'"> |
198 | <input type="hidden" name="v" value="'.$_GET['v'].'"'; |
184 | <input type="hidden" name="v" value="'.$_GET['v'].'">'; |
199 | $tmp=0; |
185 | $tmp=0; |
200 | while ($query->fetchInto($resinfo, DB_FETCHMODE_ASSOC)) { |
186 | while ($query->fetchInto($resinfo, DB_FETCHMODE_ASSOC)) { |
201 | $tmp++; |
187 | $tmp++; |
202 | if (isset($_GET[$tmp])){$ischecked='checked';}else{$ischecked='';} |
- | |
203 | $result.='<input type="checkbox" name="'.$tmp.'" '.$ischecked.' value="'.$resinfo['rep_id'].'">'.$resinfo['repname'].' <em>('.$resinfo['repdescribe'].')</em><br>'; |
188 | $result.='<input type="checkbox" name="'.$tmp.'" value="'.$resinfo['rep_id'].'">'.$resinfo['repname'].' <em>('.$resinfo['repdescribe'].')</em><br>'; |
204 | }
|
189 | }
|
205 | $result.="<input type='submit' value='Получить'></form>"; |
- | |
206 | return $result; |
190 | return $result; |
207 | }
|
191 | }
|
208 | }
|
192 | }
|
209 | ?>
|
193 | ?>
|
210 | 194 |