Редакция 515 | Редакция 517 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 515 | Редакция 516 | ||
---|---|---|---|
Строка 333... | Строка 333... | ||
333 | * @param byte $distlogo
|
333 | * @param byte $distlogo
|
334 | * @return array
|
334 | * @return array
|
335 | */
|
335 | */
|
336 | public function addDistribution($distname, $disttype, $distua = '', $distlogo = 0) { |
336 | public function addDistribution($distname, $disttype, $distua = '', $distlogo = 0) { |
337 | $result = array(); |
337 | $result = array(); |
338 | $sDName = $this->secure->checkStr($distname); |
338 | $sDName = $this->secure->checkStr($distname,1); |
339 | $sDType = $this->secure->checkInt($disttype); |
339 | $sDType = $this->secure->checkInt($disttype); |
340 | $sDUAgt = $this->secure->checkStr($distua); |
340 | $sDUAgt = $this->secure->checkStr($distua,1); |
341 | $sDLogo = $this->secure->checkInt($distlogo); |
341 | $sDLogo = $this->secure->checkInt($distlogo); |
342 | 342 | ||
343 | $query = "INSERT INTO ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."'"; |
343 | $query = "INSERT INTO ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."'"; |
344 | $rq =& $this->db->query($query); |
344 | $rq =& $this->db->query($query); |
345 | if (PEAR::isError($this->db)) { |
345 | if (PEAR::isError($this->db)) { |
Строка 366... | Строка 366... | ||
366 | * @return array
|
366 | * @return array
|
367 | */
|
367 | */
|
368 | public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo) { |
368 | public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo) { |
369 | $result = array(); |
369 | $result = array(); |
370 | $sDID = $this->secure->checkInt($distID); |
370 | $sDID = $this->secure->checkInt($distID); |
371 | $sDName = $this->secure->checkStr($distname); |
371 | $sDName = $this->secure->checkStr($distname,1); |
372 | $sDType = $this->secure->checkInt($disttype); |
372 | $sDType = $this->secure->checkInt($disttype); |
373 | $sDUAgt = $this->secure->checkStr($distua); |
373 | $sDUAgt = $this->secure->checkStr($distua,1); |
374 | $sDLogo = $this->secure->checkInt($distlogo); |
374 | $sDLogo = $this->secure->checkInt($distlogo); |
375 | 375 | ||
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 | $rq =& $this->db->query($query); |
377 | $rq =& $this->db->query($query); |
378 | if (PEAR::isError($this->db)) { |
378 | if (PEAR::isError($this->db)) { |
Строка 436... | Строка 436... | ||
436 | * @return array
|
436 | * @return array
|
437 | */
|
437 | */
|
438 | public function addDistVersion($distID, $version, $vname = "", $vcodename = "") { |
438 | public function addDistVersion($distID, $version, $vname = "", $vcodename = "") { |
439 | $result = array(); |
439 | $result = array(); |
440 | $sDistID = $this->secure->checkInt($distID); |
440 | $sDistID = $this->secure->checkInt($distID); |
441 | $sDVersion = $this->secure->checkStr($version); |
441 | $sDVersion = $this->secure->checkStr($version,1); |
442 | $sDVName = $this->secure->checkStr($vname); |
442 | $sDVName = $this->secure->checkStr($vname,1); |
443 | $sDVCName = $this->secure->checkInt($vcodename); |
443 | $sDVCName = $this->secure->checkStr($vcodename,1); |
444 | 444 | ||
445 | $query = "INSERT INTO ".$this->prefix."version SET dist_id='".$sDistID."', vname='".$sDVName."', version='".$sDVersion."', vcodename='".$sDVCName."'"; |
445 | $query = "INSERT INTO ".$this->prefix."version SET dist_id='".$sDistID."', vname='".$sDVName."', version='".$sDVersion."', vcodename='".$sDVCName."'"; |
446 | $rq =& $this->db->query($query); |
446 | $rq =& $this->db->query($query); |
447 | if (PEAR::isError($this->db)) { |
447 | if (PEAR::isError($this->db)) { |
448 | $result["ERR"] = 1; |
448 | $result["ERR"] = 1; |
Строка 467... | Строка 467... | ||
467 | * @return array
|
467 | * @return array
|
468 | */
|
468 | */
|
469 | public function updateDistVersion($versionID, $version, $vname = "", $vcodename = "") { |
469 | public function updateDistVersion($versionID, $version, $vname = "", $vcodename = "") { |
470 | $result = array(); |
470 | $result = array(); |
471 | $sVersID = $this->secure->checkInt($versionID); |
471 | $sVersID = $this->secure->checkInt($versionID); |
472 | $sDVersion = $this->secure->checkStr($version); |
472 | $sDVersion = $this->secure->checkStr($version,1); |
473 | $sDVName = $this->secure->checkStr($vname); |
473 | $sDVName = $this->secure->checkStr($vname,1); |
474 | $sDVCName = $this->secure->checkInt($vcodename); |
474 | $sDVCName = $this->secure->checkStr($vcodename,1); |
475 | 475 | ||
476 | $query = "UPDATE ".$this->prefix."version SET vname='".$sDVName."', version='".$sDVersion."', vcodename='".$sDVCName."' WHERE version_id='".$sVersID."'"; |
476 | $query = "UPDATE ".$this->prefix."version SET vname='".$sDVName."', version='".$sDVersion."', vcodename='".$sDVCName."' WHERE version_id='".$sVersID."'"; |
477 | $rq =& $this->db->query($query); |
477 | $rq =& $this->db->query($query); |
478 | if (PEAR::isError($this->db)) { |
478 | if (PEAR::isError($this->db)) { |
479 | $result["ERR"] = 1; |
479 | $result["ERR"] = 1; |