Редакция 578 | Редакция 580 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 578 | Редакция 579 | ||
---|---|---|---|
Строка 365... | Строка 365... | ||
365 | * @return array
|
365 | * @return array
|
366 | */
|
366 | */
|
367 | public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo = 0) { |
367 | public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo = 0) { |
368 | $result = array(); |
368 | $result = array(); |
369 | $sDID = $this->secure->checkInt($distID); |
369 | $sDID = $this->secure->checkInt($distID); |
370 | $sDName = $this->secure->checkStr($distname,1); |
370 | $sDName = $this->secure->checkStr($distname); |
371 | $sDType = $this->secure->checkInt($disttype); |
371 | $sDType = $this->secure->checkInt($disttype); |
372 | $sDUAgt = $this->secure->checkStr($distua,1); |
372 | $sDUAgt = $this->secure->checkStr($distua); |
373 | $sDLogo = $this->secure->checkInt($distlogo); |
373 | $sDLogo = $this->secure->checkInt($distlogo); |
374 | 374 | ||
375 | if ($sDLogo!=0) { |
375 | if ($sDLogo!=0) { |
376 | $query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'"; |
376 | $query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'"; |
377 | } else { |
377 | } else { |
Строка 685... | Строка 685... | ||
685 | * @return array
|
685 | * @return array
|
686 | */
|
686 | */
|
687 | public function updateSection($sectionID, $sname, $sinfo = "") { |
687 | public function updateSection($sectionID, $sname, $sinfo = "") { |
688 | $result = array(); |
688 | $result = array(); |
689 | $sSectID = $this->secure->checkInt($sectionID); |
689 | $sSectID = $this->secure->checkInt($sectionID); |
690 | $sSName = $this->secure->checkStr($sname,1); |
690 | $sSName = $this->secure->checkStr($sname); |
691 | $sSInfo = $this->secure->checkStr($sinfo,1); |
691 | $sSInfo = $this->secure->checkStr($sinfo); |
692 | 692 | ||
693 | $query = "UPDATE ".$this->prefix."section SET secname='".$sSName."', sectinfo='".$sSInfo."' WHERE sect_id='".$sSectID."'"; |
693 | $query = "UPDATE ".$this->prefix."section SET secname='".$sSName."', sectinfo='".$sSInfo."' WHERE sect_id='".$sSectID."'"; |
694 | $rq =& $this->db->query($query); |
694 | $rq =& $this->db->query($query); |
695 | if (PEAR::isError($this->db)) { |
695 | if (PEAR::isError($this->db)) { |
696 | $result["ERR"] = 1; |
696 | $result["ERR"] = 1; |
Строка 874... | Строка 874... | ||
874 | * @return array
|
874 | * @return array
|
875 | */
|
875 | */
|
876 | public function updateArch($archID, $arch) { |
876 | public function updateArch($archID, $arch) { |
877 | $result = array(); |
877 | $result = array(); |
878 | $sArchID = $this->secure->checkInt($archID); |
878 | $sArchID = $this->secure->checkInt($archID); |
879 | $sArch = $this->secure->checkStr($arch,1); |
879 | $sArch = $this->secure->checkStr($arch); |
880 | 880 | ||
881 | $query = "UPDATE ".$this->prefix."arch SET arch='".$sArch."' WHERE arch_id='".$sArchID."'"; |
881 | $query = "UPDATE ".$this->prefix."arch SET arch='".$sArch."' WHERE arch_id='".$sArchID."'"; |
882 | $rq =& $this->db->query($query); |
882 | $rq =& $this->db->query($query); |
883 | if (PEAR::isError($this->db)) { |
883 | if (PEAR::isError($this->db)) { |
884 | $result["ERR"] = 1; |
884 | $result["ERR"] = 1; |
Строка 1022... | Строка 1022... | ||
1022 | * @return array
|
1022 | * @return array
|
1023 | */
|
1023 | */
|
1024 | public function updateScheme($schemeID, $info) { |
1024 | public function updateScheme($schemeID, $info) { |
1025 | $result = array(); |
1025 | $result = array(); |
1026 | $sSchemeID = $this->secure->checkInt($schemeID); |
1026 | $sSchemeID = $this->secure->checkInt($schemeID); |
1027 | $sScheme = $this->secure->checkStr($info,1); |
1027 | $sScheme = $this->secure->checkStr($info); |
1028 | 1028 | ||
1029 | $query = "UPDATE ".$this->prefix."repscheme SET scheme='".$sScheme."' WHERE scheme_id='".$sSchemeID."'"; |
1029 | $query = "UPDATE ".$this->prefix."repscheme SET scheme='".$sScheme."' WHERE scheme_id='".$sSchemeID."'"; |
1030 | $rq =& $this->db->query($query); |
1030 | $rq =& $this->db->query($query); |
1031 | if (PEAR::isError($this->db)) { |
1031 | if (PEAR::isError($this->db)) { |
1032 | $result["ERR"] = 1; |
1032 | $result["ERR"] = 1; |
Строка 1097... | Строка 1097... | ||
1097 | $show = "<select name='".$name."' id='".$name."'>\n"; |
1097 | $show = "<select name='".$name."' id='".$name."'>\n"; |
1098 | while ($rq->fetchInto($element)) { |
1098 | while ($rq->fetchInto($element)) { |
1099 | if ($element["proto_id"]==$protoID) { |
1099 | if ($element["proto_id"]==$protoID) { |
1100 | $show .= "<option value='".$this->secure->checkInt($element["proto_id"])."' selected>".$this->secure->checkStr($element["proto"],1)."</option>\n"; |
1100 | $show .= "<option value='".$this->secure->checkInt($element["proto_id"])."' selected>".$this->secure->checkStr($element["proto"],1)."</option>\n"; |
1101 | } else { |
1101 | } else { |
1102 | $show .= "<option value='".$this->secure->checkInt($element["proto_id"])."'>".$this->secure->checkStr($element["scheme"],1)."</option>\n"; |
1102 | $show .= "<option value='".$this->secure->checkInt($element["proto_id"])."'>".$this->secure->checkStr($element["scheme"],1)."</option>\n"; |
1103 | }
|
1103 | }
|
1104 | }
|
1104 | }
|
1105 | $show .= "</select>"; |
1105 | $show .= "</select>"; |
1106 | break; |
1106 | break; |
1107 | }
|
1107 | }
|
Строка 1170... | Строка 1170... | ||
1170 | * @return array
|
1170 | * @return array
|
1171 | */
|
1171 | */
|
1172 | public function updateProto($protoID, $info) { |
1172 | public function updateProto($protoID, $info) { |
1173 | $result = array(); |
1173 | $result = array(); |
1174 | $sProtoID = $this->secure->checkInt($protoID); |
1174 | $sProtoID = $this->secure->checkInt($protoID); |
1175 | $sProto = $this->secure->checkStr($info,1); |
1175 | $sProto = $this->secure->checkStr($info); |
1176 | 1176 | ||
1177 | $query = "UPDATE ".$this->prefix."protos SET proto='".$sProto."' WHERE proto_id='".$sProtoID."'"; |
1177 | $query = "UPDATE ".$this->prefix."protos SET proto='".$sProto."' WHERE proto_id='".$sProtoID."'"; |
1178 | $rq =& $this->db->query($query); |
1178 | $rq =& $this->db->query($query); |
1179 | if (PEAR::isError($this->db)) { |
1179 | if (PEAR::isError($this->db)) { |
1180 | $result["ERR"] = 1; |
1180 | $result["ERR"] = 1; |
Строка 1281... | Строка 1281... | ||
1281 | * @return array
|
1281 | * @return array
|
1282 | */
|
1282 | */
|
1283 | public function updateSign($signID, $sname, $sinfo = "") { |
1283 | public function updateSign($signID, $sname, $sinfo = "") { |
1284 | $result = array(); |
1284 | $result = array(); |
1285 | $sSignID = $this->secure->checkInt($signID); |
1285 | $sSignID = $this->secure->checkInt($signID); |
1286 | $sSName = $this->secure->checkStr($sname,1); |
1286 | $sSName = $this->secure->checkStr($sname); |
1287 | $sSInfo = $this->secure->checkStr($sinfo,1); |
1287 | $sSInfo = $this->secure->checkStr($sinfo); |
1288 | 1288 | ||
1289 | $query = "UPDATE ".$this->prefix."signs SET sname='".$sSName."', sinfo='".$sSInfo."' WHERE sign_id='".$sSignID."'"; |
1289 | $query = "UPDATE ".$this->prefix."signs SET sname='".$sSName."', sinfo='".$sSInfo."' WHERE sign_id='".$sSignID."'"; |
1290 | $rq =& $this->db->query($query); |
1290 | $rq =& $this->db->query($query); |
1291 | if (PEAR::isError($this->db)) { |
1291 | if (PEAR::isError($this->db)) { |
1292 | $result["ERR"] = 1; |
1292 | $result["ERR"] = 1; |