本文整理汇总了PHP中Categorie::getCategoriesSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Categorie::getCategoriesSelect方法的具体用法?PHP Categorie::getCategoriesSelect怎么用?PHP Categorie::getCategoriesSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Categorie
的用法示例。
在下文中一共展示了Categorie::getCategoriesSelect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: procede
public function procede()
{
if (!$this->oRequest->existParam('key')) {
throw new Error('Vous devez renseigner la clé.', 3003);
}
if ($this->oRequest->getParam('key', 'string') != Config::get('ingestkey')) {
throw new Error('La clé est invalide.', 3003);
}
//Ajoute du titre
$this->oView->addData('titre', 'Analyse des releases');
//On récupère les 30 dernières releases
$oMysqli = Database::getInstance();
//Traitement de la requête
$sSqlRequest = "SELECT r.*, \r\n (SELECT GROUP_CONCAT(t.id_regex ORDER BY t.id_regex SEPARATOR ';') FROM tks_tags t WHERE t.id_release = r.id) AS tags,\r\n (SELECT GROUP_CONCAT(f.date ORDER BY f.date SEPARATOR ';') FROM tks_torrents f WHERE f.id_release = r.id) AS dates\t\r\n FROM tks_releases r \r\n WHERE r.id_categorie = '0' \r\n ORDER BY r.id DESC \r\n LIMIT 10";
$oResults = $oMysqli->query($sSqlRequest);
$oTable = new TableGenerator();
$oTable->setId(md5('Scrapper'));
$oTable->addColumn('Release');
$oTable->addColumn('Catégorie');
$oTable->addColumn('ID Fiche');
$aCategories = Categorie::getCategoriesSelect();
while ($aResult = $oResults->fetch_assoc()) {
$oScrapper = new Scrapper($aResult['name'], $aResult['id']);
$oScrapper->procede();
$oTable->addLine(array($aResult['name'], $aCategories[$oScrapper->getCategorie()], $oScrapper->getFiche()));
}
$oTable->setBottom('');
$oTable->create();
$this->oView->addData('content', $oTable->getCode());
$this->oView->Create();
}
示例2: procede
public function procede()
{
//Récupération des paramètres
$iReleaseId = $this->oRequest->getParam('id', 'int');
$this->oRelease = new Release('');
$this->oRelease->setId($iReleaseId);
$aCategories = Categorie::getCategoriesSelect();
$aCategories[0] = 'Non scrappé';
//On regarde si on demande à éditer la release
if ($this->oRequest->existParam('a')) {
switch ($this->oRequest->getParam('a', 'string')) {
case 'break':
$this->breakLink();
break;
case 'deletetag':
$this->deleteTag();
break;
case 'addtag':
$this->addTag();
break;
case 'editrelease':
$this->editRelease();
break;
}
}
//On regarde si on a modifié la catégorie
if ($this->oRequest->existParam('categorie')) {
$iCategorie = $this->oRequest->getParam('categorie', 'int');
switch ($iCategorie) {
case 1:
$this->loadFilmFiche();
$this->oRelease->updateCategorie(1);
break;
case 2:
$this->loadSerieFiche();
$this->oRelease->updateCategorie(2);
break;
case 3:
$this->loadMusicFiche();
$this->oRelease->updateCategorie(3);
break;
default:
$this->oRelease->updateCategorie($iCategorie);
break;
}
Logger::log('admin', 'La release ' . $this->oRelease->getName() . ' a été placé dans la catégorie ' . $aCategories[$this->oRelease->getCat()] . ' par ' . $this->oCurrentUser->getLogin());
$this->oView->addAlert('La release a été modifiée.', 'success');
}
//Récupération des informations de la release
$this->oRelease->loadFromId();
//Affichage des informations de base
$this->oView->addData('name', $this->oRelease->getName());
$this->oView->addData('categorie', $aCategories[$this->oRelease->getCat()]);
//Affichage des tags
$sTags = '';
foreach ($this->oRelease->getTags() as $iTagId => $oRegex) {
$oTagView = new View('label');
$oTagView->addData('type', 'info');
$oTagView->addData('text', $oRegex->getName());
$oTagView->create();
$sTags .= $oTagView->getCode() . ' ';
}
$this->oView->addData('tags', $sTags);
//Affichage des informations de la fiche
$this->createFiche($aCategories);
//Affichage de l'édition des tags
$this->createTagsEdit();
//Affichage du formulaire de détails
$this->createReleaseDetails();
$this->oView->create();
}
示例3: createView
private function createView()
{
$this->oView->addData('titre', Language::translate('RSS_ADMIN_TABLE_TITLE'));
$oTable = new TableGenerator();
$oTable->setId(md5('rss'));
$oTable->addColumn(Language::translate('RSS_ADMIN_TABLE_TRACKER'));
$oTable->addColumn(Language::translate('RSS_ADMIN_TABLE_URL'));
$oTable->addColumn(Language::translate('RSS_ADMIN_TABLE_ENCODE'));
$oTable->addColumn(Language::translate('RSS_ADMIN_TABLE_DATE'));
$oTable->addColumn(Language::translate('RSS_ADMIN_TABLE_MASK'));
$oTable->addColumn('');
$aRss = Rss::getFlux();
$aTrackers = Tracker::getTrackersSelect();
$aCategories = Categorie::getCategoriesSelect();
foreach ($aRss as $oRss) {
$oTable->addLine(array($aTrackers[$oRss->getTrackerId()], $this->createUrlPopup($oRss), $oRss->getEncoding(), $oRss->isForcedate() ? Language::translate('RSS_ADMIN_TABLE_SERVER') : Language::translate('RSS_ADMIN_TABLE_RSS'), $this->createMaskPopup($oRss), $this->createEditPopup($oRss, $aTrackers, $aCategories)));
}
$oTable->setBottom($this->createAddPopup($aTrackers, $aCategories));
$oTable->create();
$this->oView->addData('content', $oTable->getCode());
$this->oView->create();
}
示例4: createView
/**
* Create View
*/
private function createView()
{
$this->oView->addData('titre', Language::translate('PARSER_ADMIN_TABLE_TITLE'));
$oTable = new TableGenerator();
$oTable->setId(md5('Parser'));
$oTable->addColumn(Language::translate('PARSER_ADMIN_TABLE_TAG'));
$oTable->addColumn(Language::translate('PARSER_ADMIN_TABLE_REGEX'));
$oTable->addColumn(Language::translate('PARSER_ADMIN_TABLE_CATEGORIE'));
$oTable->addColumn('');
$aRegex = Regex::getAllRegex();
$aCategories = Categorie::getCategoriesSelect();
$aCategories[0] = Language::translate('PARSER_ADMIN_TABLE_NONE');
foreach ($aRegex as $oRegex) {
$oTable->addLine(array($oRegex->getName(), $oRegex->getRegex(), $aCategories[$oRegex->getCategorie()], $this->createEditPopup($oRegex, $aCategories)));
}
$oTable->setBottom($this->createAddPopup($aCategories));
$oTable->create();
$this->oView->addData('content', $oTable->getCode());
$this->oView->create();
}