Хранилища Subversion ant

Редакция

Редакция 522 | Редакция 524 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 522 Редакция 523
Строка 609... Строка 609...
609
        $show .= "</ul>";
609
        $show .= "</ul>";
610
610
611
        return $show;
611
        return $show;
612
    }
612
    }
613
613
-
 
614
    /**
-
 
615
     * Вывод формы редактирования/добавления секций
-
 
616
     *
-
 
617
     * @author Alexander Wolf
-
 
618
     * @category Core
-
 
619
     *
-
 
620
     * @param integer $sectionID
-
 
621
     * @param string $info
-
 
622
     * @return string
-
 
623
     */
614
    public function showSectionsForm($sectionID = 0, $info = '') {
624
    public function showSectionsForm($sectionID = 0, $info = "") {
615
        $sSectID = $this->secure->checkInt($sectionID);
625
        $sSectID = $this->secure->checkInt($sectionID);
616
        $sInfo = $this->secure->checkStr($info, 1);
626
        $sInfo = $this->secure->checkStr($info, 1);
617
        if ($sInfo == "") {
627
        if ($sInfo == "") {
618
            $sInfo = "Секция";
628
            $sInfo = "Секция";
619
        }
629
        }
Строка 631... Строка 641...
631
641
632
        return $show;
642
        return $show;
633
    }
643
    }
634
644
635
    /**
645
    /**
-
 
646
     * Обновление информации о секции
-
 
647
     *
-
 
648
     * @author Alexander Wolf
-
 
649
     * @category Core
-
 
650
     *
-
 
651
     * @param integer $sectionID
-
 
652
     * @param string $sname
-
 
653
     * @param string $sinfo
-
 
654
     * @return array
-
 
655
     */
-
 
656
    public function updateSection($sectionID, $sname, $sinfo = "") {
-
 
657
        $result = array();
-
 
658
        $sSectID    = $this->secure->checkInt($sectionID);
-
 
659
        $sSName     = $this->secure->checkStr($sname,1);
-
 
660
        $sSInfo     = $this->secure->checkStr($sinfo,1);
-
 
661
-
 
662
        $query = "UPDATE ".$this->prefix."section SET secname='".$sSName."', sectinfo='".$sSInfo."' WHERE sect_id='".$sSectID."'";
-
 
663
        $rq =& $this->db->query($query);
-
 
664
        if (PEAR::isError($this->db)) {
-
 
665
            $result["ERR"] = 1;
-
 
666
            $result["ERRINFO"] = $this->db->getMessage();
-
 
667
        } else {
-
 
668
            $result["ERR"] = 0;
-
 
669
        }
-
 
670
-
 
671
        return $result;
-
 
672
    }
-
 
673
-
 
674
    /**
-
 
675
     * Удаление информации о секции
-
 
676
     *
-
 
677
     * @author Alexander Wolf
-
 
678
     * @category Core
-
 
679
     *
-
 
680
     * @param integer $sectionID
-
 
681
     * @return array
-
 
682
     */
-
 
683
    public function dropSection($sectionID) {
-
 
684
        $result = array();
-
 
685
        $sSectID    = $this->secure->checkInt($sectionID);
-
 
686
-
 
687
        // Удаление секции
-
 
688
        $query = "DELETE FROM ".$this->prefix."section WHERE sect_id='".$sSectID."'";
-
 
689
        $rq =& $this->db->query($query);
-
 
690
        if (PEAR::isError($this->db)) {
-
 
691
            $result["ERR"] = 1;
-
 
692
            $result["ERRINFO"] = $this->db->getMessage();
-
 
693
        } else {
-
 
694
            $result["ERR"] = 0;
-
 
695
        }
-
 
696
-
 
697
        return $result;
-
 
698
    }
-
 
699
-
 
700
    /**
-
 
701
     * Добавление новой секции
-
 
702
     *
-
 
703
     * @author Alexander Wolf
-
 
704
     * @category Core
-
 
705
     *
-
 
706
     * @param string $sname
-
 
707
     * @param string $sinfo
-
 
708
     * @return array
-
 
709
     */
-
 
710
    public function addSection($sname, $sinfo = "") {
-
 
711
        $result = array();
-
 
712
        $sSName = $this->secure->checkStr($sname,1);
-
 
713
        $sSInfo = $this->secure->checkStr($sinfo,1);
-
 
714
-
 
715
        $query = "INSERT INTO ".$this->prefix."section SET secname='".$sSName."', sectinfo='".$sSInfo."'";
-
 
716
        $rq =& $this->db->query($query);
-
 
717
        if (PEAR::isError($this->db)) {
-
 
718
            $result["ERR"] = 1;
-
 
719
            $result["ERRINFO"] = $this->db->getMessage();
-
 
720
        } else {
-
 
721
            $result["ERR"] = 0;
-
 
722
        }
-
 
723
-
 
724
        return $result;
-
 
725
    }
-
 
726
-
 
727
    /**
636
     * Проверка пароля (из формы авторизации)
728
     * Проверка пароля (из формы авторизации)
637
     *
729
     *
638
     * @author Alexander Wolf
730
     * @author Alexander Wolf
639
     * @category Core
731
     * @category Core
640
     *
732
     *