Ejemplo n.º 1
0
 public function InitializeContent()
 {
     $customId = getURLParam("custom", NULL);
     $this->title = CustomColumn::getAllTitle($customId);
     $this->entryArray = CustomColumn::getAllCustoms($customId);
     $this->idPage = CustomColumn::getAllCustomsId($customId);
 }
Ejemplo n.º 2
0
    public static function getAllCustoms($customId)
    {
        $result = parent::getDb()->query(str_format('select {0}.id as id, {0}.value as name, count(*) as count
from {0}, {1}
where {0}.id = {1}.{2}
group by {0}.id, {0}.value
order by {0}.value', self::getTableName($customId), self::getTableLinkName($customId), self::getTableLinkColumn($customId)));
        $entryArray = array();
        while ($post = $result->fetchObject()) {
            $customColumn = new CustomColumn($post->id, $post->name, $customId);
            array_push($entryArray, new Entry($customColumn->name, $customColumn->getEntryId(), str_format(localize("bookword", $post->count), $post->count), "text", array(new LinkNavigation($customColumn->getUri())), "", $post->count));
        }
        return $entryArray;
    }
Ejemplo n.º 3
0
Archivo: book.php Proyecto: ha-y/cops
 public static function getBooksByCustom($customId, $id, $n)
 {
     $query = str_format(self::SQL_BOOKS_BY_CUSTOM, "{0}", "{1}", CustomColumn::getTableLinkName($customId), CustomColumn::getTableLinkColumn($customId));
     return self::getEntryArray($query, array($id), $n);
 }
Ejemplo n.º 4
0
 public function InitializeContent()
 {
     $customId = getURLParam("custom", NULL);
     $custom = CustomColumn::createCustom($customId, $this->idGet);
     $this->idPage = $custom->getEntryId();
     $this->title = $custom->value;
     list($this->entryArray, $this->totalNumber) = Book::getBooksByCustom($custom, $this->idGet, $this->n);
 }